mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 05:14:56 +09:00
Display max filesize for profile image #1451
This commit is contained in:
parent
b354d8af49
commit
921c318bb0
3 changed files with 13 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ $lang->allow_outlink_site = 'Allowed Websites';
|
|||
$lang->allow_outlink_format = 'Allowed Formats';
|
||||
$lang->allow_multimedia_direct_download = 'Allow Direct Link to Multimedia Attachments';
|
||||
$lang->allowed_filesize = 'Maximum File Size';
|
||||
$lang->allowed_filesize_exceeded = 'The file is too large. The maximum allowed filesize is %sMB.';
|
||||
$lang->allowed_attach_size = 'Maximum Attachments';
|
||||
$lang->allowed_filetypes = 'Allowed extentsions';
|
||||
$lang->download_short_url = 'Use short URL';
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ $lang->allow_outlink = '다운로드 링크 외부 접근 허용';
|
|||
$lang->allow_outlink_site = '외부 접근 허용 사이트';
|
||||
$lang->allow_outlink_format = '외부 접근 허용 확장자';
|
||||
$lang->allowed_filesize = '파일 용량 제한';
|
||||
$lang->allowed_filesize_exceeded = '파일이 너무 큽니다. 용량 제한은 %sMB입니다.';
|
||||
$lang->allowed_attach_size = '문서 첨부 제한';
|
||||
$lang->allowed_filetypes = '허용 확장자';
|
||||
$lang->allow_multimedia_direct_download = '멀티미디어 파일 직접 접근 허용';
|
||||
|
|
|
|||
|
|
@ -575,9 +575,19 @@ class memberAdminView extends member
|
|||
{
|
||||
$inputTag = sprintf('<input type="hidden" name="__%s_exist" value="false" />', $formInfo->name);
|
||||
}
|
||||
$inputTag .= sprintf('<input type="file" name="%s" id="%s" value="" accept="image/*" /><p class="help-block">%s: %dpx, %s: %dpx</p>',
|
||||
|
||||
$max_filesize = min(FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')));
|
||||
if (isset($member_config->{$formInfo->name.'_max_filesize'}))
|
||||
{
|
||||
$max_filesize = min($max_filesize, $member_config->{$formInfo->name.'_max_filesize'} * 1024);
|
||||
}
|
||||
$inputTag .= sprintf('<input type="file" name="%s" id="%s" value="" accept="image/*" data-max-filesize="%d" data-max-filesize-error="%s" /><p class="help-block">%s: %s, %s: %dpx, %s: %dpx</p>',
|
||||
$formInfo->name,
|
||||
$formInfo->name,
|
||||
$max_filesize,
|
||||
escape(lang('file.allowed_filesize_exceeded')),
|
||||
lang('file.allowed_filesize'),
|
||||
FileHandler::filesize($max_filesize),
|
||||
$lang->{$formInfo->name.'_max_width'},
|
||||
$member_config->{$formInfo->name.'_max_width'},
|
||||
$lang->{$formInfo->name.'_max_height'},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue