harmor19
11-04-2006, 05:56 AM
I have made some custom usergroup permissions for a hack a few months back and they worked. I recently added one more to the list which is the last one in the php bbcode
<bitfield name="canrequesthosting" group="hosting_permissions" phrase="can_request_hosting" install="">1</bitfield>
<bitfield name="canupgradehosting" group="hosting_permissions" phrase="can_upgrade_hosting" install="">2</bitfield>
<bitfield name="canchangehosting" group="hosting_permissions" phrase="can_change_hosting" install="">4</bitfield>
<bitfield name="canviewuserlist" group="hosting_permissions" phrase="can_view_hosted_users" install="">8</bitfield>
<bitfield name="cansearchsites" group="hosting_permissions" phrase="can_search_hosted_sites" install="">16</bitfield>
Here is the php conditional I'm using
if(($permissions['hostingpermissions'] & $vbulletin->bf_ugp['hostingpermissions']['cansearchsites'] == 0))
{
eval(standard_error(fetch_error('cannot_search_hos ted_sites')));
}
I went into phpmyadmin and went to the "usergroup" table. The field the permissions saved to is "hostingpermissions" In the ACP --> Usergroup Manager" I only enabled the "cansearchsites" option. I checked the number in the "hostingpermissions" field and it was 16. Can you tell me why the conditional won't recognize the usergroup permissions?
<bitfield name="canrequesthosting" group="hosting_permissions" phrase="can_request_hosting" install="">1</bitfield>
<bitfield name="canupgradehosting" group="hosting_permissions" phrase="can_upgrade_hosting" install="">2</bitfield>
<bitfield name="canchangehosting" group="hosting_permissions" phrase="can_change_hosting" install="">4</bitfield>
<bitfield name="canviewuserlist" group="hosting_permissions" phrase="can_view_hosted_users" install="">8</bitfield>
<bitfield name="cansearchsites" group="hosting_permissions" phrase="can_search_hosted_sites" install="">16</bitfield>
Here is the php conditional I'm using
if(($permissions['hostingpermissions'] & $vbulletin->bf_ugp['hostingpermissions']['cansearchsites'] == 0))
{
eval(standard_error(fetch_error('cannot_search_hos ted_sites')));
}
I went into phpmyadmin and went to the "usergroup" table. The field the permissions saved to is "hostingpermissions" In the ACP --> Usergroup Manager" I only enabled the "cansearchsites" option. I checked the number in the "hostingpermissions" field and it was 16. Can you tell me why the conditional won't recognize the usergroup permissions?