The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need help with user permission codes
Hello,
I have a script in vb4 footer template, and I want to allow some usergroups and also want to disallow some user ids. how can I do that and what codes will be used? Thanks. |
#2
|
||||
|
||||
If you wanted to do it just in a template (which will proably be easier and faster in most cases.
<vb:if condition="{vb:var bbuserinfo.userid} == 1"> Show this</vb:if> Since you are combining uergroups and id's you may end up using nested if statements. Another optoins which you could use and it will be ALOt easier (this is what I did), make a special userfield for permission, make the fault no and then whoever youw anted to give permission to just change it to yes. Then just use an i statement ont he user field. First Look at vBulletin 4 Template Variables First take a look at this one First Look at vBulletin 4 Template Tags Code:
<vb:if condition="$show['guest']"> <div class="alert">You are a guest, no soup for you.</div> <vb:elseif condition="$is_member_of($bbuserinfo,6)" /> <div class="adminalert">Hello {vb:raw bbuserinfo.musername}! Let's get to work.</div> <vb:else /> <div class="useralert">Welcome Back {vb:raw bbuserinfo.musername}!</div> </vb:if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|