The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Replace Conditionals with Variables?
I've got a ton of conditionals in my postbit, and am wondering if there's a more elegant way to do what I want.
The following swaps backgrounds for usergroups: HTML Code:
<vb:if condition="is_member_of($post, 11)"><div class="userinfoctl"> <vb:else /> <vb:if condition="is_member_of($post, 36)"><div class="userinfogse"> <vb:else /> <vb:if condition="is_member_of($post, 46)"><div class="userinfohtv"> <vb:else /> <vb:if condition="is_member_of($post, 12)"><div class="userinfomta"> <vb:else /> <vb:if condition="is_member_of($post, 47)"><div class="userinfoptc"> <vb:else /> <vb:if condition="is_member_of($post, 14)"><div class="userinfowod"> <vb:else /> <vb:if condition="is_member_of($post, 13)"><div class="userinfo2"> <vb:else /> <vb:if condition="is_member_of($post, 10)"><div class="userinfowtf"> <vb:else /> <div class="userinfo"> </vb:if> </vb:if> </vb:if> </vb:if> </vb:if> </vb:if> </vb:if> </vb:if> HTML Code:
<div class="{vb:raw is_member_of}background">
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|