The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Custom Administrator Permissions
Your Hack has an Admin Backend? Then you should consider protecting it with custom Admin Permissions - not every Admin has to be able to control everything. First of all, you have to decide on a uniqe Key for your Admin Permission, just like your Product ID. In this example I will use canadminmyhack. Go to your ACP File(s) and place the following Code below the Back-End requirement: PHP Code:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <navgroups product="myhack"> <navgroup phrase="myhack_settings" hr="true" permissions="canadminmyhack"> <navoption> <phrase>demohack_foo</phrase> <link>demohack.php?do=foo</link> </navoption> <navoption> <phrase>demohack_modcp</phrase> <link>../{$vbulletin->config[Misc][modcpdir]}/foobar.php</link> </navoption> </navgroup> </navgroups> Code:
Varname: can_administer_myhack Text: Can Administer Myhack As the Permissions Editor only takes care of standard Permissions, you must create 4 Plugins: admin_permissions_form PHP Code:
You must also create a Plugin for the Administrator Datamanager admindata_start PHP Code:
admin_permissions_process PHP Code:
can_administer PHP Code:
As you can see, I used customadminperms as the Bitfield. This is the Bitfield I will use for my Hacks, Bit 1 is already in use. If others want to use it too (to avoid having to create there own (Bit)fields) - feel free to do so. But please, first post here and state which Bit you are going to use and wait for an Okay so there won't be conflicts. To use it, create an appropriate Bitfield XML File. The following Install Code should be used then: PHP Code:
PHP Code:
1 - KirbyDE |
#42
|
||||
|
||||
Thanks so much Surviver! your input resolve my problem!
And Kirby for this wonderful "plugin/product". |
#43
|
|||
|
|||
how would one get this working on a mod that has already been installed on a forum?
|
#44
|
||||
|
||||
I was wondering if this going to work just fine on vB 3.6.5?
|
#45
|
||||
|
||||
So yea, this doesn't work on the latest vB lol (3.6.7 PL1)
I believe the addition of Dismissed News to the admin permissions screwed it up, I get this error if I try to edit any admin permission (or even if I don't) Fatal error: Field dismissednews is not defined in $validfields in class vb_datamanager_admin in /includes/class_dm.php on line 485 Looks like an array is being populated with all the admin permission fields, but our addition bumps the last one (dismissednews) out of the array. |
#46
|
||||
|
||||
$10 to anyone that can get this working.
|
#47
|
||||
|
||||
Yeah, I'm looking forward to this as well. Please anyone?
|
#48
|
||||
|
||||
$25 for a working version of this
|
#49
|
||||
|
||||
$50 for someone who can take over this, create it as a product and support it.
|
#50
|
||||
|
||||
as a product would be nice.
|
#51
|
||||
|
||||
Hello -
what do you guys need exactly? I have been creating custom Admin permission in all of my clients' scripts (when needed, of course!), and I am not having any issue with the latest vBulletin versions. The steps are exactly the same Andreas gave you. You may just want to replace the install code with a straightforward ALTER TABLE query, and you must remember to create your bitfield xml file correctly, but other than that there is nothing more to it, really. If it's not working, it is because you missed some step. Let me know, and I will package this into an xml product tomorrow, if you still need this. And no money needed, of course. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|