[ticket/11582] Fix documentation for adding permissions

PHPBB3-11582
This commit is contained in:
Joas Schilling 2013-07-06 16:07:05 +02:00
parent 0e86c02473
commit 4a64e2c2b3

View file

@ -33,34 +33,14 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
/**
* MODDERS PLEASE NOTE
* EXTENSION-DEVELOPERS PLEASE NOTE
*
* You are able to put your permission sets into a separate file too by
* prefixing the new file with permissions_ and putting it into the acp
* language folder.
*
* An example of how the file could look like:
*
* <code>
*
* if (empty($lang) || !is_array($lang))
* {
* $lang = array();
* }
*
* // Adding new category
* $lang['permission_cat']['bugs'] = 'Bugs';
*
* // Adding new permission set
* $lang['permission_type']['bug_'] = 'Bug Permissions';
*
* // Adding the permissions
* $lang = array_merge($lang, array(
* 'acl_bug_view' => 'Can view bug reports', 'cat' => 'bugs'),
* 'acl_bug_post' => 'Can post bugs', // Using a phpBB category here
* ));
*
* </code>
* You are able to put your permission sets into your extension.
* The permissions logic should be added via the 'core.permissions' event.
* You can easily add new permission categories, types and permissions, by
* simply merging them into the respective arrays.
* The respective language strings should be added into a language file, that
* start with 'permissions_', so they are automatically loaded within the ACP.
*/
$lang = array_merge($lang, array(