The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
forum permision's
how can i handel user right permisions in a template, i tryed the example in this link
https://vborg.vbsupport.ru/showthread.php?t=231525 i tryed the Show specific user groups : but that doesn't do the trick. i created an option which contain's the user groups that can view. Code:
<vb:if condition="is_member_of($bbuserinfo, vboption.AJGpermision)">Show this to user group 1, 2, and 3</vb:if> please need help on this. |
#2
|
||||
|
||||
We need to know what template you are putting that condition in and where in the template. (And, vboption.AJGpermision doesn't look valid at all)
|
#3
|
|||
|
|||
oke it is in a template writen by mysel and this template is called by a plugin also written by myself.
this plugin add's a extra member profile tab. what should it be Code:
{VB:options AJGpermision} |
#4
|
||||
|
||||
If using a variable in a condition, you would use the same syntax you used in vb3 - $vboptions['xxx']
|
#5
|
|||
|
|||
oke, for the record i never programmed in vb3.
but why isn't the example working when entering the allowed usergroups by number like in the example. do i need to register the variable $bbuserinfo and $vboptions |
#6
|
||||
|
||||
It's really hard to tell with the very little information you have given. You should not have to register either $bbuserinfo or $vboptions for use in a template. So, my guess is that something else is going wrong.
|
#7
|
|||
|
|||
the example did work, i enter the wrong usergroup (i'm a admin)
$vboptions['AJGPermision'] is also working, but only when i enter one number, if i have a , seperated list then it isn't working how can i fix this. |
#8
|
||||
|
||||
You need to turn it into an array. If you are just entering a string of numbers, separated by commas, into the option field, then it is a string. You will need to explode the string on the commas and create an array out of the values and then use them.
|
#9
|
|||
|
|||
Hmmmm i go search the i-net on how todo that.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|