Hilfe:Hilfe
MediaWiki Hilfe
Update
Vorlagen
Siehe Vorlagen oder
Vorlagen können auch beliebige (?) Subpages sein, z.B. Sandbox/Vorlage1. Einzubinden dann auf der Seite Sandbox relativ mittels {{/Vorlage1}}.
Benutzung und Konfiguration von MediaWiki
- Liste der Konfigurationsvariablen
- Benutzerhandbuch (en)
- Benutzerhandbuch (de)
- Hilfe:Bilder (de)
- Configuration Settings (en)
- FAQ (en)
Namensräume
- Namensräume müssen in LocalSetting.php definiert werden. Ansonsten gilt "Namensraum:seite" nicht als Namensraum. Man erkennt die Gültigkeit auch daran, dass bei echten Namensräumen der erste Buchstabe hinter dem ":" beim Speichern automatisch groß geschreiben erscheint. Auch werden die Suchseiten automatisch um den neuen Namensraum erweitert.
Interwiki-Linking
- http://www.mediawiki.org/wiki/Manual:Interwiki
- http://de.wikibooks.org/wiki/MediaWiki/_InterWiki-Links
- http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Interwiki_linking
- http://www.mediawiki.org/wiki/Manual:Guide_to_setting_up_interwiki_linking
Sidebar anpassen
Hinweis: Die übergeordneten Menü-Titel dürfen keine Leerzeichen enthalten (da als id-Tag sonst nicht W3C-konform). Ggf. mit "_" trennen und dann in entsprechender Wiki-Seite "MediaWiki:Andere_Themen" Leerzeichen einfügen.
Siehe auch:
- How_do_I_change_the_contents_of_the_navigation_toolbar
- http://www.mediawiki.org/wiki/Manual:Navigation_bar
Layout
Tagline / Pagetitle
- MediaWiki:Tagline (siteSub)
- MediaWiki:Pagetitle
Session Timeout
Folgenden Parameter in /etc/php.ini setzen
session.gc_maxlifetime = 3600
PHP-Funktionalität im Wiki aktivieren
Folgende Funktion in includes/Setup.php hinzufügen:
function ParsePHPTag($Content)
{
global $wgOut;
$wgOut->enableClientCache(false);
ob_start();
eval($Content);
$Result = ob_get_contents();
ob_end_clean();
return($Result);
}
$wgParser->setHook('php','ParsePHPTag');
Um PHP in den Wiki-Seiten zu nutzen, statt <?PHP ... ?> nun <PHP> ... </PHP> verwenden.
Beispiel:
<PHP>
$db = mysql_connect("localhost", "userid", "userpassword");
mysql_select_db("testdb",$db);
$result = mysql_query("SELECT COUNT(*) zeilen FROM table",$db);
printf("Zeilen: %s\n", mysql_result($result,0,"zeilen"));
</PHP>
Links
Links zum eigenen Server können mittels der SERVER Variablen angelegt werden, z.B. KRÜDEWAGEN BLOG. Wiki-Syntax: [{{SERVER}}/blog/ KRÜDEWAGEN BLOG]
Dabei wird SERVER durch die komplette URL ersetzt, mit der das Wiki aufgerufen wurde (auch mit https möglich).
- Hinweis 1
Die SERVER Variable wird im Cache des Wikis (auf dem Server, pro Seite) gehalten, ändert sich also nicht zwangsläufig sofort bei Verwendung einer anderen URL. Cache kann mit &action=purge geleert werden.
- Hinweis 2
Wenn ein Link in der Sidebar gesetzt wird, wird die SERVER Variable nicht im Cache gehalten.
Wiki URL
- http://www.mediawiki.org/wiki/Manual:Short_URL
- http://www.mediawiki.org/wiki/Manual:Short_URL/wiki/Page_title_--_Apache_rewrite--root_access
Cache-Einstellungen
$wgParserCacheType = CACHE_ANYTHING; $wgParserCacheExpireTime = 3600; $wgEnableParserCache = true; $wgEnableSidebarCache = false;
Variablen
Siehe http://www.mediawiki.org/wiki/Help:Variables/de.
Tags mit Extensions und Templates
Siehe
- http://www.mediawiki.org/wiki/Manual:Tag_extensions#Extensions_and_Templates
- http://meta.wikimedia.org/wiki/Help:Magic_words#Formatting
Subpages
Siehe
- http://www.mediawiki.org/wiki/Help:Subpages
- http://meta.wikimedia.org/wiki/Sub_pages
- http://de.wikipedia.org/wiki/Hilfe:Unterseiten
- http://en.wikipedia.org/wiki/Wikipedia:Subpages
Subpages müssen per Namespace aktiviert werden.
Zur "Simulation" einer Subpage durch Anzeigen einer Navigation: http://de.wikipedia.org/wiki/Vorlage:Subpage
HowTo / FAQ
Wiki Redirects
#redirect [[Page]]
Clear cache for a page
Sometimes the MediaWiki caching system needs to be reset manually for a certain page.
- Go to the page
- Hit "history"
- Change the URL from "action=history" to "action=purge"
- Press "Enter"
Revert / Undo changes of a page
See http://en.wikipedia.org/wiki/Wikipedia:Revert.
Subpages
Subpage is a subpage of the current page. You can link to that subpage from any other page by Help:Contents/Sub1.
To activate subpages in the main namespace, add the following to LocalSettings.conf
$wgNamespacesWithSubpages[NS_MAIN] = true;
Change Sidebar
- Navigation/Sidebar change (as Sysop)
See also:
- How_do_I_change_the_contents_of_the_navigation_toolbar
- http://meta.wikimedia.org/wiki/Help:Navigation_bar
- http://www.mediawiki.org/wiki/Manual:Interface/Sidebar
Change toolbar link text
Since addMessages() has been removed, some extensions don't print a proper link text any more when added into the toolbar.
- Check the related message page by appending ?uselang=qqx' to the page's index.php/, for example
http://www.kruedewagen.de/wiki/index.php?uselang=qqx http://www.kruedewagen.de/wiki/index.php?title=Sandbox&uselang=qqx
- Edit or create that message page in the MediaWiki namespace, for example
MediaWiki:Smw_browselink
Add user
Special:Userlogin (as Sysop)
Reset user password
This can only be done by the following SQL statements
- Find out the user_id
select user_id, user_name from user where user_name='myname';
- Set a new password
update user set user_password = md5(CONCAT('123-',md5('newpassword'))) WHERE user_id=123;
Increase Session Timeout
Set the following parameter in /etc/php.ini for increasing the session timeout (that's the maximum time you need to save the page you are editing without losing your work):
session.gc_maxlifetime = 3600
HTML code listings
HTML code like <h1> should be enclosed with <nowiki></nowiki> tags,even if they are already enclosed with "pre" tags. Otherwise mediawiki will corrupt the page if you edit a single section (bug?).
Sample wiki syntax:
<h1>Caption</h1>
Embed Template or Page
- Template: {{template_name}}
- Page: {{:page_name}}
How do I rename my Wiki
See http://www.mediawiki.org/wiki/Manual_talk:FAQ#How_do_I_rename_my_wiki.3F .
Configure Wiki-specific Favicon
The favicon file should have 16x16 pixels. Add to LocalSettings.php:
$wgFavicon = "$wgScriptPath/rawino_logo.ico";
Sortable Table
| Row 1 | Row 2 | Row 3 |
| a | b | 3 |
| x | y | 2 |
| c | f | 1 |
Source Code Listings
Source code can be listed within <source lang="php"></source> tags. This feature is provided by the SyntaxHighlight_GeSHi extension.
Example:
// Extension SyntaxHighlight_GeSHi require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");
You can also combine this with the the Pre2 template (see below).
Pre-Formatting Text
Two templates Template:Pre and Template:Pre2 can be used for pre-formatting text with long lines. Even Template:Pre2 adds line breaks in the wiki output, it can also add a scroll bar.
Pre2: {{Pre2|text}}
mkdir -p /var/tmp/mucontrol_image/dists/etch/main/installer-i386/current/images/cdrom/ wget http://ftp.debian.org/dists/etch/main/installer-i386/current/images/cdrom/debian-cd_info.tar.gz -O /var/tmp/mucontrol_image/dists/etch/main/installer-i386/current/images/cdrom/debian-cd_info.tar.gz wget http://ftp.debian.org/dists/etch/main/installer-i386/current/images/cdrom/initrd.gz -O /var/tmp/mucontrol_image/dists/etch/main/installer-i386/current/images/cdrom/initrd.gz wget http://ftp.debian.org/dists/etch/main/installer-i386/current/images/cdrom/vmlinuz -O /var/tmp/mucontrol_image/dists/etch/main/installer-i386/current/images/cdrom/vmlinuz
Pre2 with scrolling: {{Pre2|scroll|text}}
mkdir -p /var/tmp/mucontrol_image/dists/etch/main/installer-i386/current/images/cdrom/ wget http://ftp.debian.org/dists/etch/main/installer-i386/current/images/cdrom/debian-cd_info.tar.gz -O /var/tmp/mucontrol_image/dists/etch/main/installer-i386/current/images/cdrom/debian-cd_info.tar.gz wget http://ftp.debian.org/dists/etch/main/installer-i386/current/images/cdrom/initrd.gz -O /var/tmp/mucontrol_image/dists/etch/main/installer-i386/current/images/cdrom/initrd.gz wget http://ftp.debian.org/dists/etch/main/installer-i386/current/images/cdrom/vmlinuz -O /var/tmp/mucontrol_image/dists/etch/main/installer-i386/current/images/cdrom/vmlinuz
Page breaks in PDF output
You can force a page break in the PDF output using the RawMsg extension by adding one of the following to your wiki page:
- Using the extension directly:
{{#rawmsg:pagebreak}}
- Using the Template:pagebreak template:
{{pagebreak}}
See also HTMLDOC comments.
Timelines
Extension EasyTimeline mit Ploticus.
Beispiel 1:
Beispiel 2:
Semantic MediaWiki
- Set a property: [[attTest::Dummyentry]]: Dummyentry
- Hide a property: [[attTest::Dummyentry| ]]:
- Enter Property/Attribute page, will list all pages with that property: [[Property:attTest]] , Example:Property:attTest
- Set data type of a property: Write e.g. [[Has type::number]] into the page of the property [[Property:attTest]], Example:Property:attTest
- List of all data types: Special:Types
- List of all data properties: Special:Properties
- Semantic Search: Special:Ask
- Query Sample: Dummyentry,
- Search by property: Special:SearchByProperty
- Inline Query: {{#ask: [[attTest::Dummyentry]] | ?attTest | ?attTest2}}:
- Inline Query: {{#ask: [[attTest2::2000]] | ?attTest | ?attTest2}}:
| AttTest | AttTest2 | |
|---|---|---|
| Hilfe | Dummyentry |
- Inline Query (show): {{#show: Dummyentry | ?attTest2 = }},
- Create Concept: Enter {{#concept: [[attTest2::2000]] | Descrition of Concept }} on page [[Concept::TestConcept]]
Semantic Forms
- Create Property: Special:CreateProperty
- Create Template: Special:CreateTemplate
- Create Form: Special:CreateForm
- Create Category: Special:CreateCategory
- Create/Edit page based on a form: [[Form:NameOfForm]]: Form:ReMoSCellStatus
See mediawiki.org