PDA

View Full Version : forum permision's


ageurtse
01-25-2010, 05:01 PM
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.

<vb:if condition="is_member_of($bbuserinfo, vboption.AJGpermision)">Show this to user group 1, 2, and 3</vb:if>

i did somthing wrong but i don't now what. is i replace vboption.AJGpermision for 1,2,3 than it also isn't working.

please need help on this.

Lynne
01-25-2010, 05:07 PM
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)

ageurtse
01-25-2010, 05:10 PM
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 {VB:options AJGpermision}

Lynne
01-25-2010, 05:14 PM
If using a variable in a condition, you would use the same syntax you used in vb3 - $vboptions['xxx']

ageurtse
01-25-2010, 05:17 PM
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

Lynne
01-25-2010, 09:36 PM
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.

ageurtse
01-26-2010, 04:39 AM
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.

Lynne
01-26-2010, 02:18 PM
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.

ageurtse
01-26-2010, 03:39 PM
Hmmmm i go search the i-net on how todo that.