The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
parentlist array Conditional styling
Hi there, i have a tabulated css layout that needs a class assigning it as selected, I want to define this selected class by the parentID, or of the parentList contains X
Code:
<if condition="$foruminfo[parentlist] == X">class="selected"</if> Code:
<if condition="in_array('X', array($parentlist))">class="selected"</if> Code:
<if condition="in_array(14,array($foruminfo[parentlist]))"> To answer my own question, $parentlist is a string not an array, so i need to explode this in to an array. However i can't do this inline as explode is not a valid php function for vb, instead i setup plugin. plug-in > Hook Locationarse_templates Code:
$parentarray= explode(',', $foruminfo[parentlist]); Code:
<if condition="in_array(14, $parentarray)">class="selected"</if> TA DA! Well i'm impressed anyway! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|