As you can see, you must create a new permission group below group ugp (short for usergroup permissions).
Parameter product of Tag bitfields should be the identifier of your Product
Paramater name of Tag group must match the column name in table usergroup.
The Parameters for Tag bitfield are:
name is the identifier you can use in your hack code (eg. $permissions['myhackpermissions'] & $vbulletin->bf_ugp['myhackpermissions']['canfoo'])
In case of integer options this name must match the column name in table usergroup.
intperm indicates that this Option is a integer value
group is the varname for the Phrase that should be displayed as Permission Group Title.
This is also being used to set up different Groups for your permissions.
phrase is the varname of the Phrase that should be displayed for this option in Usergroup Manager
install is a comma-separated list of the usergroups where this permission should be visible
If this parameter is empty or omitted, this Option will be used for all Usergroups
The value of <bitfield> is the decimal value of the bit (eg. 1 for the first, 2 for the second, 4 for the third, and so on).
In case of an Integer Option this is the default value.
If you want to hide certain permission groups for some usergroups, for example from Guests as they don't make sense for them:
Parameter name is the name of the permission group you want to hide, ignoregroups is a comma seperated list of usergoup IDs where this permission group should not show up.
Place this section below the <bitfielddefs>-Section.
Now create the necessary phrases (in Phrasegroup Permissions) at this point.
As vBulletin caches Bitfields in Datastore, you must rebuild this cache before the new usergroup permissions can be actually used (They will already show up in Usergroup Manager, but cannot be saved - you will get an error).
To do so, point your browser to admincp/index.php?do=buildbitfields.
You can also use the following Code (in a Custom Installer or Install-Code of a Product) to update the Bitfield Cache:
PHP Code:
if (is_newer_version('3.5.1', $vbulletin->options['templateversion']))
{
// Rebuild Bitfields
// Do this for vBulletin < 3.5.1 *ONLY*; later versions rebuild
// automatically and calling the builder in install code causes
// the bitfields NOT to be rebuild correctly
require_once(DIR . '/includes/class_bitfield_builder.php');
vB_Bitfield_Builder::save($db);
build_forum_permissions();
}
If you install/upgrade vBulletin and custom bitfield_xxx.xml files are already in place, they will be used - you don't have to update the Bitfield Cache in this case.
This How-To is (C) 2005 by KirbyDE and you are not allowed to redistribute it in any way without my explicit consent.