Added permission-settings to the rest of the modules that use a custom acp template;

Updated missing or incorrect language variables; 
Outcommented a few language variables in info_acp_portal.php that should be deleted in the future;
This commit is contained in:
Marc Alexander
2010-11-20 17:08:09 +00:00
parent 28d6ed74b9
commit db7004416c
8 changed files with 45 additions and 19 deletions

View File

@@ -95,14 +95,14 @@
<legend>{L_ACP_PORTAL_LINKS}</legend> <legend>{L_ACP_PORTAL_LINKS}</legend>
<p class="quick"> <p class="quick">
<input class="button2" name="add" type="submit" value="{L_ADD_LINK}" /> <input class="button2" name="add" type="submit" value="{L_ACP_PORTAL_LINK_ADD}" />
</p> </p>
<table cellspacing="1"> <table cellspacing="1">
<thead> <thead>
<tr> <tr>
<th>{L_LINK_TITLE}</th> <th>{L_ACP_PORTAL_LINK_TITLE}</th>
<th>{L_LINK_URL}</th> <th>{L_ACP_PORTAL_LINK_URL}</th>
<th>{L_ACTION}</th> <th>{L_ACTION}</th>
</tr> </tr>
</thead> </thead>

View File

@@ -17,13 +17,13 @@
<form id="acp_portal_links" method="post" action="{U_ACTION}"> <form id="acp_portal_links" method="post" action="{U_ACTION}">
<fieldset> <fieldset>
<legend>{L_ACP_PORTAL_MENU_LINK}</legend> <legend>{L_ACP_PORTAL_MENU_LINK_SETTINGS}</legend>
<dl> <dl>
<dt><label for="link_title">{L_LINK_TITLE}:</label></dt> <dt><label for="link_title">{L_ACP_PORTAL_MENU_TITLE}:</label></dt>
<dd><input name="link_title" type="text" id="link_title" value="{LINK_TITLE}" maxlength="255" /></dd> <dd><input name="link_title" type="text" id="link_title" value="{LINK_TITLE}" maxlength="255" /></dd>
</dl> </dl>
<dl> <dl>
<dt><label for="link_is_cat">{L_LINK_IS_CAT}:</label></dt> <dt><label for="link_is_cat">{L_ACP_PORTAL_MENU_IS_CAT}:</label></dt>
<dd><label><input onchange="dE('url', -1)" type="radio" class="radio" name="link_is_cat" value="1" id="link_is_cat"<!-- IF S_LINK_IS_CAT --> checked="checked"<!-- ENDIF --> />{L_YES}</label> <dd><label><input onchange="dE('url', -1)" type="radio" class="radio" name="link_is_cat" value="1" id="link_is_cat"<!-- IF S_LINK_IS_CAT --> checked="checked"<!-- ENDIF --> />{L_YES}</label>
<label><input onchange="dE('url', 1)" type="radio" class="radio" name="link_is_cat" value="0"<!-- IF not S_LINK_IS_CAT --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd> <label><input onchange="dE('url', 1)" type="radio" class="radio" name="link_is_cat" value="0"<!-- IF not S_LINK_IS_CAT --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl> </dl>
@@ -51,10 +51,10 @@
<span>{L_ACP_PORTAL_MENU_PERMISSION_EXP}</span> <span>{L_ACP_PORTAL_MENU_PERMISSION_EXP}</span>
</dt> </dt>
<dd> <dd>
<select id="permission-setting" size="10" multiple="multiple" name="permission-setting[]"> <select id="permission-setting-menu" size="10" multiple="multiple" name="permission-setting-menu[]">
<!-- BEGIN permission_setting --> <!-- BEGIN permission_setting_menu -->
<option value="{permission_setting.GROUP_ID}"<!-- IF permission_setting.SELECTED -->selected="selected"<!-- ENDIF -->>{permission_setting.GROUP_NAME}</option> <option value="{permission_setting_menu.GROUP_ID}"<!-- IF permission_setting_menu.SELECTED -->selected="selected"<!-- ENDIF -->>{permission_setting_menu.GROUP_NAME}</option>
<!-- END permission_setting --> <!-- END permission_setting_menu -->
</select> </select>
</dd> </dd>
</dl> </dl>
@@ -83,6 +83,18 @@
<dd><input id="module_image" type="text" value="{MODULE_IMAGE}" name="module_image" maxlength="255" size="64" /></dd> <dd><input id="module_image" type="text" value="{MODULE_IMAGE}" name="module_image" maxlength="255" size="64" /></dd>
<!-- IF MODULE_IMAGE_SRC --><dd><img src="{MODULE_IMAGE_SRC}" alt="{L_MODULE_IMAGE}" /></dd><!-- ENDIF --> <!-- IF MODULE_IMAGE_SRC --><dd><img src="{MODULE_IMAGE_SRC}" alt="{L_MODULE_IMAGE}" /></dd><!-- ENDIF -->
</dl> </dl>
<!-- IF permission_setting -->
<dl>
<dt><label for="permission-setting">{L_MODULE_PERMISSIONS}:</label><br /><span>{L_MODULE_PERMISSIONS_EXP}</span></dt>
<dd>
<select id="permission-setting" size="10" multiple="multiple" name="permission-setting[]">
<!-- BEGIN permission_setting -->
<option value="{permission_setting.GROUP_ID}"<!-- IF permission_setting.SELECTED -->selected="selected"<!-- ENDIF -->>{permission_setting.GROUP_NAME}</option>
<!-- END permission_setting -->
</select>
</dd>
</dl>
<!-- ENDIF -->
</fieldset> </fieldset>
<!-- ENDIF --> <!-- ENDIF -->
@@ -90,14 +102,14 @@
<legend>{L_ACP_PORTAL_LINKS}</legend> <legend>{L_ACP_PORTAL_LINKS}</legend>
<p class="quick"> <p class="quick">
<input class="button2" name="add" type="submit" value="{L_ADD_LINK}" /> <input class="button2" name="add" type="submit" value="{L_ACP_PORTAL_MENU_ADD}" />
</p> </p>
<table cellspacing="1"> <table cellspacing="1">
<thead> <thead>
<tr> <tr>
<th>{L_LINK_TITLE}</th> <th>{L_ACP_PORTAL_MENU_TITLE}</th>
<th>{L_LINK_URL}</th> <th>{L_ACP_PORTAL_MENU_URL}</th>
<th>{L_ACTION}</th> <th>{L_ACTION}</th>
</tr> </tr>
</thead> </thead>

View File

@@ -25,6 +25,18 @@
<dd><input id="module_image" type="text" value="{MODULE_IMAGE}" name="module_image" maxlength="255" size="64" /></dd> <dd><input id="module_image" type="text" value="{MODULE_IMAGE}" name="module_image" maxlength="255" size="64" /></dd>
<!-- IF MODULE_IMAGE_SRC --><dd><img src="{MODULE_IMAGE_SRC}" alt="{L_MODULE_IMAGE}" /></dd><!-- ENDIF --> <!-- IF MODULE_IMAGE_SRC --><dd><img src="{MODULE_IMAGE_SRC}" alt="{L_MODULE_IMAGE}" /></dd><!-- ENDIF -->
</dl> </dl>
<!-- IF permission_setting -->
<dl>
<dt><label for="permission-setting">{L_MODULE_PERMISSIONS}:</label><br /><span>{L_MODULE_PERMISSIONS_EXP}</span></dt>
<dd>
<select id="permission-setting" size="10" multiple="multiple" name="permission-setting[]">
<!-- BEGIN permission_setting -->
<option value="{permission_setting.GROUP_ID}"<!-- IF permission_setting.SELECTED -->selected="selected"<!-- ENDIF -->>{permission_setting.GROUP_NAME}</option>
<!-- END permission_setting -->
</select>
</dd>
</dl>
<!-- ENDIF -->
</fieldset> </fieldset>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_PREVIEW --> <!-- IF S_PREVIEW -->

View File

@@ -94,6 +94,7 @@ $lang = array_merge($lang, array(
'MODULE_PERMISSIONS_EXP' => 'Select the groups that should be authorized to view the module. If you want all users to be able to view the module, dont select anything.<br />Select/Deselect multiple groups by holding <samp>CTRL</samp> and clicking.', 'MODULE_PERMISSIONS_EXP' => 'Select the groups that should be authorized to view the module. If you want all users to be able to view the module, dont select anything.<br />Select/Deselect multiple groups by holding <samp>CTRL</samp> and clicking.',
// Manage links // Manage links
/*
'ACP_EXPRESS_LINKS_EXPLAIN' => 'Using this form you can add, edit, view and delete navigation links on the index page. You can also create special navigation links as categories which arent clickable links.', 'ACP_EXPRESS_LINKS_EXPLAIN' => 'Using this form you can add, edit, view and delete navigation links on the index page. You can also create special navigation links as categories which arent clickable links.',
'ADD_LINK' => 'Add new navigation link', 'ADD_LINK' => 'Add new navigation link',
'ACP_PORTAL_MANAGE_LINKS' => 'Links verwalten', 'ACP_PORTAL_MANAGE_LINKS' => 'Links verwalten',
@@ -114,7 +115,7 @@ $lang = array_merge($lang, array(
'NO_LINK_URL' => 'You have created clickable navigation link but havent entered the URL for this navigation link.', 'NO_LINK_URL' => 'You have created clickable navigation link but havent entered the URL for this navigation link.',
'SELECT_LINK_ICON' => 'Select an icon…', 'SELECT_LINK_ICON' => 'Select an icon…',
*/
// Logs // Logs
'LOG_PORTAL_CONFIG' => '<strong>Altered Portal settings</strong><br />&raquo; %s', 'LOG_PORTAL_CONFIG' => '<strong>Altered Portal settings</strong><br />&raquo; %s',

View File

@@ -42,6 +42,7 @@ $lang = array_merge($lang, array(
'ACP_PORTAL_LINK_TYPE_EXP' => 'If you have a link to a page of your board, choose "Internal link" in order to prevent unwanted logouts.', 'ACP_PORTAL_LINK_TYPE_EXP' => 'If you have a link to a page of your board, choose "Internal link" in order to prevent unwanted logouts.',
'ACP_PORTAL_LINK_INT' => 'Internal link', 'ACP_PORTAL_LINK_INT' => 'Internal link',
'ACP_PORTAL_LINK_EXT' => 'External link', 'ACP_PORTAL_LINK_EXT' => 'External link',
'ACP_PORTAL_LINK_ADD' => 'Add new navigation link',
'ACP_PORTAL_LINK_URL' => 'Link URL', 'ACP_PORTAL_LINK_URL' => 'Link URL',
'ACP_PORTAL_LINK_URL_EXP' => 'External links:<br />All links should be entered with a http://<br /><br />Internal links:<br />Only enter the php file as link url, i.e. index.php?style=4.', 'ACP_PORTAL_LINK_URL_EXP' => 'External links:<br />All links should be entered with a http://<br /><br />Internal links:<br />Only enter the php file as link url, i.e. index.php?style=4.',
'ACP_PORTAL_LINK_PERMISSION' => 'Link permissions', 'ACP_PORTAL_LINK_PERMISSION' => 'Link permissions',

View File

@@ -43,14 +43,17 @@ $lang = array_merge($lang, array(
// ACP // ACP
'ACP_PORTAL_MENU' => 'Menu settings', 'ACP_PORTAL_MENU' => 'Menu settings',
'ACP_PORTAL_MENU_LINK_SETTINGS' => 'Link Settings',
'ACP_PORTAL_MENU_EXP' => 'Manage your main menu', 'ACP_PORTAL_MENU_EXP' => 'Manage your main menu',
'ACP_PORTAL_MENU_MANAGE' => 'Manage menu', 'ACP_PORTAL_MENU_MANAGE' => 'Manage menu',
'ACP_PORTAL_MENU_MANAGE_EXP' => 'You can manage the links of your main menu here.<br />Change the type of link by changing the selected option in the drop-down list next to the link.', 'ACP_PORTAL_MENU_MANAGE_EXP' => 'You can manage the links of your main menu here.<br />Change the type of link by changing the selected option in the drop-down list next to the link.',
'ACP_PORTAL_MENU_CAT' => 'Category', 'ACP_PORTAL_MENU_CAT' => 'Category',
'ACP_PORTAL_MENU_IS_CAT' => 'Set as special link category',
'ACP_PORTAL_MENU_INT' => 'Internal link', 'ACP_PORTAL_MENU_INT' => 'Internal link',
'ACP_PORTAL_MENU_EXT' => 'External link', 'ACP_PORTAL_MENU_EXT' => 'External link',
'ACP_PORTAL_MENU_TITLE' => 'Title', 'ACP_PORTAL_MENU_TITLE' => 'Title',
'ACP_PORTAL_MENU_URL' => 'Link URL', 'ACP_PORTAL_MENU_URL' => 'Link URL',
'ACP_PORTAL_MENU_ADD' => 'Add new navigation link',
'ACP_PORTAL_MENU_TYPE' => 'Link type', 'ACP_PORTAL_MENU_TYPE' => 'Link type',
'ACP_PORTAL_MENU_TYPE_EXP' => 'If you have a link to a page of your board, choose "Internal link" in order to prevent unwanted logouts.', 'ACP_PORTAL_MENU_TYPE_EXP' => 'If you have a link to a page of your board, choose "Internal link" in order to prevent unwanted logouts.',
'ACP_PORTAL_MENU_CREATE_CAT' => 'You need to create a category first.', 'ACP_PORTAL_MENU_CREATE_CAT' => 'You need to create a category first.',

View File

@@ -265,7 +265,7 @@ class portal_main_menu_module
$link_type = (!$link_is_cat) ? request_var('link_type', 0) : B3_LINKS_CAT; $link_type = (!$link_is_cat) ? request_var('link_type', 0) : B3_LINKS_CAT;
$link_url = ($link_is_cat) ? ' ' : request_var('link_url', ' '); $link_url = ($link_is_cat) ? ' ' : request_var('link_url', ' ');
$link_url = str_replace('&amp;', '&', $link_url); $link_url = str_replace('&amp;', '&', $link_url);
$link_permission = request_var('permission-setting', array(0 => '')); $link_permission = request_var('permission-setting-menu', array(0 => ''));
$groups_ary = array(); $groups_ary = array();
// get groups and check if the selected groups actually exist // get groups and check if the selected groups actually exist
@@ -431,7 +431,7 @@ class portal_main_menu_module
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
while($row = $db->sql_fetchrow($result)) while($row = $db->sql_fetchrow($result))
{ {
$template->assign_block_vars('permission_setting', array( $template->assign_block_vars('permission_setting_menu', array(
'SELECTED' => (in_array($row['group_id'], $groups_ary)) ? true : false, 'SELECTED' => (in_array($row['group_id'], $groups_ary)) ? true : false,
'GROUP_NAME' => (isset($user->lang['G_' . $row['group_name']])) ? $user->lang['G_' . $row['group_name']] : $row['group_name'], 'GROUP_NAME' => (isset($user->lang['G_' . $row['group_name']])) ? $user->lang['G_' . $row['group_name']] : $row['group_name'],
'GROUP_ID' => $row['group_id'], 'GROUP_ID' => $row['group_id'],

View File

@@ -153,9 +153,6 @@ class portal_welcome_module
set_portal_config('board3_welcome_message_' . $module_id, $welcome_message); set_portal_config('board3_welcome_message_' . $module_id, $welcome_message);
set_config('board3_welcome_message_uid_' . $module_id, $uid); set_config('board3_welcome_message_uid_' . $module_id, $uid);
set_config('board3_welcome_message_bitfield_' . $module_id, $bitfield); set_config('board3_welcome_message_bitfield_' . $module_id, $bitfield);
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link(($module_id) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=modules') : $u_action));
break; break;
case 'preview': case 'preview':