2018-03-24
This commit is contained in:
parent
7aa20519f0
commit
430fb5d8fd
5 changed files with 35 additions and 5 deletions
|
@ -122,8 +122,8 @@ class Profile extends Page
|
|||
$fields[] = [
|
||||
'type' => 'endwrap',
|
||||
];
|
||||
if ('1' == $this->c->config->o_avatars) {
|
||||
if ($isEdit && ! $curUser->avatar) { //// может стоит поле для загрузки вставить????
|
||||
if ($rules->useAvatar) {
|
||||
if ($isEdit && ! $curUser->avatar) {
|
||||
$fields['avatar'] = [
|
||||
'id' => 'avatar',
|
||||
'class' => 'pline',
|
||||
|
@ -139,6 +139,16 @@ class Profile extends Page
|
|||
'value' => 'avatar',
|
||||
];
|
||||
}
|
||||
if ($isEdit) {
|
||||
$fields['upload_avatar'] = [
|
||||
'id' => 'upload_avatar',
|
||||
'type' => 'text',
|
||||
'maxlength' => 50,
|
||||
'caption' => \ForkBB\__('New avatar'),
|
||||
'value' => '',
|
||||
'info' => \ForkBB\__('New avatar info', \ForkBB\num($this->c->config->o_avatars_width), \ForkBB\num($this->c->config->o_avatars_height), \ForkBB\num($this->c->config->o_avatars_size), \ForkBB\size($this->c->config->o_avatars_size)),
|
||||
];
|
||||
}
|
||||
}
|
||||
$form['sets'][] = [
|
||||
'id' => 'header',
|
||||
|
@ -328,6 +338,7 @@ class Profile extends Page
|
|||
'type' => 'textarea',
|
||||
'value' => $curUser->signature,
|
||||
'caption' => \ForkBB\__('Signature'),
|
||||
'info' => \ForkBB\__('Sig max size', \ForkBB\num($this->c->config->p_sig_length), \ForkBB\num($this->c->config->p_sig_lines)),
|
||||
];
|
||||
} elseif ('' != $curUser->signature) {
|
||||
$fields['signature'] = [
|
||||
|
|
|
@ -77,4 +77,9 @@ class Profile extends Rules
|
|||
{
|
||||
return $this->user->isAdmin;
|
||||
}
|
||||
|
||||
public function getuseAvatar()
|
||||
{
|
||||
return '1' == $this->c->config->o_avatars;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -184,5 +184,7 @@ function size($size)
|
|||
$size /= 1024;
|
||||
}
|
||||
|
||||
return __('%s ' . $units[$i], num($size, 2)); // \sprintf('%.2f', $size)
|
||||
$decimals = $size - (int) $size < 0.005 ? 0 : 2;
|
||||
|
||||
return __('%s ' . $units[$i], num($size, $decimals));
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ msgid "Signature"
|
|||
msgstr "Signature"
|
||||
|
||||
msgid "Sig max size"
|
||||
msgstr "Max length: %s characters / Max lines: %s"
|
||||
msgstr "Max length: <b>%1$s</b> characters / Max lines: <b>%2$s</b>"
|
||||
|
||||
msgid "Avatar legend"
|
||||
msgstr "Set your avatar display options"
|
||||
|
@ -413,3 +413,9 @@ msgstr "Board configuration"
|
|||
|
||||
msgid "Not uploaded"
|
||||
msgstr "Not uploaded"
|
||||
|
||||
msgid "New avatar"
|
||||
msgstr "New avatar"
|
||||
|
||||
msgid "New avatar info"
|
||||
msgstr "The avatar will be automatically resize to <b>%1$s</b>x<b>%2$s</b> pixel / <b>%3$s</b> bytes (<i>%4$s</i>) if exceeds these parameters."
|
||||
|
|
|
@ -241,7 +241,7 @@ msgid "Signature"
|
|||
msgstr "Подпись"
|
||||
|
||||
msgid "Sig max size"
|
||||
msgstr "Макс. длина: %s символов / Макс. число строк: %s"
|
||||
msgstr "Максимальная длина: <b>%1$s</b> символов / Максимальное число строк: <b>%2$s</b>"
|
||||
|
||||
msgid "Avatar legend"
|
||||
msgstr "Наcтройка аватары"
|
||||
|
@ -413,3 +413,9 @@ msgstr "Настрйока форума"
|
|||
|
||||
msgid "Not uploaded"
|
||||
msgstr "Не загружена"
|
||||
|
||||
msgid "New avatar"
|
||||
msgstr "Новая аватара"
|
||||
|
||||
msgid "New avatar info"
|
||||
msgstr "Аватара будет автоматически сжата до <b>%1$s</b>x<b>%2$s</b> пиксел / <b>%3$s</b> байт (<i>%4$s</i>), если привысит эти параметры."
|
||||
|
|
Loading…
Reference in a new issue