mirror of
https://github.com/typecho/typecho.git
synced 2025-03-19 17:39:42 +01:00
Add more media file types.
This commit is contained in:
parent
0dbc14da02
commit
54af368084
@ -1269,6 +1269,8 @@ EOF;
|
||||
'bin' => 'application/octet-stream',
|
||||
'oda' => 'application/oda',
|
||||
'ogg' => 'application/ogg',
|
||||
'oga' => 'audio/ogg',
|
||||
'ogv' => 'video/ogg',
|
||||
'prf' => 'application/pics-rules',
|
||||
'key' => 'application/pgp-keys',
|
||||
'pdf' => 'application/pdf',
|
||||
@ -1439,6 +1441,7 @@ EOF;
|
||||
'mpega' => 'audio/mpeg',
|
||||
'mp2' => 'audio/mpeg',
|
||||
'mp3' => 'audio/mpeg',
|
||||
'mp4' => 'video/mp4',
|
||||
'm3u' => 'audio/x-mpegurl',
|
||||
'sid' => 'audio/prs.sid',
|
||||
'aif' => 'audio/x-aiff',
|
||||
|
@ -338,7 +338,7 @@ class Widget_Options extends Typecho_Widget
|
||||
if (NULL != $this->attachmentTypes) {
|
||||
$attachmentTypes = str_replace(
|
||||
array('@image@', '@media@', '@doc@'),
|
||||
array('gif,jpg,jpeg,png,tiff,bmp', 'mp3,wmv,wma,rmvb,rm,avi,flv',
|
||||
array('gif,jpg,jpeg,png,tiff,bmp', 'mp3,mp4,mov,wmv,wma,rmvb,rm,avi,flv,ogg,oga,ogv',
|
||||
'txt,doc,docx,xls,xlsx,ppt,pptx,zip,rar,pdf'), $this->attachmentTypes);
|
||||
|
||||
$attachmentTypesResult = array_unique(array_map('trim', preg_split("/(,|\.)/", $attachmentTypes)));
|
||||
|
@ -174,7 +174,7 @@ class Widget_Options_General extends Widget_Abstract_Options implements Widget_I
|
||||
|
||||
$attachmentTypesOptions = array(
|
||||
'@image@' => _t('图片文件') . ' <code>(gif jpg jpeg png tiff bmp)</code>',
|
||||
'@media@' => _t('多媒体文件') . ' <code>(mp3 wmv wma rmvb rm avi flv)</code>',
|
||||
'@media@' => _t('多媒体文件') . ' <code>(mp3 mp4 mov wmv wma rmvb rm avi flv ogg oga ogv)</code>',
|
||||
'@doc@' => _t('常用档案文件') . ' <code>(txt doc docx xls xlsx ppt pptx zip rar pdf)</code>',
|
||||
'@other@' => _t('其他格式 %s', ' <input type="text" class="w-50 text-s mono" name="attachmentTypesOther" value="' . htmlspecialchars($attachmentTypesOtherValue) . '" />'),
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user