mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
[ticket/10345] Use the plural function in some more places.
I added two function avatar_explanation_string() and avatar_error_wrong_size() for easier handling of the "pixels"-languages, as they are used quite often. PHPBB3-10345
This commit is contained in:
committed by
Oleg Pudeyev
parent
88ae40a4b1
commit
179662e949
@@ -1159,7 +1159,7 @@ class acp_attachments
|
||||
// Issue warning message if files stats are inaccurate
|
||||
if (($num_files != $num_files_real) || ($total_size != $total_size_real))
|
||||
{
|
||||
$error[] = sprintf($user->lang['FILES_STATS_WRONG'], $num_files_real, get_formatted_filesize($total_size_real));
|
||||
$error[] = $user->lang('FILES_STATS_WRONG', (int) $num_files_real, get_formatted_filesize($total_size_real));
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false,
|
||||
@@ -1244,8 +1244,7 @@ class acp_attachments
|
||||
$row['extension'] = strtolower(trim((string) $row['extension']));
|
||||
$comment = ($row['attach_comment'] && !$row['in_message']) ? str_replace(array("\n", "\r"), array('<br />', "\n"), $row['attach_comment']) : '';
|
||||
$display_cat = $extensions[$row['extension']]['display_cat'];
|
||||
$l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNT' : 'VIEWED_COUNT';
|
||||
$l_download_count = (!isset($row['download_count']) || (int) $row['download_count'] == 0) ? $user->lang[$l_downloaded_viewed . '_NONE'] : (((int) $row['download_count'] == 1) ? sprintf($user->lang[$l_downloaded_viewed], $row['download_count']) : sprintf($user->lang[$l_downloaded_viewed . 'S'], $row['download_count']));
|
||||
$l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNTS' : 'VIEWED_COUNTS';
|
||||
|
||||
$template->assign_block_vars('attachments', array(
|
||||
'ATTACHMENT_POSTER' => get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']),
|
||||
@@ -1261,7 +1260,7 @@ class acp_attachments
|
||||
'TOPIC_ID' => (int) $row['topic_id'],
|
||||
'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? (int) $post_ids[$row['attach_id']] : '',
|
||||
|
||||
'L_DOWNLOAD_COUNT' => $l_download_count,
|
||||
'L_DOWNLOAD_COUNT' => $user->lang($l_downloaded_viewed, (int) $row['download_count']),
|
||||
|
||||
'S_IN_MESSAGE' => (bool) $row['in_message'],
|
||||
|
||||
|
@@ -371,7 +371,7 @@ class acp_groups
|
||||
{
|
||||
if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
|
||||
{
|
||||
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
|
||||
$error[] = avatar_error_wrong_size($data['width'], $data['height']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ class acp_groups
|
||||
{
|
||||
if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
|
||||
{
|
||||
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
|
||||
$error[] = avatar_error_wrong_size($data['width'], $data['height']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -627,7 +627,7 @@ class acp_groups
|
||||
'U_BACK' => $u_back,
|
||||
'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&name=group_colour'),
|
||||
'U_ACTION' => "{$this->u_action}&action=$action&g=$group_id",
|
||||
'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)),
|
||||
'L_AVATAR_EXPLAIN' => avatar_explanation_string(),
|
||||
));
|
||||
|
||||
return;
|
||||
|
@@ -487,21 +487,7 @@ class acp_icons
|
||||
$cache->destroy('_icons');
|
||||
$cache->destroy('sql', $table);
|
||||
|
||||
$level = E_USER_NOTICE;
|
||||
switch ($icons_updated)
|
||||
{
|
||||
case 0:
|
||||
$suc_lang = "{$lang}_NONE";
|
||||
$level = E_USER_WARNING;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
$suc_lang = "{$lang}_ONE";
|
||||
break;
|
||||
|
||||
default:
|
||||
$suc_lang = $lang;
|
||||
}
|
||||
$level = ($icons_updated) ? E_USER_NOTICE : E_USER_WARNING;
|
||||
$errormsgs = '';
|
||||
foreach ($errors as $img => $error)
|
||||
{
|
||||
@@ -509,11 +495,11 @@ class acp_icons
|
||||
}
|
||||
if ($action == 'modify')
|
||||
{
|
||||
trigger_error($user->lang[$suc_lang . '_EDITED'] . $errormsgs . adm_back_link($this->u_action), $level);
|
||||
trigger_error($user->lang($lang . '_EDITED', $icons_updated) . $errormsgs . adm_back_link($this->u_action), $level);
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang[$suc_lang . '_ADDED'] . $errormsgs . adm_back_link($this->u_action), $level);
|
||||
trigger_error($user->lang($lang . '_ADDED', $icons_updated) . $errormsgs . adm_back_link($this->u_action), $level);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@@ -338,7 +338,7 @@ class acp_search
|
||||
$totaltime = $mtime[0] + $mtime[1] - $starttime;
|
||||
$rows_per_second = $row_count / $totaltime;
|
||||
meta_refresh(1, append_sid($this->u_action . '&action=delete&skip_rows=' . $post_counter));
|
||||
trigger_error(sprintf($user->lang['SEARCH_INDEX_DELETE_REDIRECT'], $post_counter, $row_count, $rows_per_second));
|
||||
trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter, $rows_per_second));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ class acp_search
|
||||
$totaltime = $mtime[0] + $mtime[1] - $starttime;
|
||||
$rows_per_second = $row_count / $totaltime;
|
||||
meta_refresh(1, append_sid($this->u_action . '&action=create&skip_rows=' . $post_counter));
|
||||
trigger_error(sprintf($user->lang['SEARCH_INDEX_CREATE_REDIRECT'], $post_counter, $row_count, $rows_per_second));
|
||||
trigger_error($user->lang('SEARCH_INDEX_CREATE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_CREATE_REDIRECT_RATE', $rows_per_second));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1748,8 +1748,8 @@ class acp_users
|
||||
'USER_AVATAR_WIDTH' => $user_row['user_avatar_width'],
|
||||
'USER_AVATAR_HEIGHT' => $user_row['user_avatar_height'],
|
||||
|
||||
'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)))
|
||||
);
|
||||
'L_AVATAR_EXPLAIN' => avatar_explanation_string()
|
||||
));
|
||||
|
||||
break;
|
||||
|
||||
@@ -1881,7 +1881,7 @@ class acp_users
|
||||
'FLASH_STATUS' => ($config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
|
||||
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
|
||||
|
||||
'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
|
||||
'L_SIGNATURE_EXPLAIN' => $user->lang('SIGNATURE_EXPLAIN', (int) $config['max_sig_chars']),
|
||||
|
||||
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
|
||||
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
|
||||
|
@@ -315,32 +315,32 @@ class custom_profile
|
||||
case 'FIELD_INVALID_DATE':
|
||||
case 'FIELD_INVALID_VALUE':
|
||||
case 'FIELD_REQUIRED':
|
||||
$error = sprintf($user->lang[$cp_result], $row['lang_name']);
|
||||
$error = $user->lang($cp_result, $row['lang_name']);
|
||||
break;
|
||||
|
||||
case 'FIELD_TOO_SHORT':
|
||||
case 'FIELD_TOO_SMALL':
|
||||
$error = sprintf($user->lang[$cp_result], $row['lang_name'], $row['field_minlen']);
|
||||
$error = $user->lang($cp_result, (int) $row['field_minlen'], $row['lang_name']);
|
||||
break;
|
||||
|
||||
case 'FIELD_TOO_LONG':
|
||||
case 'FIELD_TOO_LARGE':
|
||||
$error = sprintf($user->lang[$cp_result], $row['lang_name'], $row['field_maxlen']);
|
||||
$error = $user->lang($cp_result, (int) $row['field_maxlen'], $row['lang_name']);
|
||||
break;
|
||||
|
||||
case 'FIELD_INVALID_CHARS':
|
||||
switch ($row['field_validation'])
|
||||
{
|
||||
case '[0-9]+':
|
||||
$error = sprintf($user->lang[$cp_result . '_NUMBERS_ONLY'], $row['lang_name']);
|
||||
$error = $user->lang($cp_result . '_NUMBERS_ONLY', $row['lang_name']);
|
||||
break;
|
||||
|
||||
case '[\w]+':
|
||||
$error = sprintf($user->lang[$cp_result . '_ALPHA_ONLY'], $row['lang_name']);
|
||||
$error = $user->lang($cp_result . '_ALPHA_ONLY', $row['lang_name']);
|
||||
break;
|
||||
|
||||
case '[\w_\+\. \-\[\]]+':
|
||||
$error = sprintf($user->lang[$cp_result . '_SPACERS_ONLY'], $row['lang_name']);
|
||||
$error = $user->lang($cp_result . '_SPACERS_ONLY', $row['lang_name']);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@@ -427,7 +427,13 @@ class filespec
|
||||
|
||||
if (!$this->upload->valid_dimensions($this))
|
||||
{
|
||||
$this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'WRONG_SIZE'], $this->upload->min_width, $this->upload->min_height, $this->upload->max_width, $this->upload->max_height, $this->width, $this->height);
|
||||
$this->error[] = $user->lang($this->upload->error_prefix . 'WRONG_SIZE',
|
||||
$user->lang('PIXELS', (int) $this->upload->min_width),
|
||||
$user->lang('PIXELS', (int) $this->upload->min_height),
|
||||
$user->lang('PIXELS', (int) $this->upload->max_width),
|
||||
$user->lang('PIXELS', (int) $this->upload->max_height),
|
||||
$user->lang('PIXELS', (int) $this->width),
|
||||
$user->lang('PIXELS', (int) $this->height));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@@ -2039,7 +2039,7 @@ function avatar_remote($data, &$error)
|
||||
{
|
||||
if ($width > $config['avatar_max_width'] || $height > $config['avatar_max_height'])
|
||||
{
|
||||
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $width, $height);
|
||||
$error[] = avatar_error_wrong_size($width, $height);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2048,7 +2048,7 @@ function avatar_remote($data, &$error)
|
||||
{
|
||||
if ($width < $config['avatar_min_width'] || $height < $config['avatar_min_height'])
|
||||
{
|
||||
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $width, $height);
|
||||
$error[] = avatar_error_wrong_size($width, $height);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2388,7 +2388,7 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu
|
||||
{
|
||||
if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
|
||||
{
|
||||
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
|
||||
$error[] = avatar_error_wrong_size($data['width'], $data['height']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2398,7 +2398,7 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu
|
||||
{
|
||||
if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
|
||||
{
|
||||
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
|
||||
$error[] = avatar_error_wrong_size($data['width'], $data['height']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2444,6 +2444,29 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu
|
||||
return (sizeof($error)) ? false : true;
|
||||
}
|
||||
|
||||
function avatar_error_wrong_size($width, $height)
|
||||
{
|
||||
global $config, $user;
|
||||
|
||||
return $user->lang('AVATAR_WRONG_SIZE',
|
||||
$user->lang('PIXELS', (int) $config['avatar_min_width']),
|
||||
$user->lang('PIXELS', (int) $config['avatar_min_height']),
|
||||
$user->lang('PIXELS', (int) $config['avatar_max_width']),
|
||||
$user->lang('PIXELS', (int) $config['avatar_max_height']),
|
||||
$user->lang('PIXELS', (int) $width),
|
||||
$user->lang('PIXELS', (int) $height));
|
||||
}
|
||||
|
||||
function avatar_explanation_string()
|
||||
{
|
||||
global $config, $user;
|
||||
|
||||
return $user->lang('AVATAR_EXPLAIN',
|
||||
$user->lang('PIXELS', (int) $config['avatar_max_width']),
|
||||
$user->lang('PIXELS', (int) $config['avatar_max_height']),
|
||||
round($config['avatar_filesize'] / 1024));
|
||||
}
|
||||
|
||||
//
|
||||
// Usergroup functions
|
||||
//
|
||||
|
@@ -210,7 +210,7 @@ class bbcode_firstpass extends bbcode
|
||||
|
||||
if ($config['max_' . $this->mode . '_font_size'] && $config['max_' . $this->mode . '_font_size'] < $stx)
|
||||
{
|
||||
$this->warn_msg[] = sprintf($user->lang['MAX_FONT_SIZE_EXCEEDED'], $config['max_' . $this->mode . '_font_size']);
|
||||
$this->warn_msg[] = $user->lang('MAX_FONT_SIZE_EXCEEDED', (int) $config['max_' . $this->mode . '_font_size']);
|
||||
|
||||
return '[size=' . $stx . ']' . $in . '[/size]';
|
||||
}
|
||||
@@ -319,13 +319,13 @@ class bbcode_firstpass extends bbcode
|
||||
if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $stats[1])
|
||||
{
|
||||
$error = true;
|
||||
$this->warn_msg[] = sprintf($user->lang['MAX_IMG_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
|
||||
$this->warn_msg[] = $user->lang('MAX_IMG_HEIGHT_EXCEEDED', (int) $config['max_' . $this->mode . '_img_height']);
|
||||
}
|
||||
|
||||
if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $stats[0])
|
||||
{
|
||||
$error = true;
|
||||
$this->warn_msg[] = sprintf($user->lang['MAX_IMG_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
|
||||
$this->warn_msg[] = $user->lang('MAX_IMG_WIDTH_EXCEEDED', (int) $config['max_' . $this->mode . '_img_width']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -374,13 +374,13 @@ class bbcode_firstpass extends bbcode
|
||||
if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $height)
|
||||
{
|
||||
$error = true;
|
||||
$this->warn_msg[] = sprintf($user->lang['MAX_FLASH_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
|
||||
$this->warn_msg[] = $user->lang('MAX_FLASH_HEIGHT_EXCEEDED', (int) $config['max_' . $this->mode . '_img_height']);
|
||||
}
|
||||
|
||||
if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $width)
|
||||
{
|
||||
$error = true;
|
||||
$this->warn_msg[] = sprintf($user->lang['MAX_FLASH_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
|
||||
$this->warn_msg[] = $user->lang('MAX_FLASH_WIDTH_EXCEEDED', (int) $config['max_' . $this->mode . '_img_width']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1117,7 +1117,7 @@ class parse_message extends bbcode_firstpass
|
||||
// Maximum message length check. 0 disables this check completely.
|
||||
if ((int) $config['max_' . $mode . '_chars'] > 0 && $message_length > (int) $config['max_' . $mode . '_chars'])
|
||||
{
|
||||
$this->warn_msg[] = sprintf($user->lang['TOO_MANY_CHARS_' . strtoupper($mode)], $message_length, (int) $config['max_' . $mode . '_chars']);
|
||||
$this->warn_msg[] = $user->lang('TOO_MANY_CHARS_' . strtoupper($mode), $message_length, (int) $config['max_' . $mode . '_chars']);
|
||||
return (!$update_this_message) ? $return_message : $this->warn_msg;
|
||||
}
|
||||
|
||||
@@ -1126,7 +1126,7 @@ class parse_message extends bbcode_firstpass
|
||||
{
|
||||
if (!$message_length || $message_length < (int) $config['min_post_chars'])
|
||||
{
|
||||
$this->warn_msg[] = (!$message_length) ? $user->lang['TOO_FEW_CHARS'] : sprintf($user->lang['TOO_FEW_CHARS_LIMIT'], $message_length, (int) $config['min_post_chars']);
|
||||
$this->warn_msg[] = (!$message_length) ? $user->lang['TOO_FEW_CHARS'] : $user->lang('TOO_FEW_CHARS_LIMIT', $message_length, (int) $config['min_post_chars']);
|
||||
return (!$update_this_message) ? $return_message : $this->warn_msg;
|
||||
}
|
||||
}
|
||||
@@ -1445,7 +1445,7 @@ class parse_message extends bbcode_firstpass
|
||||
}
|
||||
else
|
||||
{
|
||||
$error[] = sprintf($user->lang['TOO_MANY_ATTACHMENTS'], $cfg['max_attachments']);
|
||||
$error[] = $user->lang('TOO_MANY_ATTACHMENTS', (int) $cfg['max_attachments']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1536,7 +1536,7 @@ class parse_message extends bbcode_firstpass
|
||||
}
|
||||
else
|
||||
{
|
||||
$error[] = sprintf($user->lang['TOO_MANY_ATTACHMENTS'], $cfg['max_attachments']);
|
||||
$error[] = $user->lang('TOO_MANY_ATTACHMENTS', (int) $cfg['max_attachments']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -561,7 +561,7 @@ class ucp_groups
|
||||
{
|
||||
if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
|
||||
{
|
||||
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
|
||||
$error[] = avatar_error_wrong_size($data['width'], $data['height']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -571,7 +571,7 @@ class ucp_groups
|
||||
{
|
||||
if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
|
||||
{
|
||||
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
|
||||
$error[] = avatar_error_wrong_size($data['width'], $data['height']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -732,7 +732,7 @@ class ucp_groups
|
||||
|
||||
'U_SWATCH' => append_sid("{$phpbb_root_path}adm/swatch.$phpEx", 'form=ucp&name=group_colour'),
|
||||
'S_UCP_ACTION' => $this->u_action . "&action=$action&g=$group_id",
|
||||
'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
|
||||
'L_AVATAR_EXPLAIN' => avatar_explanation_string(),
|
||||
));
|
||||
|
||||
break;
|
||||
@@ -1068,7 +1068,7 @@ class ucp_groups
|
||||
'mode' => $mode,
|
||||
'action' => $action
|
||||
);
|
||||
confirm_box(false, sprintf($user->lang['GROUP_CONFIRM_ADD_USER' . ((sizeof($name_ary) == 1) ? '' : 'S')], implode(', ', $name_ary)), build_hidden_fields($s_hidden_fields));
|
||||
confirm_box(false, $user->lang('GROUP_CONFIRM_ADD_USERS', sizeof($name_ary), implode(', ', $name_ary)), build_hidden_fields($s_hidden_fields));
|
||||
}
|
||||
|
||||
trigger_error($user->lang['NO_USERS_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&action=list&g=' . $group_id . '">', '</a>'));
|
||||
|
@@ -194,8 +194,8 @@ class ucp_main
|
||||
'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
|
||||
'WARNINGS' => ($user->data['user_warnings']) ? $user->data['user_warnings'] : 0,
|
||||
'POSTS' => ($user->data['user_posts']) ? $user->data['user_posts'] : 0,
|
||||
'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
|
||||
'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),
|
||||
'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day),
|
||||
'POSTS_PCT' => $user->lang('POST_PCT', $percentage),
|
||||
|
||||
'OCCUPATION' => (!empty($row['user_occ'])) ? $row['user_occ'] : '',
|
||||
'INTERESTS' => (!empty($row['user_interests'])) ? $row['user_interests'] : '',
|
||||
|
@@ -1053,7 +1053,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
$template->assign_vars(array(
|
||||
'L_POST_A' => $page_title,
|
||||
'L_ICON' => $user->lang['PM_ICON'],
|
||||
'L_MESSAGE_BODY_EXPLAIN' => (intval($config['max_post_chars'])) ? sprintf($user->lang['MESSAGE_BODY_EXPLAIN'], intval($config['max_post_chars'])) : '',
|
||||
'L_MESSAGE_BODY_EXPLAIN' => $user->lang('MESSAGE_BODY_EXPLAIN', (int) $config['max_post_chars']),
|
||||
|
||||
'SUBJECT' => (isset($message_subject)) ? $message_subject : '',
|
||||
'MESSAGE' => $message_text,
|
||||
|
@@ -231,7 +231,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
// Something went wrong, only partially moved?
|
||||
if ($num_moved != $folder_row['pm_count'])
|
||||
{
|
||||
trigger_error(sprintf($user->lang['MOVE_PM_ERROR'], $num_moved, $folder_row['pm_count']));
|
||||
trigger_error($user->lang('MOVE_PM_ERROR', (int) $folder_row['pm_count'], $num_moved));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -537,7 +537,7 @@ class ucp_profile
|
||||
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
|
||||
'MAX_FONT_SIZE' => (int) $config['max_sig_font_size'],
|
||||
|
||||
'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
|
||||
'L_SIGNATURE_EXPLAIN' => $user->lang('SIGNATURE_EXPLAIN', (int) $config['max_sig_chars']),
|
||||
|
||||
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
|
||||
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
|
||||
@@ -602,7 +602,7 @@ class ucp_profile
|
||||
|
||||
'S_FORM_ENCTYPE' => ($can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) ? ' enctype="multipart/form-data"' : '',
|
||||
|
||||
'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
|
||||
'L_AVATAR_EXPLAIN' => avatar_explanation_string(),
|
||||
));
|
||||
|
||||
if ($config['allow_avatar'] && $display_gallery && $auth->acl_get('u_chgavatar') && $config['allow_avatar_local'])
|
||||
|
Reference in New Issue
Block a user