Before creating a wiki

From About PCs Wiki
Revision as of 22:37, 22 March 2022 by Lily (talk | contribs) (→‎Using Templates)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

If you want to admin your own wiki, you will have to read a lot. You can start reading here: MediaWiki Administrator's Handbook

Before requesting a wiki[edit | hide | hide all]

Is the wiki for your own personal use or will it be a public wiki? If the latter ist the case — what do have the world to tell? Do you know something special? About a software, cooking, handicraft, science, music, sports…? Do you feel the need to write it down? A wiki is the perfect place to create a repository of knowledge, so if you want to share your special knowledge a wiki maybe a good idea.

Learning Wiki-Syntax[edit | hide]

A good place to start: Help: Wikitext

Learning from others[edit | hide]

When I visit a wiki first, I try to figure out what the admins are doing in this wiki. Mostly this ends with disappointment.

I take a look at following pages: MediaWiki:Common.css · Content pages · Statistics · Version · Template · Category · Module

Basically I look into the modules, the categories and the templates and some other special pages.

A wiki never forgets[edit | hide]

Each edit is stored forever in your wiki unless you have access to the database.

Making the table of contents draggable[edit | hide]

The standard content table on a wiki page is at top of the site and vanishes when scrolling down. This means that this content table does not much good in a long page with many headers, just look into this page. The following simple code procudes a content table with a fixed position on the right top (you may change this behaviour if you do not like this specific position).

<div id="zztoc" class="noprint" style="position: fixed; top: 8em; right: 0.5em; font-size: 0.8em;">__TOC__</div>

Add following JavaScript code to your Common.js

$(function() {
	//make TOC draggable
	var $mytoc = $('#zztoc');
	try {
		$mytoc.css({ 'position': 'absolute' });
		setTimeout(function () {
				'position': 'fixed',
				'right': '0.5em'
		}, 200);
	} catch (err) {
		console.log('MediaWiki:Common.js#zztoc ' + err.message);
	function dragElement(elmnt) {
		var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
		elmnt.onmousedown = dragMouseDown;
		function dragMouseDown(e) {
			e = e || window.event;
			// get the mouse cursor position at startup:
			pos3 = e.clientX;
			pos4 = e.clientY;
			document.onmouseup = closeDragElement;
			// call a function whenever the cursor moves:
			document.onmousemove = elementDrag;	
			//console.log('MediaWiki:Gadget-Navbar.js dragMouseDown');
		function elementDrag(e) {
			e = e || window.event;
			// calculate the new cursor position:
			pos1 = pos3 - e.clientX;
			pos2 = pos4 - e.clientY;
			pos3 = e.clientX;
			pos4 = e.clientY;
			// set the element's new position: = elmnt.offsetTop - pos2 + 'px'; = elmnt.offsetLeft - pos1 + 'px';	
			//console.log('MediaWiki:Gadget-Navbar.js elementDrag');
		function closeDragElement() {
			// stop moving when mouse button is released:
			document.onmouseup = null;
			document.onmousemove = null;	
			//console.log('MediaWiki:Gadget-Navbar.js closeDragElement');

Understanding transclusion[edit | hide]

Using Templates[edit | hide]

Expanding Templates[edit | hide]

Special:ExpandTemplates is a very useful special page when you intend to keep your edit count as low as possible. And you want to keep your edit count low, believe me.

Understanding the concept of Namespaces[edit | hide]

Understanding HTML[edit | hide]

As admin in a wiki you should know at least some basics about HTML.

Learning CSS[edit | hide]

Here is a great point to start with CSS: CSS Tutorial

With CSS you can do amazing things like removing navigation elements from your wiki. Every skin has a related CSS-file that has the same name as the skin, for the skin vector this would be MediaWiki:Vector.css. The global CSS-file for the wiki is called MediaWiki:Common.css, for printing MediaWiki:Print.css.

Be careful when editing MediaWiki:Common.css especially when using
display: none;

You can kill your wiki using just this simple statement

* { display: none; }

Using this statement causes a blank page displayed every time you access your wiki without any chance to revert this. The only chance of restoring your wiki is asking a steward to delete/rename your MediaWiki:Common.css directly in the database.

Using Categories[edit | hide]

Using Extensions[edit | hide]

Using Lua-Modules[edit | hide]

Creating your own content[edit | hide]

You are on your own in your wiki. This is not Wikipedia where thousands of users are contributing content. Do not expect anyone else to support your wiki with substantial content. Copying content from Wikipedia usually does not make much sense especially when you create dozens of broken links to non existing templates and categories.

Write, write, write[edit | hide]

The good thing is, you can write anything in your wiki what you want to as long as it is legal. You can document your wiki inside your wiki.

Creating a helpful sidebar[edit | hide]

Easier editing[edit | hide]

Create the page MediaWiki:Edittools and activate the extension mw:Extension:CharInsert.

CSS-Pages for skins[edit | hide]

MediaWiki:Common.css · MediaWiki:Vector.css · MediaWiki:Monobook.css · MediaWiki:Modern.css · MediaWiki:Cologneblue.css · MediaWiki:Minerva.css · MediaWiki:Timeless.css