diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2005-11-17 17:32:25 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2005-11-17 17:32:25 +0000 |
commit | e21245f2ee5e3f7a39ae865c93e2f4bca6682f3a (patch) | |
tree | 2d703e0fb605b3ea4099c0be5bda414f56280a29 /phpBB/includes/ucp/ucp_prefs.php | |
parent | 3676222231726823faa2a70d296edf928c79a393 (diff) | |
download | forums-e21245f2ee5e3f7a39ae865c93e2f4bca6682f3a.tar forums-e21245f2ee5e3f7a39ae865c93e2f4bca6682f3a.tar.gz forums-e21245f2ee5e3f7a39ae865c93e2f4bca6682f3a.tar.bz2 forums-e21245f2ee5e3f7a39ae865c93e2f4bca6682f3a.tar.xz forums-e21245f2ee5e3f7a39ae865c93e2f4bca6682f3a.zip |
- some ucp changes (added the module info too)
git-svn-id: file:///svn/phpbb/trunk@5302 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_prefs.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_prefs.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index fef42f043f..8d59d04bd7 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -126,6 +126,26 @@ class ucp_prefs $style = (isset($style)) ? $style : $user->data['user_style']; $tz = (isset($tz)) ? $tz : $user->data['user_timezone']; + $dateformat_options = ''; + + foreach ($user->lang['dateformats'] as $format => $null) + { + $dateformat_options .= '<option value="' . $format . '"' . (($format == $dateformat) ? ' selected="selected"' : '') . '>'; + $dateformat_options .= $user->format_date(time(), $format, true) . ((strpos($format, '|') !== false) ? ' [' . $user->lang['RELATIVE_DAYS'] . ']' : ''); + $dateformat_options .= '</option>'; + } + + $s_custom = false; + + $dateformat_options .= '<option value="custom"'; + if (!in_array($dateformat, array_keys($user->lang['dateformats']))) + { + $dateformat_options .= ' selected="selected"'; + $s_custom = true; + } + $dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>'; + + $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', @@ -150,6 +170,9 @@ class ucp_prefs 'NOTIFY_BOTH' => ($notifymethod == NOTIFY_BOTH) ? 'checked="checked"' : '', 'DATE_FORMAT' => $dateformat, + 'S_DATEFORMAT_OPTIONS' => $dateformat_options, + 'S_CUSTOM_DATEFORMAT' => $s_custom, + 'DEFAULT_DATEFORMAT' => $config['default_dateformat'], 'S_LANG_OPTIONS' => language_select($lang), 'S_STYLE_OPTIONS' => style_select($style), @@ -417,4 +440,32 @@ class ucp_prefs } } +/** +* @package module_install +*/ +class ucp_prefs_info +{ + function module() + { + return array( + 'filename' => 'ucp_prefs', + 'title' => 'UCP_PREFS', + 'version' => '1.0.0', + 'modes' => array( + 'personal' => array('title' => 'UCP_PREFS_PERSONAL', 'auth' => ''), + 'view' => array('title' => 'UCP_PREFS_VIEW', 'auth' => ''), + 'post' => array('title' => 'UCP_PREFS_POST', 'auth' => ''), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} + ?>
\ No newline at end of file |