The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
HowTo Create Custom Usergroup Permissions
Usergoup Permissions are being controlled through XML files, you don't have to edit usergroup.php anymore To create your own usergroup permissions, the first thing to do is to modify table usergroup (keep table prefixes in mind!): [sql]ALTER TABLE usergroup ADD myhackpermissions INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL ;[/sql] If your hack does need some integer settings as well (and not just On/Off-Options): [sql]ALTER TABLE usergroup ADD myhackintset INT( 10 ) DEFAULT '100' NOT NULL ;[/sql] Then you must create a an XML-File bitfield_myhack.xml and place it in includes/xml: HTML Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <bitfields product="vbulletin"> <bitfielddefs> <group name="ugp"> <group name="myhackpermissions"> <bitfield name="canfoo" group="my_hack_permissions" phrase="can_foo_forum" install="1,2,3,4,5,6,7">1</bitfield> <bitfield name="canbaa" group="my_hack_permissions" phrase="can_baa_forum" install="">2</bitfield> <bitfield intperm="true" name="myhackintset" group="my_hack_permissions" phrase="myhack_int_desc"></bitfield> </group> </group> </bitfielddefs> </bitfields> 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:
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: HTML Code:
<ignoregroups> <group name="myhackpermissions" ignoregroups="1" /> </ignoregroups> 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:
This How-To is (C) 2005 by KirbyDE and you are not allowed to redistribute it in any way without my explicit consent. |
#52
|
|||
|
|||
download the xml's Andreas did for me and look off of those.
|
#53
|
|||
|
|||
I don't see any difference other than the group used, and I don't think that's what causes the problem.
Ok, figured that I needed to rebuild bitfields.. But it still does not save. |
#54
|
||||
|
||||
vbulletin, NOT vBulletin - better yet use your own product id.
|
#55
|
|||
|
|||
I changed the product ID to my own. There are no results though.
As I said, after sumbitting the usergroup options, it says "usergroup X saved", but then after I reload the page, the option is back to "off" (as it was originally)... My latest XML: Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <bitfields product="dv_ugpefcm"> <bitfielddefs> <group name="ugp"> <group name="charlimit"> <bitfield name="isexempt" group="post_thread_permissions" phrase="exempt_from_char_limit" install="">0</bitfield> </group> </group> </bitfielddefs> </bitfields> |
#56
|
||||
|
||||
Did you rebuild the bitfield cache?
|
#57
|
|||
|
|||
Yes. Using the admincp navbar link in debug mode.
Figured: The problem was that I specified invalid decimal bitfield value. Now it is working (after I changed 0 to 1). |
#58
|
|||
|
|||
I don't think '' and '0' are valid bitfield values.
1st bitfield should have value of 1 2nd should have 2 3rd should have 4 4th should have 8 5th should have 16 and so on.... |
#59
|
|||
|
|||
Yes, I already figured that, thanks.
It should be mentioned in the first post though. |
#60
|
||||
|
||||
I assumed everybody knows how the binary system works
|
#61
|
|||
|
|||
Even if yes, it is not mentioned that XML uses binary data as the values. YOu did not specify what to put between the tags
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|