How to add extensions in Mediawiki?

一曲冷凌霜 提交于 2019-12-02 21:28:20

问题


How do i add the below new extensions in MediaWiki?

*.xmcd and *.mcd for MathCad source files *.m and *.dat for Matlab source files.

I have already few extensions in LocalSettings.php mentioned below

$wgFileExtensions = array_merge( $wgFileExtensions, array( 'doc','pdf', 'ppt', 'zip', 'svg', 'xls', 'vsd', 'vdx', 'docx', 'xlsx', 'pptx') );

Thanks in advance

Jayaprabu R


回答1:


If I've understood correctly, you simply add extensions as follows:

$wgFileExtensions = array_merge( $wgFileExtensions, array( 'doc','pdf', 'ppt', 'zip', 'svg', 'xls', 'vsd', 'vdx', 'docx', 'xlsx', 'pptx', 'xmcd' , 'mcd' , 'm' , 'dat') );

If this don't work, you must check your upload are enabled in same file (LocalSettings.php):

$wgEnableUploads = true;

Directory "images" must be writable. Finally, you can set the maximun size of upload:

$wgMaxUploadFile = '25MB';


来源:https://stackoverflow.com/questions/8709263/how-to-add-extensions-in-mediawiki

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!