Vaupell
01-02-2010, 01:52 PM
Trouble getting usergroup limitations working..
Table content : GOptions
Oid (int), Permissions (text)
Oid (1) - Permissions (1,2,3,4,5,6,7,8)
part of the php file
$getpermission=$db->query("SELECT * FROM " . TABLE_PREFIX."GOptions");
$permission=$db->fetch_array($getpermission);
$Playpermission = htmlspecialchars_uni($permission['Permissions']);
$permissionGROUPS = preg_split('/[\s,]+/', $Playpermission );
Template test
<vb:if condition="is_member_of($bbuserinfo, $permissionGROUPS)">
Allowed
<else>
Not allowed
</vb:if>
I cant get it to show anything, but no errors either..
Tryed stuff like
{vb:raw post.$permissionGROUPS}
$permissionGROUPS
To see if it imports anthing to template.
but both blank, so something is a miss..
--------------- Added 1262453798 at 1262453798 ---------------
EDIT OMFG:. i hate new vb,,
forgot to register the variables.. FFS..
SOLVED!
Table content : GOptions
Oid (int), Permissions (text)
Oid (1) - Permissions (1,2,3,4,5,6,7,8)
part of the php file
$getpermission=$db->query("SELECT * FROM " . TABLE_PREFIX."GOptions");
$permission=$db->fetch_array($getpermission);
$Playpermission = htmlspecialchars_uni($permission['Permissions']);
$permissionGROUPS = preg_split('/[\s,]+/', $Playpermission );
Template test
<vb:if condition="is_member_of($bbuserinfo, $permissionGROUPS)">
Allowed
<else>
Not allowed
</vb:if>
I cant get it to show anything, but no errors either..
Tryed stuff like
{vb:raw post.$permissionGROUPS}
$permissionGROUPS
To see if it imports anthing to template.
but both blank, so something is a miss..
--------------- Added 1262453798 at 1262453798 ---------------
EDIT OMFG:. i hate new vb,,
forgot to register the variables.. FFS..
SOLVED!