User:Stefahn/Docu

MediaWiki Docu

 * Manual:FAQ
 * Manual
 * Book "Working with MediaWiki" (by Yaron Koren): workingwithmediawiki.com
 * List of configuration variables
 * Lots of advice: http://wiki.laub-home.de/wiki/MediaWiki (German)
 * Mailinglist of new MediaWiki versions
 * Commoncraft explains how Wikipedia works

SEO

 * Lots of tips & tricks (German)
 * Optional: Set some links to be follow (no nofollow) (German)
 * To read:
 * http://www.richardcarterconsultancy.com/2012/07/5-tips-to-improve-your-mediawiki-sites-seo/
 * http://bundu.hubpages.com/hub/Give-your-MediaWiki-Installation-an-SEO-optimisation-and-add-Advertising
 * http://blog.säsongsmat.nu/2012/07/31/adding-authorship-information-to-mediawiki-pages/

Short URLs
RewriteRule ^wiki/(.*)$ /mediawiki/index.php?title=$1 [PT,L,QSA] RewriteRule ^wiki/*$ /mediawiki/index.php [L,QSA] RewriteRule ^/*$ /mediawiki/index.php [L,QSA]
 * very important!short URLs
 * What I use in my .htaccess files:
 * Last line redirects domain.com to domain.com/wiki/Mainpage

Updating / Debugging

 * Version lifecycle - Information about MW Versions - including info about Long term support (LTS)
 * 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

Extensions

 * See also my site User:Stefahn/Extensions

Useful extensions

 * 100 most popular MW extensions
 * Extensions in use on my site Secret Wiki
 * Show a list of users who have contributed to an article:
 * Extension:Contributors: used often, works after this and this hack, in includable version contributors are sorted by edits, but not linked and there is no number of edits -> managed to hack the code so that users are linked and number of edits are shown :)
 * Extension:Contribution_Credits: ordered by username, stable, used 6 times (works!), managed to remove certain usernames by hacking extension
 * Extension:Uniwiki_Authors: old, unordered list, hack to show only users who contributed certain number of bytes, according to Wikipiary: not used
 * Extension:PageBy: excludes bots and anons, ordered by edits?, very old, used 6 times (but couldn't see it on two of those wikis)
 * Extension:AuthorInfo: limit number of shown users, not used, code completely outdated
 * Extension:Semantic_Extra_Special_Properties: unordered, output as a property (I can adapt it via ask function)

Failed extensions
Extensions I tried and didn't find to be useful (so far).

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

Parameters

 * How to use parameters in templates: Template
 * When applying ParserFunctions to template parameters, a pipe symbol ("|") may be used - see Help:Parser functions in templates
 * Only output parameter if it's non empty:

Including
Go the page, click on "What links here" and "Hide Links" and "Hide redirects". Then one can see the transclusions easily.
 * 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.
 * If you want to know on which pages you've included a certain other page (with ):

Skins / CSS

 * To change the way MediaWiki pages print, you put CSS into MediaWiki:Print.css on your wiki.
 * All stylesheets MW uses: Manual:Interface/Stylesheets

Cool skins

 * http://energypedia.info - uses Iswiki skin developed by http://idea-sketch.com (my guess)
 * http://docs.webplatform.org
 * http://sunshinereview.org/index.php/Portal:WikiFOIA
 * http://www.whoinspired.com/
 * http://paulgu.com/wiki/Mediawiki_Skins - Using it myself on http://geld-verdienen-wiki.de)
 * Vector skin with horizontal menu and drop down: http://www.baldursgatewiki.com/wiki/MediaWiki:Vector.css
 * http://gomediawiki.com/wiki/Free_wiki_skin (Example: critical-mass-rides.co.cc)
 * Skin:Erudite
 * Nimbus_skin - Example: http://www.halopedia.org/

Learn skinning:
 * Manual:Skinning/Tutorial
 * German skin docu on WikiPedia: w:de:Wikipedia:Technik/Skin
 * http://www.earlgreyandbattenburg.co.uk/books/mediawiki-skins-design/
 * http://blog.blue-spice.org/2012/10/01/mediawiki-skins-a-visual-feast/

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

Mobile skins

 * WPTouch
 * Simple_mobile_skin_auto_change
 * Use other skin for mobile devices (German)
 * How to use mobile theme of Wikipedia (German)

Show content only to logged-in users
Ways to show content only to logged-in users and not to 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

3rd solution

Maybe someday we can use a User group CSS file - see Manual:User_group_CSS_and_Javascript and this discussion

Discussions & Watch/Unwatch

 * Edit watchlist: Special:EditWatchlist, in German Spezial:Beobachtungsliste_bearbeiten
 * If a watched page is moved, the old and the new are watched after the move (result of a test by myself).

Liquid Threads

 * There are 2 user preferences (see Manual:$wgDefaultUserOptions at the very end of the table):
 * lqt-watch-threads: Selbst erstellte oder von mir bearbeitete Themen beobachten (true by default)
 * lqtnotifytalk: Bei Antworten zu beobachteten Themen E-Mails senden (false by default)
 * Problems (with 2.0 alpha):
 * lqt-watch-threads works - but after replying to a thread you have to refresh the page (clear cache) to see "unwatch" instead of "watch" (if you start a new thread it works just fine).
 * Namespaces that LQT adds: Extension_default_namespaces

Parser functions
):
 * Documentation for parser function #if: Help:Extension:ParserFunctions
 * #if and tables: To prevent empty paragraphs and breaks use this code (notice the
 * usual cells
 * without if
 * without if

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
 * 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 (?).
 * Allow HTML:
 * When $wgRawHtml=true, the wiki will allow raw unchecked HTML in ... sections
 * You can't set group permissions to allow some to use raw HTML and some to not use it.
 * Better solution: Extension:Secure HTML
 * List of MW farms: http://wikiapiary.com/wiki/Farm:Main_Page
 * Blog article about User engagement: http://blog.wikimedia.org/2013/02/22/onboarding-results/, Suggest Bot: https://en.wikipedia.org/wiki/User:SuggestBot
 * Searching:
 * Some search operations
 * List of Magic Words
 * Messages / Language
 * If you want to see system messages in another language add  to the URL (for english use   for example)
 * You can find the message you want to change by adding  to the URL.
 * Sitemap:
 * Generate Sitemap via shell: http://wiki.laub-home.de/wiki/Mediawiki_Sitemap_erstellen (German)
 * Copyright:
 * MediaWiki:Copyright is shown only if $wgRightsText is set (also works if one uses )

Security

 * Make a mirror of your wiki: http://wiki.laub-home.de/wiki/Mediawiki_Mirror_Skript (German)

TOC / Headlines

 * Making a heading that does not show up in TOC: http://meta.wikimedia.org/wiki/Help:Section#Making_a_heading_that_does_not_show_up_in_ToC - alternative: http://en.wikipedia.org/wiki/Template:Fake_heading
 * anywhere on the page will remove the edit links.

jQuery

 * jQuery has been introduced in MediaWiki core as of MediaWiki 1.16 and is loaded by default on every page as of 1.17 (see JavaScript).
 * One doesn't find any "jquery" term within the source code of the page though.
 * Add jquery ready function to Mediawiki:Common.js - without script tags - just write $(document).ready(function {

Categories

 * Hide Categories by adding  to category page (see Help:Categories)
 * Showing number of pages in subcategories (instead of number of subcats)
 * Hiding certain pages in categories is not possible (see here).
 * Help:Categories says: "It is a good idea to organize all categories into a hierarchy with a single top level category." See also this support thread.
 * Thread:Project:Support desk/Random page from certain category?

Statistics

 * Collects, displays and analyzes information about the usage and performance of MediaWiki websites: http://wikiapiary.com/wiki/Main_Page
 * Shows the number and growth of WikiPedia authors: http://stats.wikimedia.org/DE/ChartsWikipediaEN.htm
 * List of mediawikis: http://wikistats.wmflabs.org/
 * Visualizations about Wikimedia stuff: http://infodisiac.com/Wikimedia/Visualizations/
 * Shows recent changes on a map - nice! http://rcmap.hatnote.com/#en

MediaWiki Blogs

 * http://www.ykatkov.name/

Linking

 * Linking between Wikis: http://meta.wikimedia.org/wiki/Help:Interwiki_linking, Link on german wikipedia: Artikel
 * Template:Softredirect
 * To display a link without the arrow icon, place the external link syntax between  tags.
 * 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

Wikitext
Some special wikitext:
 * = horizontal rule
 * = show code in PHP highlighting (requires Extension:SyntaxHighlight GeSHi)

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)

MediaWiki Companies and webworker

 * MediaWiki_vendors
 * Third-party MediaWiki users discussion
 * SMW Professionals: http://semantic-mediawiki.org/wiki/Professional_support
 * Mailing list "MediaWiki for enterprises": https://lists.wikimedia.org/mailman/listinfo/mediawiki-enterprise
 * http://wikiworks.com/
 * http://idea-sketch.com/leistungen/wikis
 * http://www.wiki-service.biz/
 * http://www.wikihoster.net/
 * http://firmenwikis.seibert-media.net/?Seed=Unternehmenswiki