as this Hack added a bunch of Queries, I did a redesign of this genious hack:
find:
Code:
SELECT $dotuserid $votequery ".iif($foruminfo[allowicons],'icon.title as icontitle,icon.iconpath,','')."
thread.threadid,thread.title,lastpost, forumid,pollid,open,replycount,postusername,postuserid,
lastposter,thread.dateline,views,thread.iconid,notes,thread.visible,sticky,votetotal,attach
FROM thread
".iif($foruminfo[allowicons],'LEFT JOIN icon ON (icon.iconid = thread.iconid)','')."
$dotjoin
WHERE $threadids
ORDER BY sticky DESC, $sortfield $sqlsortorder
");
replace it with
Code:
SELECT $dotuserid $votequery ".iif($foruminfo[allowicons],'icon.title as icontitle,icon.iconpath,','')."
thread.threadid,thread.title,lastpost, forumid,pollid,open,replycount,postusername,postuserid,
lastposter,thread.dateline,views,thread.iconid,notes,thread.visible,sticky,votetotal,attach,subscribethread.subscribethreadid AS subscribed
FROM thread
LEFT JOIN subscribethread
ON (subscribethread.threadid=thread.threadid AND subscribethread.userid='".$bbuserinfo['userid']."')
".iif($foruminfo[allowicons],'LEFT JOIN icon ON (icon.iconid = thread.iconid)','')."
$dotjoin
WHERE $threadids
ORDER BY sticky DESC, $sortfield $sqlsortorder
");
and then find:
PHP Code:
eval("\$forumdisplaybits .= \"".gettemplate('forumdisplaybit')."\";");
and place
ABOVE ist:
PHP Code:
//Subscribed thread with S icon hack begin
if ($thread[subscribed]) {
$thread[title]="<i>".$thread[title]."</i>";
}
//Subscribed Icon Hack End
Instead of
Code:
$thread[title]="<i>".$thread[title]."</i>";
you can place whatever you want to do, like
Code:
$show_subscribed=" <a href=\"member2.php?s=$session[sessionhash]&action=viewsubscription&daysprune=1000\"><img src=\"images/subscribed-icon.gif\" align=\"middle\" width=15 height=15 border=0 alt=\"You are subscribed to this thread. Click to view all subscriptions\"></A> ";
etc pp..
Full Credits to
mvigod for the idea and the first release of this hack ...