The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
![]()
Feature Permissions and Hooks System
I am looking at implementing a generalized feature permission and hook system. (More on hooks later...) Feature permissions can be arbitrarily complex such as "Post rate requred" or "Required registration period". Feature Permissions would control access to:
(Developer note: The Feature Permissions and Hooks system itself would require only 3 or 4 small mod's, not counting the AdminCP interface and the new table: global.php, template fetcher, BBCode parser. The mod's would be small because they would consist primarily of calls to the vb_features_and_hook functions. Controlling access to non-vB pages would require admin's to use links to these pages that go through our permission checker -- a simple check and redirect script.) The permission system would allow for access control to most vBulletin features. The hook system would allow for the injection of PHP code or template code before and/or after installed scripts and templates. The hook system would accommodate many types of current mod's without any need to modify PHP scripts or templates. Access Permissions While many types of common permissions would be included, new permissions of arbitrary complexity can be defined by the Admin to grant or deny access to features. The default permissions (you can define others) that one can specify would include:
Assigning Permissions From your list of defined permissions (default or customs permissions), you can assign them to any script, script+action, template, or BB Code. Here's an example of how restricting access to the HTML BB Code might look (mockup): This example would restrict access to the HTML BBCode to the usergroups specified if their reputation is 100 or more. As mentioned earlier, you can also define your own permission tests and use them to restrict/grant access. For example you could restrict access to a feature such as "Can physically delete posts?" to only those passing your custom "Admin usergroup name" test. AdminCP mockup:
Hooks Hooks are a common technique of allowing administrators to run custom code/settings without having to modify the base system. No change is made to any vBulletin script, table, or template. Hooks might be run at the folllowing minimum number of points:
Problem: Restrict the use of custom avatars to usergroups 1, 8, and 9.The affect would be to turn off the custom avatar feature under certain conditions (i.e., for certain users) without having to modify vBulletin. Problem: For postbit_legacy, only show the avatar under certain conditions.That's About It... Imo, such a system will allow for many types of access control and customizations without having to modify scripts or templates. We can define new types of permissions and hooks, then post them here for others to use. I have not tried to be too detailed at this stage regarding the implementation details or the finer points of the AdminCP interface. Your feedback is welcome. C.C |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|