https://www.icyphoenix.com/viewtopic.php?f=30&t=15&p=41#p41 ----------------------------------- KugeLSichA Thu 10 Aug, 2006 01:37 How To Add A New Page Permission To ACP ----------------------------------- Hi there, if you have an new site that is not included in the xs package, and you know who i can add a new site AUTH to the DB which is configuarable over the site page permissions in ACP, just let me know. if you have the time maybe one can write an documantation about this, like an MOD install instruction.. maybe others find this usefull thx [hr] EDITED BY MG [code] ############################################################## ## MOD Title: Page permissions for a new site in phpBBXS ## MOD Author: KugeLSichA < kugelsicha@caromonline.de > (HoLLe) http://www.caromguild.de ## MOD Description: If you have an other site that is not included in phpBBXS ## package, and you want to add the phpBBXS site ## permissions to this site, add the following lines to your ## site. ## Site permissions can be set in ACP -> config -> site ## permissions. ## MOD Version: 1.0.0 ## ## Installation Level: Easy ## Installation Time: 5 min ## Files To Edit: 4 ## adm/admin_board_permissions.php ## lanugage/lang_english/lang_admin.php ## new_page.php ## templates/ca_aphrodite/admin/board_config_permissions_body.tpl ## Included Files: n/a ############################################################## ## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered ## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/ ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ SQL ]------------------------------------------ # INSERT INTO `phpbb_config_mg` (`config_name`, `config_value`) VALUES ('auth_view_new_page', '0'); # #-----[ OPEN ]------------------------------------------ # adm/admin_board_permissions.php # #-----[ FIND ]------------------------------------------ # $auth_view['viewonline'] = auth_select($new['auth_view_viewonline'], 'auth_view_viewonline'); # #-----[ AFTER, ADD ]------------------------------------------ # $auth_view['new_page'] = auth_select($new['auth_view_new_page'], 'auth_view_new_page'); # #-----[ FIND ]------------------------------------------ # "L_AUTH_VIEW_VIEWONLINE" => $lang['auth_view_viewonline'], # #-----[ AFTER, ADD ]------------------------------------------ # "L_AUTH_NEW_PAGE" => $lang['auth_new_page'], # #-----[ FIND ]------------------------------------------ # "S_AUTH_VIEW_VIEWONLINE" => $auth_view['viewonline'], # #-----[ AFTER, ADD ]------------------------------------------ # "S_AUTH_VIEW_NEW_PAGE" => $auth_view['new_page'], # #-----[ OPEN ]------------------------------------------ # templates/ca_aphrodite/admin/board_config_permissions_body.tpl # #-----[ FIND ]------------------------------------------ # {L_AUTH_VIEW_VIEWONLINE} {S_AUTH_VIEW_VIEWONLINE} # #-----[ AFTER, ADD ]------------------------------------------ # {L_AUTH_VIEW_NEW_PAGE} {S_AUTH_VIEW_NEW_PAGE} # #-----[ OPEN ]------------------------------------------ # # do this for all languages you have installed! lanugage/lang_english/lang_admin.php # #-----[ FIND ]------------------------------------------ # $lang['auth_view_viewonline'] = 'View Online'; # #-----[ AFTER, ADD ]------------------------------------------ # $lang['auth_view_new_page'] = 'New Page'; # #-----[ OPEN ]------------------------------------------ # new_page.php # #-----[ FIND ]------------------------------------------ # # similar // Start session management $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); // End session management # #-----[ AFTER, ADD ]------------------------------------------ # $auth_level_req = $config_mg['auth_view_new_page']; if ($auth_level_req > AUTH_ALL) { if ( ($auth_level_req == AUTH_REG) && (!$userdata['session_logged_in']) ) { message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']); } if ($userdata['user_level'] != ADMIN) { if ( $auth_level_req == AUTH_ADMIN ) { message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']); } if ( ($auth_level_req == AUTH_MOD) && ($userdata['user_level'] != MOD) ) { message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']); } } } # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM [/code]