The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to check priveleges
In my showthread template I want to show the "New Thread" and "Post Reply" buttons to the Administrators group and one custom "Authors" group.
Can anyone help write the if statement that will check to see if they have "Admin" or "Author" privs and if so, show the button? FYI: My php abilities are null. I know enough html to be dangerous with the templates and that's about all. Any assistance would be appreciated. |
#2
|
|||
|
|||
if ($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==9) {
That's about as far as I can go being 100% correct (i think lol!), replace the 9 with your author group's usergroup id. I'm not too sure about vB's terminoligy and the reply button and new thread button variables, so I can't help much there sorry. |
#3
|
|||
|
|||
Great, thank you very much!
|
#4
|
|||
|
|||
Well, I've hit the wall with this miniscule php matter. If anyone could provide some help with writing this I'd appreciate it.
I need to do the equivelant of this in the forumdisplay template: if ($bbuserinfo[usergroupid]==6) { $newthreadlink } I don't seem to be formatting it correctly as that doesn't work. I also tried the same in the forumdisplay_newthreadlink, to no avail. I tried wrapping it in <? tags, I tried modifying the forumdisplay_newthreadlink, I know it's something increadibly basic that I just don't know. I have an ASP/IIS background and am just now (past 3 days) getting into PHP. In ASP I would write <% If usergroupid = 6 then Response.Write "button stuff here" end if %> I obviously don't understand how php and/or vB interpret code in the template. So, while I'm trying to "rtfm" and learn a little about php sytanx and any caveats related to vB templates; if anyone could help me write that out it would certainly be helpful. Thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|