The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Add "S" icon next to Subscribed Threads w/link to view all subscriptions Details »» | |||||||||||||||||||||||||||
Add "S" icon next to Subscribed Threads w/link to view all subscriptions
Developer Last Online: Dec 2014
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. First let's modify the forumdisplay.php file: Find: PHP Code:
PHP Code:
Now go into the admin cp and change the template forumdisplaybit as follows: Find: PHP Code:
PHP Code:
I'll try to upload a demo page in a minute or so. Show Your Support
|
Comments |
#12
|
|||
|
|||
Same here... worked with "if 0==0", each post had an "S" .... just wished I knew a bit of php cuz this is probably a real easy thing to fix. Love the idea though, definitely not gonna give up on this one....
|
#13
|
|||
|
|||
OK...I found the problem...in the if statement I missed the dollar sign ($) when changing over the variable names to make them easier to read
it should be: PHP Code:
Note the dollar sign before "subscribed_id" now...before it didn't have it on the original post so it never satisfied the condition. I'll fix the original post so it's updated too. LMK if it works now...must have been a long day when I missed that one |
#14
|
|||
|
|||
Works Thanks man ! Cool hack. |
#15
|
|||
|
|||
AndyTSJ - Looks like you have a border around the icon there....in the image tag make sure you have "border=0" so it shows up as a round circle unless you wanted it that way with the border for some reason. The original code above does in fact already have the "border=0" reference within the image tag.
|
#16
|
|||
|
|||
Yea, just the way I did my graphic as opposed to being a border around the image.
|
#17
|
||||
|
||||
I modified it to show text instead of an icon, but it works like a dream -- thanks!
|
#18
|
|||
|
|||
I had text originally for this hack too actually but liked the icon look for my site...images convey meaning to the brain faster than reading which is why I changed over to the icon.
If any user wants to substitute text for the icon just replace the <img> tag code with the text they want to see instead. So if you prefer to use text instead of small "S" icon just replace the piece below from the original code with whatever text you want (i.e. subscribed): PHP Code:
|
#19
|
|||
|
|||
Hmmm. even with the $ in front, nothing shows up .
|
#20
|
|||
|
|||
make sure you are looking at a forum which has a thread that you are definitely subscribed to or you won't see the "S". Also be sure you uploaded the small S image to your images folder. Let me know if this works.
|
#21
|
|||
|
|||
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 "); 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 "); PHP Code:
PHP Code:
Instead of Code:
$thread[title]="<i>".$thread[title]."</i>"; 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> "; Full Credits to mvigod for the idea and the first release of this hack ... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|