diff options
-rw-r--r-- | phpBB/includes/acp/acp_board.php | 26 | ||||
-rw-r--r-- | phpBB/language/en/acp/board.php | 2 | ||||
-rwxr-xr-x | phpBB/language/en/install.php | 1 |
3 files changed, 28 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 60d3631673..5c60f7099f 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -39,7 +39,7 @@ class acp_board 'board_disable' => array('lang' => 'DISABLE_BOARD', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true), 'board_disable_msg' => false, 'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false), - 'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'type' => 'text::255', 'explain' => true), + 'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true), 'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false), 'board_dst' => array('lang' => 'SYSTEM_DST', 'type' => 'radio:yes_no', 'explain' => false), 'default_style' => array('lang' => 'DEFAULT_STYLE', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', true), 'explain' => false), @@ -707,6 +707,30 @@ class acp_board 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'] . '" />'; } + + function dateformat_select($value, $key) + { + global $user; + + $dateformat_options = ''; + + foreach ($user->lang['dateformats'] as $format => $null) + { + $dateformat_options .= '<option value="' . $format . '"' . (($format == $value) ? ' selected="selected"' : '') . '>'; + $dateformat_options .= $user->format_date(time(), $format, true) . ((strpos($format, '|') !== false) ? ' [' . $user->lang['RELATIVE_DAYS'] . ']' : ''); + $dateformat_options .= '</option>'; + } + + $dateformat_options .= '<option value="custom"'; + if (!in_array($value, array_keys($user->lang['dateformats']))) + { + $dateformat_options .= ' selected="selected"'; + } + $dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>'; + + return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('$key').value = '$value'; } else { document.getElementById('$key').value = this.value; }\">$dateformat_options</select> + <input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />"; + } } ?>
\ No newline at end of file diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 4b82bd2bd7..e15a69560a 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -32,6 +32,7 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( 'ACP_BOARD_SETTINGS_EXPLAIN' => 'Here you can determine the basic operation of your board, from the site name through user registration to private messaging.', + 'CUSTOM_DATEFORMAT' => 'Custom...', 'DEFAULT_DATE_FORMAT' => 'Date Format', 'DEFAULT_DATE_FORMAT_EXPLAIN' => 'The date format is the same as the PHP date function.', 'DEFAULT_LANGUAGE' => 'Default Language', @@ -40,6 +41,7 @@ $lang = array_merge($lang, array( 'DISABLE_BOARD_EXPLAIN' => 'This will make the board unavailable to users. You can also enter a short (255 character) message to display if you wish.', 'OVERRIDE_STYLE' => 'Override user style', 'OVERRIDE_STYLE_EXPLAIN' => 'Replaces users style with the default.', + 'RELATIVE_DAYS' => 'Relative days', 'SITE_DESC' => 'Site description', 'SITE_NAME' => 'Site name', 'SYSTEM_DST' => 'Enable Daylight Savings Time', diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index dc4c01b341..1304938b72 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -219,6 +219,7 @@ $lang = array_merge($lang, array( 'SUPPORT_BODY' => 'Some text on obtaining support, etc can go here.</p><p>Probably this can be copied from the documentation</p><p>To ensure you stay up to date with the latest news and releases, why not <a href="http://www.phpbb.com/support/" target="_new">subscribe to our mailing list</a>', 'SYNC_FORUMS' => 'Starting to sync forums', 'SYNC_TOPICS' => 'Starting to sync topics', + 'SYNC_TOPIC_ID' => 'Synchronising topics from topic_id $1%s to $2%s', 'TABLES_MISSING' => 'Could not find these tables<br />» <b>%s</b>.', 'TABLE_PREFIX' => 'Prefix for tables in database', |