The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
$post['usergroupid'] and <if> Questions
I'm trying to do this in the postbit_legacy:
Code:
<if condition="$post['usergroupid'] == 8"> (If the post OWNER's usergroup id is 8) <!-- HTML here --> <else /> <!-- More Code --> </if> Also, which conditions are allowed in the <if> statements? Are they similar/the same as php? |
#2
|
||||
|
||||
Conditional for Usergroup is:
Code:
<if condition="is_member_of($bbuserinfo, x,y,z)"> <!-- HTML here --> <else /> <!-- More Code --> </if> |
#3
|
||||
|
||||
Code:
<if condition="is_member_of($post, x,y,z)"> <!-- HTML here --> <else /> <!-- More Code --> </if> |
#4
|
||||
|
||||
Ahh...I see.
|
#5
|
|||
|
|||
Thanks very much! So conditions are basically the same as php?
Also, what other things can I use with $post? |
#6
|
||||
|
||||
Whatever's in the post array. Also, keep in mind there is no "else if" template condition, due to the format of which vBulletin parses them.
|
#7
|
|||
|
|||
Quote:
PHP Code:
|
#8
|
||||
|
||||
Yes, you can nest conditionals, but they aren't "true" else ifs.
|
#9
|
||||
|
||||
I've been doing something like that for such things as an avatar. If Flash then custom avatar is overrided; if custom avatar then default avatar is overrided; if Flash and custom avatar is false then default avatar will display.
|
#10
|
|||
|
|||
how come it doesnt work for me ?
i'm editing it inside postbit_legacy, i code this, but cant . PHP Code:
when it show, it will become Group: (the group you are in) |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|