The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Hmm, that sort of works, I see what you mean. If I just add that in there like this:
<if condition="$vbulletin->userinfo[field18] <> 'No' AND is_member_of($bbuserinfo,5,6)"> (sidebar code) then If it's set to Yes, and I'm in the right group, it shows the code. But if someone NOT in that usergroup has it set, then the conditional isn't matched and the code doesn't show. I might need to use a bunch of else's here, eh? --------------- Added [DATE]1223489616[/DATE] at [TIME]1223489616[/TIME] --------------- [high]* Guest210212002 hasn't had enough coffee [/high] What I need here is a conditional to ignore the yes/no conditional for everyone BUT contributors. That way the code is shown to everyone who does NOT have permission to use the yes/no thing. Does that make sense? |
#12
|
||||
|
||||
I don't understand what you are saying.... If someone not in the usergroup (right now with your statement, only usergroup 5 and 6 which are admins/super mods) sets field18, it should not do a thing for them. Isn't that what you want?
|
#13
|
|||
|
|||
My head hurts.
Here's my layout. Without conditionals, I have sidebar code for everyone. Then I want to only show it on the index, so I added this: <if condition="THIS_SCRIPT == 'index'"> Then I want it to show or not show, based on the CPF, so I added this: <if condition="$vbulletin->userinfo[field18] <> 'No'"> That works right now, for everyone - they can all show or hide the sidebar (huzzah!). So my code looks like: Code:
<if condition="THIS_SCRIPT == 'index'"> <if condition="$vbulletin->userinfo[field18] <> 'No'"> Hooray, this is my sidebar! Code:
<if condition="THIS_SCRIPT == 'index'"> <if condition="in_array($bbuserinfo['usergroupid'], array(5, 6))"> <if condition="$vbulletin->userinfo[field18] <> 'No'"> </if> Unfortunately that didn't work. With that setup, the sidebar always shows. Basically what I need is for it to show to everyone, unless they are in group 5/6, and if they are in group 5/6, only if the on/off conditional is set to Yes. |
#14
|
||||
|
||||
Let me get this straight..... You want "Hooray, this is my sidebar" (using the example) to show for everyone *unless* they are in group 5/6, and if they are in group 5/6, only if the on/off conditional is set to Yes.
HTML Code:
<if condition="THIS_SCRIPT == 'index'"> <if condition="(in_array($bbuserinfo['usergroupid'], array(5, 6)) AND $vbulletin->userinfo[field18] <> 'No') OR !in_array($bbuserinfo['usergroupid'], array(5, 6))"> Hooray, this is my sidebar </if> </if> |
#15
|
|||
|
|||
I am so sorry.
Yes, you have it right. That conditional gives me a malformed error though, but I think that's the right idea. --------------- Added [DATE]1223492073[/DATE] at [TIME]1223492073[/TIME] --------------- I think I finally got it! Your conditional was just missin' one closing parenthesis (or my browser is bad at copy/paste) Code:
<if condition="(in_array($bbuserinfo['usergroupid'], array(5, 6)) AND $vbulletin->userinfo[field18] <> 'No') OR !in_array($bbuserinfo['usergroupid'], array(5, 6))"> |
#16
|
||||
|
||||
You must have grabbed my condition as soon as I posted it cuz I modified it less than a minute later to add the closing parenthesis!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|