The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Template Conditional Help From BitField
In my bitfield that I have for a usergroup permission setting I have the below:
PHP Code:
PHP Code:
Does this look right? Code:
<if condition="$permissions['candeletewho_admired']"> //Primary Text <else />//Alternate Text</if> Code:
<if condition="$permissions['candeletewho_admired'] == true"> |
#2
|
||||
|
||||
Code:
<if condition="$permissions['whosmyadmirer'] & $vbulletin->bf_ugp['whosmyadmirer']['candeletewho_admired']"> |
#3
|
||||
|
||||
OMG it works! What a waste of 2 hours straight figuring it out. Thanks so much SirAdrian!
|
#4
|
||||
|
||||
Quote:
What I would do (to keep templates clean), is something like this: PHP Code:
Code:
<if condition="$canDeleteWhoAdmired"> |
#5
|
||||
|
||||
oo nice, ok I'll try that a bit later...
b.t.w, is that how you handle bitfield conditonals? You have to use the PHP Code:
|
#6
|
||||
|
||||
Yep...
You are checking if bits in one number are set in another, arrays just make it easier to figure out which one's you are comparing. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|