MediaWiki

From HeadBackup
Jump to navigationJump to search

MediaWiki Tips & Tricks

Enable word wrap for pre tags

Add these lines to skins/monobook/main.css in the section which defines the formatting for the pre tags (search for pre):

        white-space: pre-wrap;       /* css-3 */
        white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
        white-space: -pre-wrap;      /* Opera 4-6 */
        white-space: -o-pre-wrap;    /* Opera 7 */
        word-wrap: break-word;       /* Internet Explorer 5.5+ */

Disable anonymous editing and new user registrations

# Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false;

# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;