The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
What's wrong with this conditional?
I'm new to VB and having a hard time figuring out what should be a simple conditional. Basically what I'm trying to do is hide the "Post New Thread" button for regular members in 1 specific forum that they can't post in.
Here's the conditional I figured would work, but it doesn't. My logic is simply that if the forum ID is 11 and the user is not an admin, the button shouldn't be displayed. But it doesn't work, so I assume that one or both of those variables is not available in the FORUMDISPLAY template for some reason. Can anyone help?? <vb:if condition="$forum[forumid] == 11 AND $bbuserinfo['usergroupid'] != 6"> *nothing* <vb:else /> *code to show button* </vb:if> I also tried this and it doesn't work either ... <vb:if condition="$forum[forumid] == 11 AND !is_member_of($bbuserinfo,6)"> |
#2
|
||||
|
||||
Code:
<vb:if condition="$foruminfo['forumid'] == 11 AND $vbulletin->userinfo['usergroupid'] != 6"> *nothing* <vb:else /> *code to show button* </vb:if> |
#3
|
|||
|
|||
You're the best, thanks!
|
#4
|
||||
|
||||
Just a little hint for the next time. Looking at the forumdisplay.php file will give you a lot of clues as to how it handle variables. The same goes with the other files for the other areas as well.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|