The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Usergroup Permissions & Template Conditions
Hello Everybody,
I have tried searching but with no luck. I am wanting to use a conditional within a template to check a usergroup permission. Can anybody help me out or point me towards an article? I have the usergroup options set up and working perfectly with regards to the functionality, but certain things I want to be able to hide. Thanks, Paul. |
#2
|
||||
|
||||
<if condition="is_member_of($bbuserinfo, array(x,y,z))">
Stuff you only want members of usergroup x, y, or z to see </if> |
#3
|
|||
|
|||
Sorry Lynne thats not what i'm trying to achieve.
For example, I have a usergroup settings, Can Delete Ticket, and I need to check if can delete ticket, then it will show, if set to no, it will hide the delete link. Thanks, Paul. |
#4
|
|||
|
|||
One sec.. I think I have a solution for you.
--------------- Added [DATE]1208428269[/DATE] at [TIME]1208428269[/TIME] --------------- This hack adds another profile field page. It will allow you to add an Edit Extra Options page, but you can turn that into whatever you want it to say. Put all of the profile fields you don't want your regular users seeing one that page, and then on the Edit Extra Options (or whatever you edit it to say), use the <if condition="is_member_of($bbuserinfo, array(x,y,z))"> Stuff you only want members of usergroup x, y, or z to see </if> to hide the link from the regular users. https://vborg.vbsupport.ru/showthrea...t=Extra+Fields https://vborg.vbsupport.ru/showthread.php?t=123254 |
#5
|
|||
|
|||
No sorry thats still not it.
I know its something like <if condition="$show(ticket_delete)"> or something like that. Thanks, Paul. |
#6
|
|||
|
|||
Ahhh.. that's way out of my knowledge then. Hope you figure it out though.
|
#7
|
|||
|
|||
Sorry, i've just realised I may not have described this very well.
I have a template, which has a drop down menu of 4 links, one of which those links is a Delete link. I have a bitfield for the usergroup settings, and one of those settings is can they delete? If yes they can, if no they get an error no permission page. I am wanting to hide the delete link if the usergroup setting is can to no. Is this possible. I've seen it other places. Thanks, Paul. |
#8
|
||||
|
||||
Have you tried:
<if condition="$show['ticket_delete']"> (assuming the name of the field is "ticket_delete") |
#9
|
|||
|
|||
Lynne, if you were infront of me i'd be kissing you right now, it worked an absolute treat!
Thanks, Paul. |
#10
|
||||
|
||||
LOL that made me chuckle Paul. Lynne, you really are 'the man'.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|