phpBB

Development Wiki

Difference between revisions of "Talk:Tutorial.Permissions"

From phpBB Development Wiki

m (Clear permissions using auth class method: -- :O OH! is a user here!)
(some changes in CVS)
Line 42: Line 42:
 
Perhaps this could make modding a bit easier...
 
Perhaps this could make modding a bit easier...
 
Well, I must back... doing some university stuff -- Greetings - [[User:Emanuelle_1982|Emanuelle_1982]]</blockquote>
 
Well, I must back... doing some university stuff -- Greetings - [[User:Emanuelle_1982|Emanuelle_1982]]</blockquote>
 +
 +
== some changes in CVS ==
 +
 +
well, in the permissions file there is a comment that the permissions lang file must in language/<lang>/acp folder, not into mods folder - it should be checked which method is correct
 +
 +
file: language/<lang>/acp/permissions_phpbb.php
 +
<php>/*
 +
* MODDERS 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' => array('lang' => 'Can view bug reports', 'cat' => 'bugs'),
 +
* 'acl_bug_post' => array('lang' => 'Can post bugs', 'cat' => 'post'), // Using a phpBB category here
 +
* ));
 +
*
 +
* </code>
 +
*/</php>

Revision as of 11:45, 1 May 2007

Permissions talk page.

Please sign and date your entries by inserting ~~~~ at the end.

Start a new talk topic.


Just wanted to state that adding new permissions should *not* be done through an INSERT statement lonely but through the auth_admin::acl_add_option method.

This possibility should definately be explained as it's the prefered alternative naderman 11:17, 27 December 2006 (UTC)

Panels (in the ACP)

I've added this to the wiki:


To get the permission to show up under the right panel you need to use correct namning. a_view_foo : Administrator permissions panel m_view_foo : Moderator permissions panel u_view_foo : User permissions panel If you use the correct naming and giving it a category the permssion will show under the selected panel. Nothing more need todo.


But it needs to be reformated into a more userfriendly text.

Ztripez 20:04, 26 March 2007 (UTC)

Clear permissions using auth class method

Re-posting a message I received regarding this article... Highway of Life (talk) 17:05, 26 April 2007 (UTC)

I think there is a little improvement possible for an article in the Olympus Wiki ... suggestion:

clear permssions not by deleting cache folder, but using auth class, method

/**
* Clear one or all users cached permission settings
*/
function acl_clear_prefetch($user_id false)
and perhaps you also also must run
/**
* Fill auth_option statement for later querying based on the supplied options
*/
function build_auth_option_statement($key$auth_options, &$sql_opts)

Perhaps this could make modding a bit easier...

Well, I must back... doing some university stuff -- Greetings - Emanuelle_1982

some changes in CVS

well, in the permissions file there is a comment that the permissions lang file must in language/<lang>/acp folder, not into mods folder - it should be checked which method is correct

file: language/<lang>/acp/permissions_phpbb.php

/*
*    MODDERS 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'        => array('lang' => 'Can view bug reports', 'cat' => 'bugs'),
*        'acl_bug_post'        => array('lang' => 'Can post bugs', 'cat' => 'post'), // Using a phpBB category here
*    ));
*
*    </code>
*/