CyberRanger
01-17-2006, 05:16 PM
$permissions['myhackpermissions'] & $vbulletin->bf_ugp['myhackpermissions']['canfoo']
I'm trying to use this format in a plugin to decide if a condition should be set or not. But, the usergroup permission always returns false. Can you do this in a plugin or is the plugin evaluated before the usergroup permissions?
The plugin's Hook Location is: editor_toolbar_start
The basic plugin is:
if (($permissions['myhackpermissions'] & $vbulletin->bf_ugp['myhackpermissions']['canfoo']))
{
$show['img_bbcode']= true;
}
Yes, they can!
I needed to add:
global $permissions;
to the top of my plugin.
I'm trying to use this format in a plugin to decide if a condition should be set or not. But, the usergroup permission always returns false. Can you do this in a plugin or is the plugin evaluated before the usergroup permissions?
The plugin's Hook Location is: editor_toolbar_start
The basic plugin is:
if (($permissions['myhackpermissions'] & $vbulletin->bf_ugp['myhackpermissions']['canfoo']))
{
$show['img_bbcode']= true;
}
Yes, they can!
I needed to add:
global $permissions;
to the top of my plugin.