Admin load switch for jumpbox

git-svn-id: file:///svn/phpbb/trunk@4643 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-11-05 18:46:31 +00:00
parent 8ad641bd17
commit 8a05a6b1f8
4 changed files with 41 additions and 10 deletions

View file

@ -798,6 +798,8 @@ switch ($mode)
$load_birthdays_no = (!$new['load_birthdays']) ? 'checked="checked"' : '';
$moderators_yes = ($new['load_moderators']) ? 'checked="checked"' : '';
$moderators_no = (!$new['load_moderators']) ? 'checked="checked"' : '';
$jumpbox_yes = ($new['load_jumpbox']) ? 'checked="checked"' : '';
$jumpbox_no = (!$new['load_jumpbox']) ? 'checked="checked"' : '';
$search_yes = ($new['load_search']) ? 'checked="checked"' : '';
$search_no = (!$new['load_search']) ? 'checked="checked"' : '';
$search_update_yes = ($new['load_search_upd']) ? 'checked="checked"' : '';
@ -846,6 +848,10 @@ switch ($mode)
<td class="row1"><b><?php echo $user->lang['YES_MODERATORS']; ?>: </b></td>
<td class="row2"><input type="radio" name="load_moderators" value="1"<?php echo $moderators_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_moderators" value="0" <?php echo $moderators_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['YES_JUMPBOX']; ?>: </b></td>
<td class="row2"><input type="radio" name="load_jumpbox" value="1"<?php echo $jumpbox_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_jumpbox" value="0" <?php echo $jumpbox_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['YES_SEARCH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_SEARCH_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="load_search" value="1"<?php echo $search_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_search" value="0" <?php echo $search_no ?> /> <?php echo $user->lang['NO']; ?></td>

View file

@ -321,6 +321,11 @@ function make_jumpbox($action, $forum_id = false, $select_all = false)
{
global $auth, $template, $user, $db, $phpEx, $SID;
if (!$config['load_jumpbox'])
{
return;
}
$boxstring = '';
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
FROM ' . FORUMS_TABLE . '
@ -378,14 +383,14 @@ function make_jumpbox($action, $forum_id = false, $select_all = false)
$db->sql_freeresult($result);
unset($padding_store);
if ($boxstring != '')
if ($boxstring)
{
$boxstring = (($select_all) ? '<option value="0">' . $user->lang['ALL_FORUMS'] : '<option value="-1">' . $user->lang['SELECT_FORUM']) . '</option><option value="-1">-----------------</option>' . $boxstring;
}
$template->assign_vars(array(
'S_JUMPBOX_OPTIONS' => $boxstring,
'S_JUMPBOX_ACTION' => $action)
'S_JUMPBOX_ACTION' => $action)
);
return;
@ -1141,7 +1146,7 @@ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_po
}
// Check bumper, only topic poster and last poster are allowed to bump
if ($topic_poster != $user->data['user_id'] && $last_topic_poster != $user->data['user_id'])
if ($topic_poster != $user->data['user_id'] && $last_topic_poster != $user->data['user_id'] && !$auth->acl_get('m_', $forum_id))
{
return false;
}
@ -1487,6 +1492,7 @@ function page_header($page_title = '')
'T_TEMPLATE_PATH' => 'styles/' . $user->theme['primary']['template_path'] . '/template',
'T_IMAGESET_PATH' => 'styles/' . $user->theme['primary']['imageset_path'] . '/imageset',
'T_STYLESHEET_LINK' => (!$user->theme['primary']['theme_storedb']) ? 'styles/' . $user->theme['primary']['theme_path'] . '/theme/stylesheet.css' : "style.$phpEx?sid=$user->session_id&amp;id=" . $user->theme['primary']['theme_id'],
'T_STYLESHEET_NAME' => $user->theme['primary']['theme_name'],
'T_THEME_DATA' => (!$user->theme['primary']['theme_storedb']) ? '' : $user->theme['primary']['theme_data'])
);

View file

@ -63,6 +63,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_time',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_birthdays', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_search', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_search_upd', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_search_phr', '1');

View file

@ -646,6 +646,7 @@ $lang += array(
'YES_ONLINE_TRACK_EXPLAIN' => 'Display online information for user in profiles and viewtopic.',
'YES_BIRTHDAYS' => 'Enable birthday listing',
'YES_MODERATORS' => 'Enable display of Moderators',
'YES_JUMPBOX' => 'Enable display of Jumpbox',
'YES_SEARCH' => 'Enable search facilities',
'YES_SEARCH_EXPLAIN' => 'User and backend search functions including fulltext updates when posting.',
'YES_SEARCH_UPDATE' => 'Enable fulltext updating',
@ -1001,11 +1002,29 @@ $lang += array(
// User admin
$lang += array(
'User_admin' => 'User Administration',
'User_admin_explain' => 'Here you can change your user\'s information and certain specific options. To modify the users permissions please use the user and group permissions system.',
'LOOK_UP_USER' => 'Look up user',
'USER_ADMIN' => 'User Administration',
'USER_ADMIN_EXPLAIN' => 'Here you can change your users information and certain specific options. To modify the users permissions please use the user and group permissions system.',
'SELECT_USER' => 'Select User',
'Admin_user_updated' => 'The users profile was successfully updated.',
'Click_return_useradmin' => 'Click %sHere%s to return to User Administration',
'USER_ADMIN_MAIN' => 'Overview',
'USER_ADMIN_FEEDBACK' => 'Feedback',
'USER_ADMIN_PROFILE' => 'Profile',
'USER_ADMIN_PREFS' => 'Preferences',
'USER_ADMIN_AVATAR' => 'Avatar',
'USER_ADMIN_SIG' => 'Signature',
'USER_ADMIN_GROUP' => 'Groups',
'USER_ADMIN_PERM' => 'Permissions',
'USER_ADMIN_BAN_USER' => 'Ban by username',
'USER_ADMIN_BAN_EMAIL' => 'Ban by email',
'USER_ADMIN_BAN_IP' => 'Ban by IP',
'USER_ADMIN_FORCE' => 'Force re-activation',
'USER_ADMIN_DEACTIVATE' => 'Deactivate account',
'USER_ADMIN_ACTIVATE' => 'Activate account',
'USER_ADMIN_MOVE_POSTS' => 'Move all posts',
'User_delete' => 'Delete this user',
'User_delete_explain' => 'Click here to delete this user, this cannot be undone.',
'User_deleted' => 'User was successfully deleted.',
@ -1013,8 +1032,7 @@ $lang += array(
'User_allowpm' => 'Can send Private Messages',
'User_allowavatar' => 'Can display avatar',
'Admin_avatar_explain' => 'Here you can see and delete the users current avatar.',
'User_special' => 'Special admin-only fields',
'User_special_explain' => 'These fields are not able to be modified by the users. Here you can set their status and other options that are not given to users.',
);
// Group admin
@ -1055,7 +1073,7 @@ $lang += array(
'GROUP_MODS_ADDED' => 'New group moderators added successfully.',
'USERS_APPROVED' => 'Users approved successfully.',
'GROUP_EDIT_EXPLAIN' => 'Here you can edit an existing group. You can change its name, description and type (open, closed, etc.). You can also set certain groupwide options such as colouration, rank, etc. Changes made here override users current settings.',
'GROUP_EDIT_EXPLAIN' => 'Here you can edit an existing group. You can change its name, description and type (open, closed, etc.). You can also set certain groupwide options such as colouration, rank, etc. Changes made here override users current settings. Please note that group members can alter their avatar unless you set appropriate user permissions.',
'GROUP_DETAILS' => 'Group details',
'GROUP_NAME' => 'Group name',
'GROUP_DESC' => 'Group description',