The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How can I condition which thread belongs to which forum?
When I user visits a thread, I want to highlight the parent forum of the respective thread...what's the condition?
tnx in advance edit: I found how can i condition if is a forum what forum belongs in the x parent forum with: Code:
<vb:if condition="$foruminfo[forumid] == 'x' OR $foruminfo[parentid] == 'x'"> the forum structure is like this: Forum A (parent) - Forum B -- Forum C If I visit forum A, it's all good, if I visit forum B it's all good...forum C does not verify the condition (probably because can't verify the master parent condition). Any threads i visit from any of those forums, both verify and deny this condition...i don't get it. |
#2
|
||||
|
||||
I don't know of a variable that looks at all the parents of a forum. Whoops, scratch that! It looks like there is a string called parentlist which would have what you want. It' a string, so you'd have to convert it to an array in a plugin and then you can just use in_array to see if it is in there. I'd do a search in the files for "parentlist" and see if maybe it already gets turned into an array for you to use.
|
#3
|
||||
|
||||
i have resolved this issue more elegantly..i think...you can include $foruminfo[forumid] in an array and check all the id's there...the problem is, you must enter all parents manually, but hey! :P
Code:
<vb:if condition="in_array($foruminfo[forumid], array(1,14,24,25,26,27))"> Code:
<vb:if condition="in_array($foruminfo[forumid], array(1,14,24,25,26,27,19,20,21,22,23,13,15,61,17,62,63))"> <li class="selected"><a class="navtab" href="http://www.forum.com/f1/">Software</a></li> <vb:else /> <li><a class="navtab" href="http://www.forum.com/f1/">Software</a></li> </vb:if> |
#4
|
||||
|
||||
now the only challenge I have is to test if a thread belongs to the x parent forum or its parent parent. Can I do this in some array..or is there a condition? I've noticed that the showthread doesn't have any variable linked to its parent forum
|
#5
|
||||
|
||||
resolved the issue....i just conditioned it that on certain pages, will not be displayed ex ( AND THIS SCRIPT !='showthread')
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|