User:Stefahn/Docu

MediaWiki Docu

 * Manual:FAQ
 * Manual
 * Book "Working with MediaWiki" (by Yaron Koren): workingwithmediawiki.com
 * List of configuration variables
 * Mailinglist of new MediaWiki versions
 * Commoncraft explains how Wikipedia works

Updating / Debugging

 * Manual:Upgrading
 * If you get an empty page, chances are there is a fatal PHP error - see Manual:How to debug how to turn on error messages

Hooking / Building custom extensions

 * Extensions_FAQ
 * To insert HTML on edit pages only: Manual:Hooks/EditPage::showEditForm:fields (maybe there's a better hook, but it works with this one)
 * If custom hook doesn't work: Check if custom php file is included in LocalSettings.php first ;)
 * How to render wikitext in one's extension -  doesn't seem to work in my "usual" extensions (not special pages)

Ways to add HTML output
Don't quote me on that, I might be wrong / not completely right.

If OutputPage object is passed to function
 * Use  in function definition, like.
 * Then use one of the following:

If OutputPage object is not passed to function
 * Use:
 * Then use one of the following:

Templates

 * See which pages include a certain template: Navigate to template and hit "What links here" (in the toolbox)
 * Use "|" as an screen output in templates: " &amp;#124; ", Example
 * Use table in template: with Template:!, Example
 * String templates: w:Template:String_templates_see_also_text

Including

 * If the source is in the Template namespace, just use the name itself, alone:
 * If the source is in the Main article namespace, you must put a colon in front of the name, thus:
 * If the source is in any other namespace (e.g., "User:Example"), you must use the full name, including the namespace, thus:
 * Noinclude, includeonly, onlyinclude:
 * noinclude: displayed only when the template page is being viewed directly; will not be included; useful for a description how to use the template and for
 * includeonly: displayed only when the page is being included. Useful for adding all pages containing a given template to a category, but not the template itself.
 * onlyinclude: only text surrounded by "onlyinclude" markup should be transcluded onto another page. It often overrules the other include tags: If there is at least one pair of "onlyinclude" tags on a page, then whenever this page is transcluded, it is only the material within the "onlyinclude" tags which gets transcluded.

Skins

 * German skin docu on WikiPedia: w:de:Wikipedia:Technik/Skin

Cool skins

 * http://paulgu.com/wiki/Mediawiki_Skins (Using it myself on http://geld-verdienen-wiki.de)
 * http://www.baldursgatewiki.com/wiki/MediaWiki:Vector.css
 * http://gomediawiki.com/wiki/Free_wiki_skin (Example: critical-mass-rides.co.cc (no link since it was recognized as spam!?))
 * Skin:Erudite

Learn skinning:
 * http://blog.redwerks.org/2012/02/08/mediawiki-skinning-tutorial/
 * http://www.earlgreyandbattenburg.co.uk/books/mediawiki-skins-design/

Ideas:
 * http://www.wikipediaRedefined.com/

Mobile skins
TO TEST:
 * WPTouch
 * Simple_mobile_skin_auto_change

Show content only to logged-in users
Ways to show content only to logged-in users, not anons ("show" means "print on screen"):

1st solution: common.js use something like your wikitext ; in MediaWiki:common.css add: .anononly { display: none; } and in MediaWiki:common.js add if ( !mw.user.isAnon ) { $( '.anononly' ).removeClass( 'anononly' ); }

Tried it and failed - tried the example shown here and replaced isanon with anonymous (since I used 1.19.2) but still no message.

2nd solution: CSS

In MW 1.16.2 I used this code to load a custom CSS sheet (in my PHP skin file) - this code still works with 1.19.2: global $wgUser; if (!$wgUser->isLoggedIn) { $out->addStyle( 'vector/anon.css', 'screen' ); }

Create a file "anon.css" (in the skins/vector directory) and add: .noanon { display: none; }

Then in your wikitext add the following class if you don't want to show content to anons (that means if you want to show content only to logged-in users): bla bla (visible to everyone) Only visible to logged-in users

Misc

 * A better diff tool that recognizes if a wikitext block was only moved: http://www.mediawiki.org/wiki/Thread:Project:Support_desk/Better_diff_tool%3F#Better_diff_tool.3F_18763
 * Shows the number and growth of WikiPedia authors: http://stats.wikimedia.org/DE/ChartsWikipediaEN.htm
 * If you use Sitenotice chances are Google will show the sitenotice text instead of the page content in the SERPs. Use no index for the sitenotice (?).

Linking

 * Linking between Wikis: http://meta.wikimedia.org/wiki/Help:Interwiki_linking, Link on german wikipedia: Artikel
 * Template:Softredirect
 * Linking to user's user page:
 * Manual:Redirect_to_the_user's_user_page
 * Manual:Redirect_to_the_user's_user_page

Caching

 * Caching on SMW: http://semantic-mediawiki.org/wiki/FAQ#Why_doesn.27t_data_I_have_just_added_show_up_in_queries.3F
 * Only single page:
 * http://www.mwusers.com/forums/showthread.php?15954-Is-it-possible-to-disable-cache-for-a-particular-page
 * worked for me (1.19.2): Extension:Winter with

Database

 * To keep database size small the contents of objectcache table may be deleted (delete only the contents of this table, no other one!) - see http://www.mediawiki.org/wiki/Manual:Objectcache_table and http://www.mediawiki.org/wiki/Thread:Project:Support_desk/How_to_use_only_small_images_from_commons.wikimedia.org%3F#How_to_use_only_small_images_from_commons.wikimedia.org.3F_16262

Magic Words

 * List of Magic Words

Connecting WordPress with MediaWiki

 * Use Extension:WPMW
 * If WordPress (WP) is not installed in a higher level folder but in the same folder as MediaWiki (MW) use this WordPress plugin to fix cookie problems

Special folder structure

Say you want your wiki to be located at example.com/wiki and at the same time you want your WordPress pages to be at example.com/word and example.com/press.

We assume that MW is installed in folder root/mediawiki and WordPress in root/wordpress.

Ways I tried to achieve this: -> FAIL
 * You can tell your WordPress to be at another location that you installed it in - just edit "Site Address (URL)" in "General settings". I tried to enter http://example.com there and followed the instructions shown here. I managed to get my WP running under example.com - however (as one could expect) the wiki was no longer accessible (since I had to replace the wiki's .htaccess with the one from WP)