2005-11-17 18:06:11 +00:00
|
|
|
<?php
|
2007-06-09 11:11:20 +00:00
|
|
|
/**
|
2005-11-17 18:06:11 +00:00
|
|
|
*
|
|
|
|
* @package acp
|
2007-06-09 11:11:20 +00:00
|
|
|
* @copyright (c) 2005 phpBB Group
|
2011-12-31 13:32:52 +00:00
|
|
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
2005-11-17 18:06:11 +00:00
|
|
|
*
|
2006-05-18 18:18:32 +00:00
|
|
|
* @todo add cron intervals to server settings? (database_gc, queue_interval, session_gc, search_gc, cache_gc, warnings_gc)
|
2005-11-17 18:06:11 +00:00
|
|
|
*/
|
|
|
|
|
2007-10-05 14:36:34 +00:00
|
|
|
/**
|
|
|
|
* @ignore
|
|
|
|
*/
|
|
|
|
if (!defined('IN_PHPBB'))
|
|
|
|
{
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2005-11-17 18:06:11 +00:00
|
|
|
/**
|
|
|
|
* @package acp
|
|
|
|
*/
|
|
|
|
class acp_board
|
|
|
|
{
|
2006-02-18 13:54:12 +00:00
|
|
|
var $u_action;
|
2005-12-15 12:59:20 +00:00
|
|
|
var $new_config = array();
|
|
|
|
|
2005-11-17 18:06:11 +00:00
|
|
|
function main($id, $mode)
|
|
|
|
{
|
|
|
|
global $db, $user, $auth, $template;
|
2006-06-06 20:53:46 +00:00
|
|
|
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
2009-12-20 14:31:37 +00:00
|
|
|
global $cache;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
$user->add_lang('acp/board');
|
|
|
|
|
|
|
|
$action = request_var('action', '');
|
2010-02-15 15:04:44 +00:00
|
|
|
$submit = (isset($_POST['submit']) || isset($_POST['allow_quick_reply_enable'])) ? true : false;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2007-10-03 15:05:54 +00:00
|
|
|
$form_key = 'acp_board';
|
|
|
|
add_form_key($form_key);
|
|
|
|
|
2006-12-08 15:20:57 +00:00
|
|
|
/**
|
|
|
|
* Validation types are:
|
|
|
|
* string, int, bool,
|
|
|
|
* script_path (absolute path in url - beginning with / and no trailing slash),
|
2007-05-03 14:29:22 +00:00
|
|
|
* rpath (relative), rwpath (realtive, writable), path (relative path, but able to escape the root), wpath (writable)
|
2006-12-08 15:20:57 +00:00
|
|
|
*/
|
2005-11-17 18:06:11 +00:00
|
|
|
switch ($mode)
|
|
|
|
{
|
2006-04-15 18:51:00 +00:00
|
|
|
case 'settings':
|
2005-11-17 18:06:11 +00:00
|
|
|
$display_vars = array(
|
2006-04-15 18:51:00 +00:00
|
|
|
'title' => 'ACP_BOARD_SETTINGS',
|
2005-11-17 18:06:11 +00:00
|
|
|
'vars' => array(
|
2006-04-15 18:51:00 +00:00
|
|
|
'legend1' => 'ACP_BOARD_SETTINGS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'sitename' => array('lang' => 'SITE_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
|
|
|
|
'site_desc' => array('lang' => 'SITE_DESC', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
|
2012-07-22 22:26:38 -05:00
|
|
|
'site_home_url' => array('lang' => 'SITE_HOME_URL', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
|
|
|
|
'site_home_text' => array('lang' => 'SITE_HOME_TEXT', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
|
2006-09-15 14:08:48 +00:00
|
|
|
'board_disable' => array('lang' => 'DISABLE_BOARD', 'validate' => 'bool', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
|
2006-04-15 18:51:00 +00:00
|
|
|
'board_disable_msg' => false,
|
2007-06-24 13:57:02 +00:00
|
|
|
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'lang', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
|
2006-09-15 14:08:48 +00:00
|
|
|
'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'validate' => 'string', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
|
2012-07-17 16:09:05 +02:00
|
|
|
'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'timezone', 'type' => 'custom', 'method' => 'timezone_select', 'explain' => true),
|
2007-03-30 10:49:06 +00:00
|
|
|
'default_style' => array('lang' => 'DEFAULT_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => false),
|
2006-09-15 14:08:48 +00:00
|
|
|
'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2006-04-15 18:51:00 +00:00
|
|
|
|
|
|
|
'legend2' => 'WARNINGS',
|
2006-11-27 11:37:42 +00:00
|
|
|
'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
'legend3' => 'ACP_SUBMIT_CHANGES',
|
2006-04-15 18:51:00 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'features':
|
|
|
|
$display_vars = array(
|
|
|
|
'title' => 'ACP_BOARD_FEATURES',
|
|
|
|
'vars' => array(
|
|
|
|
'legend1' => 'ACP_BOARD_FEATURES',
|
2006-09-15 14:08:48 +00:00
|
|
|
'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2009-07-21 20:59:11 +00:00
|
|
|
'allow_pm_report' => array('lang' => 'ALLOW_PM_REPORT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2006-09-15 14:08:48 +00:00
|
|
|
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2007-07-19 20:38:38 +00:00
|
|
|
'allow_birthdays' => array('lang' => 'ALLOW_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2012-04-06 01:07:23 +05:30
|
|
|
'display_last_subject' => array('lang' => 'DISPLAY_LAST_SUBJECT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2010-02-15 15:04:44 +00:00
|
|
|
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
|
2006-07-09 16:23:57 +00:00
|
|
|
|
|
|
|
'legend2' => 'ACP_LOAD_SETTINGS',
|
2007-07-19 20:38:38 +00:00
|
|
|
'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2006-09-15 14:08:48 +00:00
|
|
|
'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2010-10-19 17:06:23 +02:00
|
|
|
'load_cpf_pm' => array('lang' => 'LOAD_CPF_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2006-09-15 14:08:48 +00:00
|
|
|
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
'legend3' => 'ACP_SUBMIT_CHANGES',
|
2005-11-17 18:06:11 +00:00
|
|
|
)
|
|
|
|
);
|
2005-12-15 13:07:56 +00:00
|
|
|
break;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
case 'avatar':
|
|
|
|
$display_vars = array(
|
|
|
|
'title' => 'ACP_AVATAR_SETTINGS',
|
|
|
|
'vars' => array(
|
|
|
|
'legend1' => 'ACP_AVATAR_SETTINGS',
|
2008-04-07 16:04:43 +00:00
|
|
|
|
2010-04-25 10:01:47 -04:00
|
|
|
'avatar_min_width' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
|
|
|
|
'avatar_min_height' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
|
|
|
|
'avatar_max_width' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
|
|
|
|
'avatar_max_height' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2009-06-19 22:03:19 +00:00
|
|
|
'allow_avatar' => array('lang' => 'ALLOW_AVATARS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2012-11-16 22:59:29 +01:00
|
|
|
'allow_avatar_gravatar' => array('lang' => 'ALLOW_GRAVATAR', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2006-09-15 14:08:48 +00:00
|
|
|
'allow_avatar_local' => array('lang' => 'ALLOW_LOCAL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2009-07-14 20:25:41 +00:00
|
|
|
'allow_avatar_remote_upload'=> array('lang' => 'ALLOW_REMOTE_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'validate' => 'int:0', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
|
|
|
|
'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
|
|
|
'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
2006-10-03 18:35:59 +00:00
|
|
|
'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'validate' => 'rwpath', 'type' => 'text:20:255', 'explain' => true),
|
2010-04-25 10:01:47 -04:00
|
|
|
'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
|
2005-11-17 18:06:11 +00:00
|
|
|
)
|
|
|
|
);
|
2005-12-15 13:07:56 +00:00
|
|
|
break;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2006-04-15 18:51:00 +00:00
|
|
|
case 'message':
|
2005-11-17 18:06:11 +00:00
|
|
|
$display_vars = array(
|
2006-04-15 18:51:00 +00:00
|
|
|
'title' => 'ACP_MESSAGE_SETTINGS',
|
|
|
|
'lang' => 'ucp',
|
2005-11-17 18:06:11 +00:00
|
|
|
'vars' => array(
|
2006-04-15 18:51:00 +00:00
|
|
|
'legend1' => 'GENERAL_SETTINGS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'pm_max_boxes' => array('lang' => 'BOXES_MAX', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
|
|
|
'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
2006-09-15 14:08:48 +00:00
|
|
|
'full_folder_action' => array('lang' => 'FULL_FOLDER_ACTION', 'validate' => 'int', 'type' => 'select', 'method' => 'full_folder_select', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
|
2008-09-23 13:03:33 +00:00
|
|
|
'pm_max_recipients' => array('lang' => 'PM_MAX_RECIPIENTS', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
|
One commit for those fixes having a very tiny impact (mostly only whitespaces or forgotten spans, etc.)
Although i somehow mistakingly got #20445 and #15249 into it. :/
Removing s_watching_img from watch_topic_forum() function (Bug #20445)
Changing order for post review if more than one post affected (Bug #15249)
Language typos/fixes (Bug #20425, #15719, #15429, #14669, #13479)
Style/Template fixes (Bug #20065, #19405, #19205, #15028, #14934, #14821, #14752, #14497, #13707, #14738)
Tiny code fixes (Bug #20165, #20025, #19795, #14804)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8350 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-30 16:01:15 +00:00
|
|
|
|
2006-04-15 18:51:00 +00:00
|
|
|
'legend2' => 'GENERAL_OPTIONS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'auth_bbcode_pm' => array('lang' => 'ALLOW_BBCODE_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'auth_smilies_pm' => array('lang' => 'ALLOW_SMILIES_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_sig_pm' => array('lang' => 'ALLOW_SIG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2007-06-07 17:41:42 +00:00
|
|
|
'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2009-06-12 14:41:03 +00:00
|
|
|
'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
|
|
|
|
'legend3' => 'ACP_SUBMIT_CHANGES',
|
2006-04-15 18:51:00 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
break;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2006-04-15 18:51:00 +00:00
|
|
|
case 'post':
|
|
|
|
$display_vars = array(
|
|
|
|
'title' => 'ACP_POST_SETTINGS',
|
|
|
|
'vars' => array(
|
|
|
|
'legend1' => 'GENERAL_OPTIONS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2007-06-07 17:41:42 +00:00
|
|
|
'allow_post_flash' => array('lang' => 'ALLOW_POST_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2006-09-15 14:08:48 +00:00
|
|
|
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_post_links' => array('lang' => 'ALLOW_POST_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'enable_post_confirm' => array('lang' => 'VISUAL_CONFIRM_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2010-02-16 10:42:24 +00:00
|
|
|
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2006-04-15 18:51:00 +00:00
|
|
|
'legend2' => 'POSTING',
|
|
|
|
'bump_type' => false,
|
2008-06-04 13:23:30 +00:00
|
|
|
'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
|
2009-08-31 14:57:04 +00:00
|
|
|
'delete_time' => array('lang' => 'DELETE_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
|
2008-06-04 13:23:30 +00:00
|
|
|
'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int:0', 'type' => 'text:3:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
|
|
|
|
'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int:0', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
|
|
|
|
'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
|
|
|
|
'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
|
2009-07-16 17:57:05 +00:00
|
|
|
'smilies_per_page' => array('lang' => 'SMILIES_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
|
2008-06-04 13:23:30 +00:00
|
|
|
'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true),
|
|
|
|
'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:2:127', 'type' => 'text:4:4', 'explain' => false),
|
|
|
|
'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
|
2011-10-14 15:19:47 +02:00
|
|
|
'min_post_chars' => array('lang' => 'MIN_CHAR_LIMIT', 'validate' => 'int:1', 'type' => 'text:4:6', 'explain' => true),
|
2008-06-04 13:23:30 +00:00
|
|
|
'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
|
|
|
'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
|
|
|
|
'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
|
|
|
|
'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
|
|
|
'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
|
|
|
'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
'legend3' => 'ACP_SUBMIT_CHANGES',
|
2005-11-17 18:06:11 +00:00
|
|
|
)
|
|
|
|
);
|
2005-12-15 13:07:56 +00:00
|
|
|
break;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2006-04-15 18:51:00 +00:00
|
|
|
case 'signature':
|
2005-11-17 18:06:11 +00:00
|
|
|
$display_vars = array(
|
2006-04-15 18:51:00 +00:00
|
|
|
'title' => 'ACP_SIGNATURE_SETTINGS',
|
2005-11-17 18:06:11 +00:00
|
|
|
'vars' => array(
|
2006-04-15 18:51:00 +00:00
|
|
|
'legend1' => 'GENERAL_OPTIONS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_sig_flash' => array('lang' => 'ALLOW_SIG_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_sig_links' => array('lang' => 'ALLOW_SIG_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2006-04-15 18:51:00 +00:00
|
|
|
|
|
|
|
'legend2' => 'GENERAL_SETTINGS',
|
2008-02-27 15:10:10 +00:00
|
|
|
'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
|
|
|
|
'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
|
|
|
|
'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
|
|
|
|
'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
|
|
|
|
'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
|
|
|
'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
'legend3' => 'ACP_SUBMIT_CHANGES',
|
2006-04-15 18:51:00 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'registration':
|
|
|
|
$display_vars = array(
|
|
|
|
'title' => 'ACP_REGISTER_SETTINGS',
|
|
|
|
'vars' => array(
|
|
|
|
'legend1' => 'GENERAL_SETTINGS',
|
2008-02-27 15:10:10 +00:00
|
|
|
'max_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:8:180', 'type' => false, 'method' => false, 'explain' => false,),
|
|
|
|
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
|
2006-04-15 18:51:00 +00:00
|
|
|
|
2011-07-16 08:22:29 -04:00
|
|
|
'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'select', 'method' => 'select_acc_activation', 'explain' => true),
|
2009-06-20 18:45:16 +00:00
|
|
|
'new_member_post_limit' => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'text:4:4', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']),
|
|
|
|
'new_member_group_default'=> array('lang' => 'NEW_MEMBER_GROUP_DEFAULT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2008-02-29 13:40:30 +00:00
|
|
|
'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:1', 'type' => 'custom:5:180', 'method' => 'username_length', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
|
2006-09-15 14:08:48 +00:00
|
|
|
'allow_name_chars' => array('lang' => 'USERNAME_CHARS', 'validate' => 'string', 'type' => 'select', 'method' => 'select_username_chars', 'explain' => true),
|
|
|
|
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
'legend2' => 'GENERAL_OPTIONS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'allow_emailreuse' => array('lang' => 'ALLOW_EMAIL_REUSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'enable_confirm' => array('lang' => 'VISUAL_CONFIRM_REG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
|
|
|
|
'max_reg_attempts' => array('lang' => 'REG_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
2006-04-15 18:51:00 +00:00
|
|
|
|
|
|
|
'legend3' => 'COPPA',
|
2006-09-15 14:08:48 +00:00
|
|
|
'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'coppa_mail' => array('lang' => 'COPPA_MAIL', 'validate' => 'string', 'type' => 'textarea:5:40', 'explain' => true),
|
|
|
|
'coppa_fax' => array('lang' => 'COPPA_FAX', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => false),
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
'legend4' => 'ACP_SUBMIT_CHANGES',
|
|
|
|
)
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'feed':
|
|
|
|
$display_vars = array(
|
|
|
|
'title' => 'ACP_FEED_MANAGEMENT',
|
|
|
|
'vars' => array(
|
|
|
|
'legend1' => 'ACP_FEED_GENERAL',
|
|
|
|
'feed_enable' => array('lang' => 'ACP_FEED_ENABLE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
|
|
|
'feed_item_statistics' => array('lang' => 'ACP_FEED_ITEM_STATISTICS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
|
2010-01-19 19:08:51 +00:00
|
|
|
'feed_http_auth' => array('lang' => 'ACP_FEED_HTTP_AUTH', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
|
2009-12-23 03:26:38 +00:00
|
|
|
|
|
|
|
'legend2' => 'ACP_FEED_POST_BASED',
|
|
|
|
'feed_limit_post' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
|
2009-12-22 19:21:41 +00:00
|
|
|
'feed_overall' => array('lang' => 'ACP_FEED_OVERALL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
2009-06-12 14:41:03 +00:00
|
|
|
'feed_forum' => array('lang' => 'ACP_FEED_FORUM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
|
|
|
'feed_topic' => array('lang' => 'ACP_FEED_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
2009-12-23 03:26:38 +00:00
|
|
|
|
|
|
|
'legend3' => 'ACP_FEED_TOPIC_BASED',
|
|
|
|
'feed_limit_topic' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
|
2009-12-27 00:48:52 +00:00
|
|
|
'feed_topics_new' => array('lang' => 'ACP_FEED_TOPICS_NEW', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
|
|
|
'feed_topics_active' => array('lang' => 'ACP_FEED_TOPICS_ACTIVE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
2009-08-12 15:00:47 +00:00
|
|
|
'feed_news_id' => array('lang' => 'ACP_FEED_NEWS', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_news_forums', 'explain' => true),
|
2009-12-23 03:26:38 +00:00
|
|
|
|
|
|
|
'legend4' => 'ACP_FEED_SETTINGS_OTHER',
|
|
|
|
'feed_overall_forums' => array('lang' => 'ACP_FEED_OVERALL_FORUMS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
2009-08-12 15:00:47 +00:00
|
|
|
'feed_exclude_id' => array('lang' => 'ACP_FEED_EXCLUDE_ID', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_exclude_forums', 'explain' => true),
|
2006-04-15 18:51:00 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'cookie':
|
|
|
|
$display_vars = array(
|
|
|
|
'title' => 'ACP_COOKIE_SETTINGS',
|
|
|
|
'vars' => array(
|
|
|
|
'legend1' => 'ACP_COOKIE_SETTINGS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'cookie_domain' => array('lang' => 'COOKIE_DOMAIN', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
|
|
|
|
'cookie_name' => array('lang' => 'COOKIE_NAME', 'validate' => 'string', 'type' => 'text::16', 'explain' => false),
|
|
|
|
'cookie_path' => array('lang' => 'COOKIE_PATH', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
|
2010-04-25 10:01:47 -04:00
|
|
|
'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'validate' => 'bool', 'type' => 'radio:disabled_enabled', 'explain' => true),
|
2005-11-17 18:06:11 +00:00
|
|
|
)
|
|
|
|
);
|
2005-12-15 13:07:56 +00:00
|
|
|
break;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
case 'load':
|
|
|
|
$display_vars = array(
|
|
|
|
'title' => 'ACP_LOAD_SETTINGS',
|
|
|
|
'vars' => array(
|
|
|
|
'legend1' => 'GENERAL_SETTINGS',
|
2007-03-23 12:18:09 +00:00
|
|
|
'limit_load' => array('lang' => 'LIMIT_LOAD', 'validate' => 'string', 'type' => 'text:4:4', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'session_length' => array('lang' => 'SESSION_LENGTH', 'validate' => 'int:60', 'type' => 'text:5:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
|
|
|
|
'active_sessions' => array('lang' => 'LIMIT_SESSIONS', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
|
|
|
'load_online_time' => array('lang' => 'ONLINE_LENGTH', 'validate' => 'int:0', 'type' => 'text:4:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2006-03-13 18:05:12 +00:00
|
|
|
'legend2' => 'GENERAL_OPTIONS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'load_db_track' => array('lang' => 'YES_POST_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'load_db_lastread' => array('lang' => 'YES_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'load_anon_lastread' => array('lang' => 'YES_ANON_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'load_online' => array('lang' => 'YES_ONLINE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'load_online_guests' => array('lang' => 'YES_ONLINE_GUESTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'load_onlinetrack' => array('lang' => 'YES_ONLINE_TRACK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2007-07-19 20:38:38 +00:00
|
|
|
'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2010-08-29 16:50:57 +02:00
|
|
|
'load_unreads_search' => array('lang' => 'YES_UNREAD_SEARCH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2006-09-15 14:08:48 +00:00
|
|
|
'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2012-04-10 15:19:26 -07:00
|
|
|
'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'load_jquery_cdn' => array('lang' => 'LOAD_JQUERY_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
One commit for those fixes having a very tiny impact (mostly only whitespaces or forgotten spans, etc.)
Although i somehow mistakingly got #20445 and #15249 into it. :/
Removing s_watching_img from watch_topic_forum() function (Bug #20445)
Changing order for post review if more than one post affected (Bug #15249)
Language typos/fixes (Bug #20425, #15719, #15429, #14669, #13479)
Style/Template fixes (Bug #20065, #19405, #19205, #15028, #14934, #14821, #14752, #14497, #13707, #14738)
Tiny code fixes (Bug #20165, #20025, #19795, #14804)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8350 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-30 16:01:15 +00:00
|
|
|
|
2006-03-25 14:16:17 +00:00
|
|
|
'legend3' => 'CUSTOM_PROFILE_FIELDS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2010-10-19 17:06:23 +02:00
|
|
|
'load_cpf_pm' => array('lang' => 'LOAD_CPF_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2006-09-15 14:08:48 +00:00
|
|
|
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
|
|
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
'legend4' => 'ACP_SUBMIT_CHANGES',
|
2005-11-17 18:06:11 +00:00
|
|
|
)
|
|
|
|
);
|
2005-12-15 13:07:56 +00:00
|
|
|
break;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
case 'auth':
|
|
|
|
$display_vars = array(
|
|
|
|
'title' => 'ACP_AUTH_SETTINGS',
|
|
|
|
'vars' => array(
|
|
|
|
'legend1' => 'ACP_AUTH_SETTINGS',
|
2010-04-25 10:01:47 -04:00
|
|
|
'auth_method' => array('lang' => 'AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'select_auth_method', 'explain' => false),
|
2005-11-17 18:06:11 +00:00
|
|
|
)
|
|
|
|
);
|
2005-12-15 13:07:56 +00:00
|
|
|
break;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
case 'server':
|
|
|
|
$display_vars = array(
|
|
|
|
'title' => 'ACP_SERVER_SETTINGS',
|
|
|
|
'vars' => array(
|
2005-12-15 13:07:56 +00:00
|
|
|
'legend1' => 'ACP_SERVER_SETTINGS',
|
2007-02-25 23:30:18 +00:00
|
|
|
'gzip_compress' => array('lang' => 'ENABLE_GZIP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2010-04-25 11:07:10 -04:00
|
|
|
'use_system_cron' => array('lang' => 'USE_SYSTEM_CRON', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2005-12-15 13:07:56 +00:00
|
|
|
'legend2' => 'PATH_SETTINGS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'smilies_path' => array('lang' => 'SMILIES_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
|
|
|
|
'icons_path' => array('lang' => 'ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
|
2006-10-03 18:35:59 +00:00
|
|
|
'upload_icons_path' => array('lang' => 'UPLOAD_ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
|
2006-09-15 14:08:48 +00:00
|
|
|
'ranks_path' => array('lang' => 'RANKS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
|
2006-03-01 21:48:02 +00:00
|
|
|
|
|
|
|
'legend3' => 'SERVER_URL_SETTINGS',
|
2006-12-08 15:20:57 +00:00
|
|
|
'force_server_vars' => array('lang' => 'FORCE_SERVER_VARS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'validate' => 'string', 'type' => 'text:10:10', 'explain' => true),
|
|
|
|
'server_name' => array('lang' => 'SERVER_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'server_port' => array('lang' => 'SERVER_PORT', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
|
2006-12-08 15:20:57 +00:00
|
|
|
'script_path' => array('lang' => 'SCRIPT_PATH', 'validate' => 'script_path', 'type' => 'text::255', 'explain' => true),
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
'legend4' => 'ACP_SUBMIT_CHANGES',
|
2006-04-15 18:51:00 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'security':
|
|
|
|
$display_vars = array(
|
|
|
|
'title' => 'ACP_SECURITY_SETTINGS',
|
|
|
|
'vars' => array(
|
|
|
|
'legend1' => 'ACP_SECURITY_SETTINGS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
|
2006-09-15 14:08:48 +00:00
|
|
|
'ip_check' => array('lang' => 'IP_VALID', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
|
|
|
|
'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2006-12-10 20:13:46 +00:00
|
|
|
'forwarded_for_check' => array('lang' => 'FORWARDED_FOR_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2008-05-15 13:29:14 +00:00
|
|
|
'referer_validation' => array('lang' => 'REFERER_VALID', 'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true),
|
2006-09-28 15:04:59 +00:00
|
|
|
'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2010-06-25 15:19:10 +02:00
|
|
|
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
|
|
|
|
'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
|
2006-09-15 14:08:48 +00:00
|
|
|
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
|
|
|
|
'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
|
2011-06-10 12:02:59 +02:00
|
|
|
'ip_login_limit_max' => array('lang' => 'IP_LOGIN_LIMIT_MAX', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
|
2011-06-16 16:02:34 +02:00
|
|
|
'ip_login_limit_time' => array('lang' => 'IP_LOGIN_LIMIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
|
2011-06-10 12:02:59 +02:00
|
|
|
'ip_login_limit_use_forwarded' => array('lang' => 'IP_LOGIN_LIMIT_USE_FORWARDED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2006-09-15 14:08:48 +00:00
|
|
|
'tpl_allow_php' => array('lang' => 'TPL_ALLOW_PHP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'form_token_lifetime' => array('lang' => 'FORM_TIME_MAX', 'validate' => 'int:-1', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
|
2007-10-09 11:21:08 +00:00
|
|
|
'form_token_sid_guests' => array('lang' => 'FORM_SID_GUESTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
|
2005-11-17 18:06:11 +00:00
|
|
|
)
|
|
|
|
);
|
2005-12-15 13:07:56 +00:00
|
|
|
break;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
case 'email':
|
|
|
|
$display_vars = array(
|
|
|
|
'title' => 'ACP_EMAIL_SETTINGS',
|
|
|
|
'vars' => array(
|
|
|
|
'legend1' => 'GENERAL_SETTINGS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'email_enable' => array('lang' => 'ENABLE_EMAIL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
|
|
|
|
'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
|
|
|
|
'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'validate' => 'string', 'type' => 'text:20:50', 'explain' => true),
|
2008-02-27 15:10:10 +00:00
|
|
|
'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
|
2006-09-15 14:08:48 +00:00
|
|
|
'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true),
|
|
|
|
'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true),
|
|
|
|
'board_email_sig' => array('lang' => 'EMAIL_SIG', 'validate' => 'string', 'type' => 'textarea:5:30', 'explain' => true),
|
|
|
|
'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
2006-06-06 20:53:46 +00:00
|
|
|
|
2005-11-17 18:06:11 +00:00
|
|
|
'legend2' => 'SMTP_SETTINGS',
|
2006-09-15 14:08:48 +00:00
|
|
|
'smtp_delivery' => array('lang' => 'USE_SMTP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
|
|
'smtp_host' => array('lang' => 'SMTP_SERVER', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => false),
|
2008-02-27 15:10:10 +00:00
|
|
|
'smtp_port' => array('lang' => 'SMTP_PORT', 'validate' => 'int:0', 'type' => 'text:4:5', 'explain' => true),
|
2006-09-15 14:08:48 +00:00
|
|
|
'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
|
|
|
|
'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),
|
2009-06-12 14:41:03 +00:00
|
|
|
'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'validate' => 'string', 'type' => 'password:25:255', 'explain' => true),
|
|
|
|
|
|
|
|
'legend3' => 'ACP_SUBMIT_CHANGES',
|
2005-11-17 18:06:11 +00:00
|
|
|
)
|
|
|
|
);
|
2005-12-15 13:07:56 +00:00
|
|
|
break;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
default:
|
2006-08-28 15:50:33 +00:00
|
|
|
trigger_error('NO_MODE', E_USER_ERROR);
|
|
|
|
break;
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($display_vars['lang']))
|
|
|
|
{
|
|
|
|
$user->add_lang($display_vars['lang']);
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->new_config = $config;
|
2006-11-15 15:35:50 +00:00
|
|
|
$cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config;
|
2006-09-15 14:08:48 +00:00
|
|
|
$error = array();
|
|
|
|
|
2010-05-20 00:38:14 +02:00
|
|
|
// We validate the complete config if wished
|
2006-09-15 14:08:48 +00:00
|
|
|
validate_config_vars($display_vars['vars'], $cfg_array, $error);
|
|
|
|
|
2007-10-03 15:05:54 +00:00
|
|
|
if ($submit && !check_form_key($form_key))
|
|
|
|
{
|
|
|
|
$error[] = $user->lang['FORM_INVALID'];
|
|
|
|
}
|
2006-09-15 14:08:48 +00:00
|
|
|
// Do not write values if there is an error
|
|
|
|
if (sizeof($error))
|
|
|
|
{
|
|
|
|
$submit = false;
|
|
|
|
}
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
|
|
|
|
foreach ($display_vars['vars'] as $config_name => $null)
|
|
|
|
{
|
2009-08-12 15:00:47 +00:00
|
|
|
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
|
2005-11-17 18:06:11 +00:00
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2009-08-12 15:00:47 +00:00
|
|
|
if ($config_name == 'auth_method' || $config_name == 'feed_news_id' || $config_name == 'feed_exclude_id')
|
2006-03-18 16:19:18 +00:00
|
|
|
{
|
|
|
|
continue;
|
2009-08-10 11:17:24 +00:00
|
|
|
}
|
|
|
|
|
2006-05-12 20:52:58 +00:00
|
|
|
$this->new_config[$config_name] = $config_value = $cfg_array[$config_name];
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
if ($config_name == 'email_function_name')
|
|
|
|
{
|
2005-12-17 22:16:37 +00:00
|
|
|
$this->new_config['email_function_name'] = trim(str_replace(array('(', ')'), array('', ''), $this->new_config['email_function_name']));
|
|
|
|
$this->new_config['email_function_name'] = (empty($this->new_config['email_function_name']) || !function_exists($this->new_config['email_function_name'])) ? 'mail' : $this->new_config['email_function_name'];
|
2006-05-12 20:52:58 +00:00
|
|
|
$config_value = $this->new_config['email_function_name'];
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($submit)
|
|
|
|
{
|
|
|
|
set_config($config_name, $config_value);
|
2010-02-15 15:04:44 +00:00
|
|
|
|
|
|
|
if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
|
|
|
|
{
|
|
|
|
enable_bitfield_column_flag(FORUMS_TABLE, 'forum_flags', log(FORUM_FLAG_QUICK_REPLY, 2));
|
|
|
|
}
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-08-12 15:00:47 +00:00
|
|
|
// Store news and exclude ids
|
|
|
|
if ($mode == 'feed' && $submit)
|
|
|
|
{
|
2009-12-20 14:31:37 +00:00
|
|
|
$cache->destroy('_feed_news_forum_ids');
|
|
|
|
$cache->destroy('_feed_excluded_forum_ids');
|
|
|
|
|
2009-08-12 15:00:47 +00:00
|
|
|
$this->store_feed_forums(FORUM_OPTION_FEED_NEWS, 'feed_news_id');
|
|
|
|
$this->store_feed_forums(FORUM_OPTION_FEED_EXCLUDE, 'feed_exclude_id');
|
|
|
|
}
|
|
|
|
|
2005-12-16 19:05:51 +00:00
|
|
|
if ($mode == 'auth')
|
|
|
|
{
|
|
|
|
// Retrieve a list of auth plugins and check their config values
|
|
|
|
$auth_plugins = array();
|
|
|
|
|
2007-01-20 17:58:27 +00:00
|
|
|
$dp = @opendir($phpbb_root_path . 'includes/auth');
|
|
|
|
|
|
|
|
if ($dp)
|
2005-12-16 19:05:51 +00:00
|
|
|
{
|
2007-01-20 17:58:27 +00:00
|
|
|
while (($file = readdir($dp)) !== false)
|
2005-12-16 19:05:51 +00:00
|
|
|
{
|
2007-01-20 17:58:27 +00:00
|
|
|
if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
|
|
|
|
{
|
2007-09-22 13:33:05 +00:00
|
|
|
$auth_plugins[] = basename(preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file));
|
2007-01-20 17:58:27 +00:00
|
|
|
}
|
2005-12-16 19:05:51 +00:00
|
|
|
}
|
2007-01-20 17:58:27 +00:00
|
|
|
closedir($dp);
|
2005-12-16 19:05:51 +00:00
|
|
|
|
2007-01-20 17:58:27 +00:00
|
|
|
sort($auth_plugins);
|
|
|
|
}
|
2005-12-16 19:05:51 +00:00
|
|
|
|
2006-03-18 16:19:18 +00:00
|
|
|
$updated_auth_settings = false;
|
|
|
|
$old_auth_config = array();
|
2005-12-16 19:05:51 +00:00
|
|
|
foreach ($auth_plugins as $method)
|
|
|
|
{
|
|
|
|
if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
|
|
|
|
{
|
|
|
|
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
|
|
|
|
2006-07-07 12:36:44 +00:00
|
|
|
$method = 'acp_' . $method;
|
2005-12-16 19:05:51 +00:00
|
|
|
if (function_exists($method))
|
|
|
|
{
|
|
|
|
if ($fields = $method($this->new_config))
|
|
|
|
{
|
|
|
|
// Check if we need to create config fields for this plugin and save config when submit was pressed
|
|
|
|
foreach ($fields['config'] as $field)
|
|
|
|
{
|
|
|
|
if (!isset($config[$field]))
|
|
|
|
{
|
|
|
|
set_config($field, '');
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2006-03-18 16:19:18 +00:00
|
|
|
$old_auth_config[$field] = $this->new_config[$field];
|
2005-12-16 19:05:51 +00:00
|
|
|
$config_value = $cfg_array[$field];
|
|
|
|
$this->new_config[$field] = $config_value;
|
|
|
|
|
|
|
|
if ($submit)
|
|
|
|
{
|
2006-03-18 16:19:18 +00:00
|
|
|
$updated_auth_settings = true;
|
2005-12-16 19:05:51 +00:00
|
|
|
set_config($field, $config_value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
unset($fields);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2006-03-18 16:19:18 +00:00
|
|
|
|
|
|
|
if ($submit && (($cfg_array['auth_method'] != $this->new_config['auth_method']) || $updated_auth_settings))
|
|
|
|
{
|
2007-09-22 13:33:05 +00:00
|
|
|
$method = basename($cfg_array['auth_method']);
|
2006-03-18 16:19:18 +00:00
|
|
|
if ($method && in_array($method, $auth_plugins))
|
|
|
|
{
|
|
|
|
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
|
|
|
|
|
|
|
$method = 'init_' . $method;
|
|
|
|
if (function_exists($method))
|
|
|
|
{
|
2006-03-18 16:45:29 +00:00
|
|
|
if ($error = $method())
|
2006-03-18 16:19:18 +00:00
|
|
|
{
|
|
|
|
foreach ($old_auth_config as $config_name => $config_value)
|
|
|
|
{
|
|
|
|
set_config($config_name, $config_value);
|
|
|
|
}
|
2006-08-28 15:50:33 +00:00
|
|
|
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
|
2006-03-18 16:19:18 +00:00
|
|
|
}
|
|
|
|
}
|
2007-09-22 13:33:05 +00:00
|
|
|
set_config('auth_method', basename($cfg_array['auth_method']));
|
2006-03-18 16:19:18 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-08-28 15:50:33 +00:00
|
|
|
trigger_error('NO_AUTH_PLUGIN', E_USER_ERROR);
|
2006-03-18 16:19:18 +00:00
|
|
|
}
|
|
|
|
}
|
2005-12-16 19:05:51 +00:00
|
|
|
}
|
|
|
|
|
2005-11-17 18:06:11 +00:00
|
|
|
if ($submit)
|
|
|
|
{
|
2005-11-20 18:58:34 +00:00
|
|
|
add_log('admin', 'LOG_CONFIG_' . strtoupper($mode));
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2006-02-18 13:54:12 +00:00
|
|
|
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$this->tpl_name = 'acp_board';
|
2005-11-20 18:58:34 +00:00
|
|
|
$this->page_title = $display_vars['title'];
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
$template->assign_vars(array(
|
|
|
|
'L_TITLE' => $user->lang[$display_vars['title']],
|
|
|
|
'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'],
|
2006-09-15 14:08:48 +00:00
|
|
|
|
|
|
|
'S_ERROR' => (sizeof($error)) ? true : false,
|
|
|
|
'ERROR_MSG' => implode('<br />', $error),
|
|
|
|
|
2006-02-18 13:54:12 +00:00
|
|
|
'U_ACTION' => $this->u_action)
|
2005-11-17 18:06:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
// Output relevant page
|
|
|
|
foreach ($display_vars['vars'] as $config_key => $vars)
|
|
|
|
{
|
|
|
|
if (!is_array($vars) && strpos($config_key, 'legend') === false)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strpos($config_key, 'legend') !== false)
|
|
|
|
{
|
|
|
|
$template->assign_block_vars('options', array(
|
|
|
|
'S_LEGEND' => true,
|
2006-05-12 20:52:58 +00:00
|
|
|
'LEGEND' => (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars)
|
2005-11-17 18:06:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
$type = explode(':', $vars['type']);
|
|
|
|
|
2006-05-12 20:52:58 +00:00
|
|
|
$l_explain = '';
|
|
|
|
if ($vars['explain'] && isset($vars['lang_explain']))
|
|
|
|
{
|
|
|
|
$l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain'];
|
|
|
|
}
|
|
|
|
else if ($vars['explain'])
|
|
|
|
{
|
|
|
|
$l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
|
|
|
|
}
|
2008-09-02 06:34:27 +00:00
|
|
|
|
2008-02-29 13:40:30 +00:00
|
|
|
$content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);
|
2008-09-02 06:34:27 +00:00
|
|
|
|
2008-02-29 13:40:30 +00:00
|
|
|
if (empty($content))
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
2008-09-02 06:34:27 +00:00
|
|
|
|
2005-11-17 18:06:11 +00:00
|
|
|
$template->assign_block_vars('options', array(
|
|
|
|
'KEY' => $config_key,
|
2006-05-12 20:52:58 +00:00
|
|
|
'TITLE' => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
|
2005-11-17 18:06:11 +00:00
|
|
|
'S_EXPLAIN' => $vars['explain'],
|
2006-05-12 20:52:58 +00:00
|
|
|
'TITLE_EXPLAIN' => $l_explain,
|
2008-04-08 12:15:28 +00:00
|
|
|
'CONTENT' => $content,
|
2005-11-17 18:06:11 +00:00
|
|
|
)
|
|
|
|
);
|
One commit for those fixes having a very tiny impact (mostly only whitespaces or forgotten spans, etc.)
Although i somehow mistakingly got #20445 and #15249 into it. :/
Removing s_watching_img from watch_topic_forum() function (Bug #20445)
Changing order for post review if more than one post affected (Bug #15249)
Language typos/fixes (Bug #20425, #15719, #15429, #14669, #13479)
Style/Template fixes (Bug #20065, #19405, #19205, #15028, #14934, #14821, #14752, #14497, #13707, #14738)
Tiny code fixes (Bug #20165, #20025, #19795, #14804)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8350 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-30 16:01:15 +00:00
|
|
|
|
2005-11-17 18:06:11 +00:00
|
|
|
unset($display_vars['vars'][$config_key]);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($mode == 'auth')
|
|
|
|
{
|
|
|
|
$template->assign_var('S_AUTH', true);
|
|
|
|
|
|
|
|
foreach ($auth_plugins as $method)
|
|
|
|
{
|
|
|
|
if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
|
|
|
|
{
|
2006-07-07 12:36:44 +00:00
|
|
|
$method = 'acp_' . $method;
|
2005-11-17 18:06:11 +00:00
|
|
|
if (function_exists($method))
|
|
|
|
{
|
2005-12-16 19:05:51 +00:00
|
|
|
$fields = $method($this->new_config);
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
if ($fields['tpl'])
|
|
|
|
{
|
|
|
|
$template->assign_block_vars('auth_tpl', array(
|
|
|
|
'TPL' => $fields['tpl'])
|
|
|
|
);
|
|
|
|
}
|
|
|
|
unset($fields);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Select auth method
|
|
|
|
*/
|
2005-11-17 18:06:11 +00:00
|
|
|
function select_auth_method($selected_method, $key = '')
|
|
|
|
{
|
2005-12-15 12:59:20 +00:00
|
|
|
global $phpbb_root_path, $phpEx;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
$auth_plugins = array();
|
|
|
|
|
2007-01-20 17:58:27 +00:00
|
|
|
$dp = @opendir($phpbb_root_path . 'includes/auth');
|
|
|
|
|
|
|
|
if (!$dp)
|
|
|
|
{
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
2006-03-01 00:02:31 +00:00
|
|
|
while (($file = readdir($dp)) !== false)
|
2005-11-17 18:06:11 +00:00
|
|
|
{
|
|
|
|
if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
|
|
|
|
{
|
|
|
|
$auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);
|
|
|
|
}
|
|
|
|
}
|
2007-01-20 17:58:27 +00:00
|
|
|
closedir($dp);
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
sort($auth_plugins);
|
|
|
|
|
|
|
|
$auth_select = '';
|
|
|
|
foreach ($auth_plugins as $method)
|
|
|
|
{
|
|
|
|
$selected = ($selected_method == $method) ? ' selected="selected"' : '';
|
|
|
|
$auth_select .= '<option value="' . $method . '"' . $selected . '>' . ucfirst($method) . '</option>';
|
|
|
|
}
|
|
|
|
|
|
|
|
return $auth_select;
|
|
|
|
}
|
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Select mail authentication method
|
|
|
|
*/
|
2005-11-17 18:06:11 +00:00
|
|
|
function mail_auth_select($selected_method, $key = '')
|
|
|
|
{
|
|
|
|
global $user;
|
|
|
|
|
|
|
|
$auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP');
|
|
|
|
$s_smtp_auth_options = '';
|
|
|
|
|
|
|
|
foreach ($auth_methods as $method)
|
|
|
|
{
|
|
|
|
$s_smtp_auth_options .= '<option value="' . $method . '"' . (($selected_method == $method) ? ' selected="selected"' : '') . '>' . $user->lang['SMTP_' . str_replace('-', '_', $method)] . '</option>';
|
|
|
|
}
|
|
|
|
|
|
|
|
return $s_smtp_auth_options;
|
|
|
|
}
|
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Select full folder action
|
|
|
|
*/
|
2005-11-17 18:06:11 +00:00
|
|
|
function full_folder_select($value, $key = '')
|
|
|
|
{
|
|
|
|
global $user;
|
|
|
|
|
2006-05-12 20:52:58 +00:00
|
|
|
return '<option value="1"' . (($value == 1) ? ' selected="selected"' : '') . '>' . $user->lang['DELETE_OLDEST_MESSAGES'] . '</option><option value="2"' . (($value == 2) ? ' selected="selected"' : '') . '>' . $user->lang['HOLD_NEW_MESSAGES_SHORT'] . '</option>';
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Select ip validation
|
|
|
|
*/
|
2005-11-17 18:06:11 +00:00
|
|
|
function select_ip_check($value, $key = '')
|
|
|
|
{
|
2006-08-06 17:25:29 +00:00
|
|
|
$radio_ary = array(4 => 'ALL', 3 => 'CLASS_C', 2 => 'CLASS_B', 0 => 'NO_IP_VALIDATION');
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
return h_radio('config[ip_check]', $radio_ary, $value, $key);
|
|
|
|
}
|
2008-09-02 06:34:27 +00:00
|
|
|
|
2008-05-15 13:29:14 +00:00
|
|
|
/**
|
|
|
|
* Select referer validation
|
|
|
|
*/
|
|
|
|
function select_ref_check($value, $key = '')
|
|
|
|
{
|
|
|
|
$radio_ary = array(REFERER_VALIDATE_PATH => 'REF_PATH', REFERER_VALIDATE_HOST => 'REF_HOST', REFERER_VALIDATE_NONE => 'NO_REF_VALIDATION');
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2008-05-15 13:29:14 +00:00
|
|
|
return h_radio('config[referer_validation]', $radio_ary, $value, $key);
|
|
|
|
}
|
2008-09-02 06:34:27 +00:00
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Select account activation method
|
|
|
|
*/
|
2011-07-16 08:22:29 -04:00
|
|
|
function select_acc_activation($selected_value, $value)
|
2005-11-17 18:06:11 +00:00
|
|
|
{
|
|
|
|
global $user, $config;
|
|
|
|
|
2011-07-16 08:22:29 -04:00
|
|
|
$act_ary = array(
|
|
|
|
'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
|
|
|
|
'ACC_NONE' => USER_ACTIVATION_NONE,
|
2011-06-05 09:52:17 +02:00
|
|
|
);
|
2005-11-17 18:06:11 +00:00
|
|
|
if ($config['email_enable'])
|
|
|
|
{
|
2011-07-16 08:22:29 -04:00
|
|
|
$act_ary['ACC_USER'] = USER_ACTIVATION_SELF;
|
|
|
|
$act_ary['ACC_ADMIN'] = USER_ACTIVATION_ADMIN;
|
|
|
|
}
|
|
|
|
$act_options = '';
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2011-07-16 08:22:29 -04:00
|
|
|
foreach ($act_ary as $key => $value)
|
|
|
|
{
|
|
|
|
$selected = ($selected_value == $value) ? ' selected="selected"' : '';
|
|
|
|
$act_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$key] . '</option>';
|
|
|
|
}
|
2011-06-05 09:52:17 +02:00
|
|
|
|
2011-07-16 08:22:29 -04:00
|
|
|
return $act_options;
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Maximum/Minimum username length
|
|
|
|
*/
|
2005-11-17 18:06:11 +00:00
|
|
|
function username_length($value, $key = '')
|
|
|
|
{
|
2005-12-15 12:59:20 +00:00
|
|
|
global $user;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2005-12-15 12:59:20 +00:00
|
|
|
return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="text" size="3" maxlength="3" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Allowed chars in usernames
|
|
|
|
*/
|
2005-11-17 18:06:11 +00:00
|
|
|
function select_username_chars($selected_value, $key)
|
|
|
|
{
|
|
|
|
global $user;
|
|
|
|
|
2007-04-19 20:59:52 +00:00
|
|
|
$user_char_ary = array('USERNAME_CHARS_ANY', 'USERNAME_ALPHA_ONLY', 'USERNAME_ALPHA_SPACERS', 'USERNAME_LETTER_NUM', 'USERNAME_LETTER_NUM_SPACERS', 'USERNAME_ASCII');
|
2005-11-17 18:06:11 +00:00
|
|
|
$user_char_options = '';
|
2007-04-19 20:59:52 +00:00
|
|
|
foreach ($user_char_ary as $user_type)
|
2005-11-17 18:06:11 +00:00
|
|
|
{
|
2007-04-19 20:59:52 +00:00
|
|
|
$selected = ($selected_value == $user_type) ? ' selected="selected"' : '';
|
|
|
|
$user_char_options .= '<option value="' . $user_type . '"' . $selected . '>' . $user->lang[$user_type] . '</option>';
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return $user_char_options;
|
|
|
|
}
|
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Maximum/Minimum password length
|
|
|
|
*/
|
2005-11-17 18:06:11 +00:00
|
|
|
function password_length($value, $key)
|
|
|
|
{
|
2005-12-15 12:59:20 +00:00
|
|
|
global $user;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
2005-12-15 12:59:20 +00:00
|
|
|
return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="text" size="3" maxlength="3" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Required chars in passwords
|
|
|
|
*/
|
2005-11-17 18:06:11 +00:00
|
|
|
function select_password_chars($selected_value, $key)
|
|
|
|
{
|
|
|
|
global $user;
|
|
|
|
|
2006-12-27 00:06:39 +00:00
|
|
|
$pass_type_ary = array('PASS_TYPE_ANY', 'PASS_TYPE_CASE', 'PASS_TYPE_ALPHA', 'PASS_TYPE_SYMBOL');
|
2005-11-17 18:06:11 +00:00
|
|
|
$pass_char_options = '';
|
2006-12-27 00:06:39 +00:00
|
|
|
foreach ($pass_type_ary as $pass_type)
|
2005-11-17 18:06:11 +00:00
|
|
|
{
|
2006-12-27 00:06:39 +00:00
|
|
|
$selected = ($selected_value == $pass_type) ? ' selected="selected"' : '';
|
|
|
|
$pass_char_options .= '<option value="' . $pass_type . '"' . $selected . '>' . $user->lang[$pass_type] . '</option>';
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return $pass_char_options;
|
|
|
|
}
|
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Select bump interval
|
|
|
|
*/
|
2005-11-17 18:06:11 +00:00
|
|
|
function bump_interval($value, $key)
|
|
|
|
{
|
2005-12-15 12:59:20 +00:00
|
|
|
global $user;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
$s_bump_type = '';
|
|
|
|
$types = array('m' => 'MINUTES', 'h' => 'HOURS', 'd' => 'DAYS');
|
|
|
|
foreach ($types as $type => $lang)
|
|
|
|
{
|
2005-12-15 12:59:20 +00:00
|
|
|
$selected = ($this->new_config['bump_type'] == $type) ? ' selected="selected"' : '';
|
|
|
|
$s_bump_type .= '<option value="' . $type . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return '<input id="' . $key . '" type="text" size="3" maxlength="4" name="config[bump_interval]" value="' . $value . '" /> <select name="config[bump_type]">' . $s_bump_type . '</select>';
|
|
|
|
}
|
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Board disable option and message
|
|
|
|
*/
|
2005-11-17 18:06:11 +00:00
|
|
|
function board_disable($value, $key)
|
|
|
|
{
|
2005-12-15 12:59:20 +00:00
|
|
|
global $user;
|
2005-11-17 18:06:11 +00:00
|
|
|
|
|
|
|
$radio_ary = array(1 => 'YES', 0 => 'NO');
|
|
|
|
|
2005-12-15 12:59:20 +00:00
|
|
|
return h_radio('config[board_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $this->new_config['board_disable_msg'] . '" />';
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|
2006-06-11 19:32:17 +00:00
|
|
|
|
2010-02-15 15:04:44 +00:00
|
|
|
/**
|
|
|
|
* Global quick reply enable/disable setting and button to enable in all forums
|
|
|
|
*/
|
|
|
|
function quick_reply($value, $key)
|
|
|
|
{
|
|
|
|
global $user;
|
|
|
|
|
|
|
|
$radio_ary = array(1 => 'YES', 0 => 'NO');
|
|
|
|
|
|
|
|
return h_radio('config[allow_quick_reply]', $radio_ary, $value) .
|
|
|
|
'<br /><br /><input class="button2" type="submit" id="' . $key . '_enable" name="' . $key . '_enable" value="' . $user->lang['ALLOW_QUICK_REPLY_BUTTON'] . '" />';
|
|
|
|
}
|
|
|
|
|
2012-07-17 16:09:05 +02:00
|
|
|
/**
|
|
|
|
* Select guest timezone
|
|
|
|
*/
|
|
|
|
function timezone_select($value, $key)
|
|
|
|
{
|
2012-07-19 17:41:27 +02:00
|
|
|
global $user;
|
|
|
|
|
|
|
|
$timezone_select = phpbb_timezone_select($user, $value, true);
|
2012-07-17 16:09:05 +02:00
|
|
|
$timezone_select['tz_select'];
|
|
|
|
|
|
|
|
return '<select name="config[' . $key . ']" id="' . $key . '">' . $timezone_select['tz_select'] . '</select>';
|
|
|
|
}
|
2010-02-15 15:04:44 +00:00
|
|
|
|
2006-06-16 16:54:51 +00:00
|
|
|
/**
|
|
|
|
* Select default dateformat
|
|
|
|
*/
|
2006-06-11 19:32:17 +00:00
|
|
|
function dateformat_select($value, $key)
|
|
|
|
{
|
2006-12-03 16:12:03 +00:00
|
|
|
global $user, $config;
|
|
|
|
|
|
|
|
// Let the format_date function operate with the acp values
|
2012-07-18 16:52:52 +02:00
|
|
|
$old_tz = $user->timezone;
|
2012-07-19 15:46:12 +02:00
|
|
|
try
|
|
|
|
{
|
|
|
|
$user->timezone = new DateTimeZone($config['board_timezone']);
|
|
|
|
}
|
|
|
|
catch (Exception $e)
|
|
|
|
{
|
|
|
|
// If the board timezone is invalid, we just use the users timezone.
|
|
|
|
}
|
2006-06-11 19:32:17 +00:00
|
|
|
|
|
|
|
$dateformat_options = '';
|
|
|
|
|
|
|
|
foreach ($user->lang['dateformats'] as $format => $null)
|
|
|
|
{
|
|
|
|
$dateformat_options .= '<option value="' . $format . '"' . (($format == $value) ? ' selected="selected"' : '') . '>';
|
2007-04-24 17:52:40 +00:00
|
|
|
$dateformat_options .= $user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $user->lang['VARIANT_DATE_SEPARATOR'] . $user->format_date(time(), $format, true) : '');
|
2006-06-11 19:32:17 +00:00
|
|
|
$dateformat_options .= '</option>';
|
|
|
|
}
|
|
|
|
|
|
|
|
$dateformat_options .= '<option value="custom"';
|
One commit for those fixes having a very tiny impact (mostly only whitespaces or forgotten spans, etc.)
Although i somehow mistakingly got #20445 and #15249 into it. :/
Removing s_watching_img from watch_topic_forum() function (Bug #20445)
Changing order for post review if more than one post affected (Bug #15249)
Language typos/fixes (Bug #20425, #15719, #15429, #14669, #13479)
Style/Template fixes (Bug #20065, #19405, #19205, #15028, #14934, #14821, #14752, #14497, #13707, #14738)
Tiny code fixes (Bug #20165, #20025, #19795, #14804)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8350 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-30 16:01:15 +00:00
|
|
|
if (!isset($user->lang['dateformats'][$value]))
|
2006-06-11 19:32:17 +00:00
|
|
|
{
|
|
|
|
$dateformat_options .= ' selected="selected"';
|
|
|
|
}
|
|
|
|
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
|
|
|
|
|
2006-12-03 16:12:03 +00:00
|
|
|
// Reset users date options
|
2012-07-18 16:52:52 +02:00
|
|
|
$user->timezone = $old_tz;
|
2006-12-03 16:12:03 +00:00
|
|
|
|
2007-09-22 18:31:50 +00:00
|
|
|
return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('" . addslashes($key) . "').value = '" . addslashes($value) . "'; } else { document.getElementById('" . addslashes($key) . "').value = this.value; }\">$dateformat_options</select>
|
2006-06-11 19:32:17 +00:00
|
|
|
<input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />";
|
|
|
|
}
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Select multiple forums
|
|
|
|
*/
|
|
|
|
function select_news_forums($value, $key)
|
|
|
|
{
|
|
|
|
global $user, $config;
|
|
|
|
|
2009-08-12 15:00:47 +00:00
|
|
|
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
// Build forum options
|
2009-08-12 15:00:47 +00:00
|
|
|
$s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
|
2009-06-12 14:41:03 +00:00
|
|
|
foreach ($forum_list as $f_id => $f_row)
|
|
|
|
{
|
2009-08-12 15:00:47 +00:00
|
|
|
$f_row['selected'] = phpbb_optionget(FORUM_OPTION_FEED_NEWS, $f_row['forum_options']);
|
|
|
|
|
2009-06-12 14:41:03 +00:00
|
|
|
$s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
|
|
|
|
}
|
2009-08-12 15:00:47 +00:00
|
|
|
$s_forum_options .= '</select>';
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
return $s_forum_options;
|
|
|
|
}
|
|
|
|
|
|
|
|
function select_exclude_forums($value, $key)
|
|
|
|
{
|
|
|
|
global $user, $config;
|
|
|
|
|
2010-01-12 21:15:32 +00:00
|
|
|
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
// Build forum options
|
2009-08-12 15:00:47 +00:00
|
|
|
$s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
|
2009-06-12 14:41:03 +00:00
|
|
|
foreach ($forum_list as $f_id => $f_row)
|
|
|
|
{
|
2009-08-12 15:00:47 +00:00
|
|
|
$f_row['selected'] = phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $f_row['forum_options']);
|
|
|
|
|
2009-06-12 14:41:03 +00:00
|
|
|
$s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
|
|
|
|
}
|
2009-08-12 15:00:47 +00:00
|
|
|
$s_forum_options .= '</select>';
|
2009-06-12 14:41:03 +00:00
|
|
|
|
|
|
|
return $s_forum_options;
|
|
|
|
}
|
2009-08-12 15:00:47 +00:00
|
|
|
|
|
|
|
function store_feed_forums($option, $key)
|
|
|
|
{
|
|
|
|
global $db, $cache;
|
|
|
|
|
|
|
|
// Get key
|
|
|
|
$values = request_var($key, array(0 => 0));
|
|
|
|
|
|
|
|
// Empty option bit for all forums
|
|
|
|
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
|
|
|
SET forum_options = forum_options - ' . (1 << $option) . '
|
|
|
|
WHERE ' . $db->sql_bit_and('forum_options', $option, '<> 0');
|
|
|
|
$db->sql_query($sql);
|
|
|
|
|
|
|
|
// Already emptied for all...
|
|
|
|
if (sizeof($values))
|
|
|
|
{
|
|
|
|
// Set for selected forums
|
|
|
|
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
|
|
|
SET forum_options = forum_options + ' . (1 << $option) . '
|
|
|
|
WHERE ' . $db->sql_in_set('forum_id', $values);
|
|
|
|
$db->sql_query($sql);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Empty sql cache for forums table because options changed
|
|
|
|
$cache->destroy('sql', FORUMS_TABLE);
|
|
|
|
}
|
|
|
|
|
2005-11-17 18:06:11 +00:00
|
|
|
}
|