Difference between revisions of "MediaWiki"

From HeadBackup
Jump to navigationJump to search
 
m (3 revisions)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== MediaWiki Tips & Tricks ==
+
== Tips & Tricks ==
=== Enable word wrap for pre tags on MediaWiki ===
+
=== 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):
 
Add these lines to skins/monobook/main.css in the section which defines the formatting for the pre tags (search for pre):
 
<pre>
 
<pre>
Line 10: Line 10:
 
</pre>
 
</pre>
  
=== Disable anonymous editing and new user registrations in MediaWiki ===
+
=== Disable anonymous editing and new user registrations ===
 
<pre>
 
<pre>
 
# Disable anonymous editing
 
# Disable anonymous editing

Latest revision as of 21:03, 15 November 2010

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;