changeset 10:a523f78c467a

Re #1: * Create "root" directory to meet new packaging requirements
author IBBoard <dev@ibboard.co.uk>
date Sun, 07 Jun 2009 18:31:27 +0000
parents d5536d233ec1
children 9022e5cec446
files root/install/install_MultiRaceRankThemesPermissions.php root/language/en/mods/permissions_MultiRaceRankThemes.php
diffstat 2 files changed, 59 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/root/install/install_MultiRaceRankThemesPermissions.php	Sun Jun 07 18:31:27 2009 +0000
@@ -0,0 +1,43 @@
+<?php
+
+/**
+*
+* install script to set up permission options in the db for the Multi-Race Rank Themes mod
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+
+// initialize the page
+define('IN_PHPBB', true);
+define('IN_INSTALL', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup('mods/MultiRaceRankThemes');
+
+
+// Setup $auth_admin class so we can add tabulated survey permission options
+include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+$auth_admin = new auth_admin();
+
+// Add foo permissions as local permissions
+// (you could instead make them global permissions by making the obvious changes below)
+$auth_admin->acl_add_option(array(
+    'global'    => array('u_change_rank_theme')
+));
+
+
+$message = $user->lang['MULTI_RACE_ADDED_PERMISSIONS'] . '<br /><br />';
+$message .= $user->lang['REMOVE_INSTALL'];
+trigger_error($message);
+
+?>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/root/language/en/mods/permissions_MultiRaceRankThemes.php	Sun Jun 07 18:31:27 2009 +0000
@@ -0,0 +1,16 @@
+<?php
+if (!defined('IN_PHPBB'))
+{
+    exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+    $lang = array();
+}
+
+// Adding the permissions
+$lang = array_merge($lang, array(
+    'acl_u_change_rank_theme'    => array('lang' => 'Can change rank theme', 'cat' => 'profile'),
+));
+?>
\ No newline at end of file