mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
git-svn-id: file:///svn/phpbb/trunk@6667 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
85a5dc01fe
commit
61e2a3f5c1
5 changed files with 23 additions and 18 deletions
|
@ -254,14 +254,6 @@
|
||||||
<h3>{L_SHOW_CSS_NOTE}</h3>
|
<h3>{L_SHOW_CSS_NOTE}</h3>
|
||||||
<p>{L_SHOW_CSS_EXPLAIN}</p>
|
<p>{L_SHOW_CSS_EXPLAIN}</p>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- include tooltip file -->
|
|
||||||
<script type="text/javascript" src="style/tooltip.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
window.onload = function(){enable_tooltips_select('acp_styles', '', 'css_class')};
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<form id="acp_styles" method="post" action="{U_ACTION}">
|
<form id="acp_styles" method="post" action="{U_ACTION}">
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
|
@ -978,7 +978,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
||||||
foreach ($classes as $class)
|
foreach ($classes as $class)
|
||||||
{
|
{
|
||||||
$selected = ($class == $edit_class) ? ' selected="selected"' : '';
|
$selected = ($class == $edit_class) ? ' selected="selected"' : '';
|
||||||
$s_classes .= '<option value="' . $class . '" title="' . $class . '"' . $selected . '>' . substr($class, 0, 40) . '</option>';
|
$s_classes .= '<option value="' . $class . '" title="' . $class . '"' . $selected . '>' . truncate_string($class, 40, false, "...") . '</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
|
|
|
@ -686,13 +686,17 @@ function tz_select($default = '', $truncate = false)
|
||||||
{
|
{
|
||||||
if ($truncate)
|
if ($truncate)
|
||||||
{
|
{
|
||||||
$zone = (utf8_strlen($zone) > 70) ? utf8_substr($zone, 0, 70) . '...' : $zone;
|
$zone_trunc = truncate_string($zone, 50, false, "...");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$zone_trunc = $zone;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_numeric($offset))
|
if (is_numeric($offset))
|
||||||
{
|
{
|
||||||
$selected = ($offset == $default) ? ' selected="selected"' : '';
|
$selected = ($offset == $default) ? ' selected="selected"' : '';
|
||||||
$tz_select .= '<option value="' . $offset . '"' . $selected . '>' . $zone . '</option>';
|
$tz_select .= '<option title="'.$zone.'" value="' . $offset . '"' . $selected . '>' . $zone_trunc . '</option>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2737,11 +2741,12 @@ function get_preg_expression($mode)
|
||||||
* Truncates string while retaining special characters if going over the max length
|
* Truncates string while retaining special characters if going over the max length
|
||||||
* The default max length is 60 at the moment
|
* The default max length is 60 at the moment
|
||||||
*/
|
*/
|
||||||
function truncate_string($string, $max_length = 60, $allow_reply = true)
|
function truncate_string($string, $max_length = 60, $allow_reply = true, $append = '')
|
||||||
{
|
{
|
||||||
$chars = array();
|
$chars = array();
|
||||||
|
|
||||||
$strip_reply = false;
|
$strip_reply = false;
|
||||||
|
$stripped = false;
|
||||||
if ($allow_reply && strpos($string, 'Re: ') === 0)
|
if ($allow_reply && strpos($string, 'Re: ') === 0)
|
||||||
{
|
{
|
||||||
$strip_reply = true;
|
$strip_reply = true;
|
||||||
|
@ -2756,12 +2761,18 @@ function truncate_string($string, $max_length = 60, $allow_reply = true)
|
||||||
{
|
{
|
||||||
// Cut off the last elements from the array
|
// Cut off the last elements from the array
|
||||||
$string = implode('', array_slice($chars, 0, $max_length));
|
$string = implode('', array_slice($chars, 0, $max_length));
|
||||||
|
$stripped = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($strip_reply)
|
if ($strip_reply)
|
||||||
{
|
{
|
||||||
$string = 'Re: ' . $string;
|
$string = 'Re: ' . $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($append != '' && $stripped)
|
||||||
|
{
|
||||||
|
$string = $string . $append;
|
||||||
|
}
|
||||||
|
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,11 +128,11 @@ class ucp_prefs
|
||||||
'DEFAULT_DATEFORMAT' => $config['default_dateformat'],
|
'DEFAULT_DATEFORMAT' => $config['default_dateformat'],
|
||||||
'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']),
|
'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']),
|
||||||
|
|
||||||
'S_LANG_OPTIONS' => language_select($data['lang']),
|
'S_LANG_OPTIONS' => language_select($data['lang']),
|
||||||
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']),
|
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']),
|
||||||
'S_TZ_OPTIONS' => tz_select($data['tz']),
|
'S_TZ_OPTIONS' => tz_select($data['tz'], true),
|
||||||
'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false,
|
'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false,
|
||||||
'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
|
'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
|
||||||
);
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -71,7 +71,9 @@
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}:</b></td>
|
<td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}:</b></td>
|
||||||
<td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td>
|
<td class="row2">
|
||||||
|
<select id="tz" name="tz">{S_TZ_OPTIONS}</select>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" width="50%"><b class="genmed">{L_BOARD_DST}:</b></td>
|
<td class="row1" width="50%"><b class="genmed">{L_BOARD_DST}:</b></td>
|
||||||
|
|
Loading…
Add table
Reference in a new issue