PDA

View Full Version : if condition based on thread prefix


Hell Bomb
09-17-2010, 06:02 PM
Does anyone know if vBulletin already has a if condition that will activate based on a single threads prefix?

Hell Bomb
09-21-2010, 12:24 AM
-= bump =-

Lynne
09-21-2010, 03:13 AM
Probably something like:

<if condition="$threadinfo[prefixid] == 'xxxx'">
stuff to do if prefixid is xxxx
</if>

Change $threadinfo to be the appropriate variable for template you are using it in.

Hell Bomb
09-24-2010, 03:20 PM
Probably something like:

<if condition="$threadinfo[prefixid] == 'xxxx'">
stuff to do if prefixid is xxxx
</if>

Change $threadinfo to be the appropriate variable for template you are using it in.

well I am trying to change the information that displays on the forumhome depending on the prefix of a thread in my forum

Lynne
09-24-2010, 05:25 PM
What hook location are you using? Go find it in the code and see what variable is appropriate to use in there.

Hell Bomb
09-25-2010, 02:13 AM
What hook location are you using? Go find it in the code and see what variable is appropriate to use in there.

hmm honestly no clue, i have a post lets say www.example.com/forum/showthread.php?view=1 or something and it has the prefix "prefix" and the id of it is 2, on the forum home page if i change the prefix to something else say prefix id1 then i want it to change the display on the forum home page, I will be searching in the vbmanual for the right hook location or w/e you call it but any tips or advice would be much apperciated, sorry for seeming so useless, i am mainly a visual coder sticking to only themes, but this one has been getting me.

Hell Bomb
10-07-2010, 05:21 PM
-= Bump =-

cad2go
10-07-2010, 05:31 PM
hmm honestly no clue, i have a post lets say www.example.com/forum/showthread.php?view=1 or something and it has the prefix "prefix" and the id of it is 2, on the forum home page if i change the prefix to something else say prefix id1 then i want it to change the display on the forum home page, I will be searching in the vbmanual for the right hook location or w/e you call it but any tips or advice would be much apperciated, sorry for seeming so useless, i am mainly a visual coder sticking to only themes, but this one has been getting me.

have you tried rebuilding the counters in maintenace @admincp. vb does ^^^^. Sometimes it takes a while for the preview on forumhome to update to the new prefix is all.

I want to hide threads from guests that have the prefix NWS: (not work safe) so something like Lynne posted would be the direction I'd start with but that's a different case.

Can you show us visually? i.e. a pic of the forum and a pic of forumhome how you'd like it. Maybe we can figure it out.

Hell Bomb
10-18-2010, 03:44 PM
The image should give you all the information you need :)
http://img249.imageshack.us/img249/6753/helpoq.jpg

Lynne
10-18-2010, 05:17 PM
I have no idea what I am supposed to be looking at in that image and what it is you want to change/add in there.