Difference between revisions of "Mediawiki Notes"
Jump to navigation
Jump to search
PeterHarding (talk | contribs) |
PeterHarding (talk | contribs) |
||
Line 54: | Line 54: | ||
$wgUploadSizeWarning = 150000; | $wgUploadSizeWarning = 150000; | ||
</pre> | </pre> | ||
==Uploading Files== | |||
http://meta.wikimedia.org/wiki/Uploading_files | |||
[[Category:Mediawiki]] | [[Category:Mediawiki]] |
Revision as of 12:28, 12 February 2008
Mediawiki Notes
Adding the following code to the buildSidebar() function in include/Skins.php will cause an empty menu to be used when no use is logged in.
(Around line 1608 in include/Skins.php) function buildSidebar() { global $parserMemc, $wgEnableSidebarCache; global $wgLang, $wgContLang; #----- PLH 20070728 -------------------------------------- global $wgUser; if (!$wgUser->isLoggedIn()) { return array(); } #---------------------------------------------------------
Embedding Images
http://en.wikipedia.org/wiki/Help:Images_and_other_uploaded_files#Embedding_internal_images
# This is the list of preferred extensions for uploading files. Uploading # files with extensions not in this list will trigger a warning. $wgFileExtensions = array( 'png', 'jpg', 'jpeg', 'ogg' ); # Files with these extensions will never be allowed as uploads. $wgFileBlacklist = array( # HTML may contain cookie-stealing JavaScript and web bugs 'html', 'htm', # PHP scripts may execute arbitrary code on the server 'php', 'phtml', 'php3', 'php4', 'phps', # Other types that may be interpreted by some servers 'shtml', 'jhtml', 'pl', 'py', # May contain harmful executables for Windows victims 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' ); # This is a flag to determine whether or not to check file extensions on # upload. $wgCheckFileExtensions = true; # If this is turned off, users may override the warning for files not # covered by $wgFileExtensions. $wgStrictFileExtensions = true; # Warn if uploaded files are larger than this $wgUploadSizeWarning = 150000;