2011-09-10 08:00:10 +00:00
|
|
|
function Subscribe(topicid) {
|
|
|
|
ajax.get("userhistory.php?action=thread_subscribe&topicid=" + topicid + "&auth=" + authkey, function() {
|
|
|
|
var subscribeLink = $("#subscribelink" + topicid).raw();
|
2013-04-30 18:18:07 +00:00
|
|
|
if (subscribeLink) {
|
|
|
|
if (subscribeLink.firstChild.nodeValue.charAt(0) == '[') {
|
2013-02-05 08:00:53 +00:00
|
|
|
subscribeLink.firstChild.nodeValue = subscribeLink.firstChild.nodeValue.charAt(1) == 'U'
|
|
|
|
? '[Subscribe]'
|
|
|
|
: '[Unsubscribe]';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
subscribeLink.firstChild.nodeValue = subscribeLink.firstChild.nodeValue.charAt(0) == 'U'
|
|
|
|
? "Subscribe"
|
|
|
|
: "Unsubscribe";
|
2011-09-10 08:00:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function Collapse() {
|
|
|
|
var collapseLink = $('#collapselink').raw();
|
|
|
|
var hide = (collapseLink.innerHTML.substr(0,1) == 'H' ? 1 : 0);
|
2013-04-30 18:18:07 +00:00
|
|
|
if ($('.row').results() > 0) {
|
2011-09-10 08:00:10 +00:00
|
|
|
$('.row').toggle();
|
|
|
|
}
|
2013-04-30 18:18:07 +00:00
|
|
|
if (hide) {
|
2011-09-10 08:00:10 +00:00
|
|
|
collapseLink.innerHTML = 'Show post bodies';
|
|
|
|
} else {
|
|
|
|
collapseLink.innerHTML = 'Hide post bodies';
|
|
|
|
}
|
|
|
|
}
|