Version: 1.00, by mvigod
Developer Last Online: Dec 2014
Version: 2.2.x
Rating:
Released: 03-01-2002
Last Update: Never
Installs: 19
No support by the author.
This is my first "released" hack so I can give something back for all the cool hacks I found here.
This one is fairly simple. What it does is put a small icon next to the title in any thread that the user has subscribed to.
The small icon is a clickable link which will take the user to a page where they can view all of their subscriptions.
This requires modifying forumdisplay.php and one template file "forumdisplaybit".
Also you must upload the image icon file to your images directory.
//Subscribed thread with S icon hack begin
$show_subscribed=''; // empty variable out for each pass in while loop
$s_iconhack_userid=$bbuserinfo['userid'];
$check_user_subscribed=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE threadid=$thread[threadid] AND userid='$s_iconhack_userid' LIMIT 1");
$subscribed_id=$check_user_subscribed[subscribethreadid];
if ($subscribed_id>0)
{
$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> ";
}
//Subscribed Icon Hack End
Now go into the admin cp and change the template forumdisplaybit as follows:
Hey
that idea is really good!!
Thank you for working it out to a full hack very nice!
I am not sure if I am going to implement it to my forum, but sure will give it a try on my beta version
Didn't seem to work for me. Followed the instructions and installed ok, no technical problems or errors showing, just the small icon and link don't show next to the thread.
AndyTSJ - Are the threads you are looking at ones you are sure you have yourself subscribed to? It will only show on those threads so if a page has threads but none are subscribed it will not show.
Yea, and I deliberately suscribed to a thread to test it and no luck The code is all in as you posted it in your instructions so I can't figure out why it won't work.
$bgclass = "alt1";
}
//Subscribed thread with S icon hack begin
$show_subscribed=''; // empty variable out for each pass in while loop
$s_iconhack_userid=$bbuserinfo['userid'];
$check_user_subscribed=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE threadid=$thread[threadid] AND userid='$s_iconhack_userid' LIMIT 1");
$subscribed_id=$check_user_subscribed[subscribethreadid];
if (subscribed_id>0)
{
$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> ";
}
//Subscribed Icon Hack End
eval("\$forumdisplaybits .= \"".gettemplate('forumdisplaybit')."\";");
when you pull up the source code for the html on one of the pages which has a thread you susbscribed to does any of the code appear after the thread title on the one you subscribed to?
Your code above looks ok. Try this just to troubleshoot. Change the if statement from
if (subscribed_id>0)
to:
if (0==0)
This will guarantee a true condition. All threads should show up with an S then. Do this quickly to test it if it's on a live board and then undo it fast so all your members don't wonder what all those S's are!
If they show up then we've narrowed the problem down or if something is in the html source next to your thread. Let me know as it should be working.
I am having the same problem as well. I subscribed to some threads but the S icon does not display. I did a quick test with the if 0==0 statement and all threads displayed the S icon.