All these hacks go into LocalSettings.php -- Only been tested on MW1.18+

File Rights Hack[edit | edit source]

Allows admins to upload more then just images, you can set any file ext here, also could be hacked to set other settings for admins as well


##ADMIN FILE XT HACK
$wgGroupPermissions['sysop']['uploadmore'] = true;
function doMyStuff()
{
global $wgUser, $wgFileExtensions;
if ( $wgUser->isAllowed( 'uploadmore' ) )
{ $wgFileExtensions[] = 'torrent'; }
return true;
}
$wgExtensionFunctions[] = 'doMyStuff';
#END OF XT HACK


##EOF

Comments[edit | edit source]

This looks interesting. Does Appropedia have a need for admins to add more flie types than others can? --Lonny 14:44, 28 March 2012 (PDT)

Do we have a list of permitted file types somewhere?
If there's a file type that we think is risky, but might sometimes be suitable to have uploaded here, this hack could be useful. --Chriswaterguy 21:03, 29 March 2012 (PDT)
At Special:Upload it lists: Permitted file types: svg, png, jpg, jpeg, gif, ogg, doc, xls, xlsx, ppt, mp3, pdf, swf, flv, odt, ods, odp, odg, odb. There may be more, but I think that is all for right now. --Lonny 14:10, 1 April 2012 (PDT)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.