Hilfe:Hilfe: Unterschied zwischen den Versionen

aus www.kruedewagen.de, Homepage von Ralf und Judith Krüdewagen (Kruedewagen)
Zur Navigation springen Zur Suche springen
KKeine Bearbeitungszusammenfassung
 
(89 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
Siehe die [http://meta.wikipedia.org/wiki/MediaWiki_i18n Dokumentation zur Anpassung der Benutzeroberfläche]
== MediaWiki Hilfe ==
und das [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide Benutzerhandbuch] für Hilfe zur Benutzung und Konfiguration.


*MediaWiki [http://de.wikipedia.org/wiki/Hilfe:MediaWiki Benutzerhandbuch (de)]
=== Update ===
*http://www.mediawiki.org/wiki/Help:Upgrading_to_1.6
 
=== Vorlagen ===
Siehe [[Vorlagen]] oder
*[[:Kategorie:Vorlage:Formatierungshilfe]]
*[[:Kategorie:Vorlage:Baustein]]
 
Vorlagen können auch beliebige (?) Subpages sein, z.B. [[Sandbox/Vorlage1]]. Einzubinden dann z.B. auf der Seite [[Sandbox#Vorlagen|Sandbox]] '''relativ''' mittels <nowiki>{{/Vorlage1}}</nowiki>.
 
Auflisten der Seiten, die eine Vorlage verwenden mittels: <nowiki>{{Vorlage:Vorlagennutzer}}</nowiki>
 
=== Benutzung und Konfiguration von MediaWiki ===
*[http://www.mediawiki.org/wiki/Manual:Configuration_settings Liste der Konfigurationsvariablen]
*[http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide Benutzerhandbuch (en)]
*[http://de.wikipedia.org/wiki/Hilfe:MediaWiki Benutzerhandbuch (de)]
*[http://de.wikipedia.org/wiki/Hilfe:Bilder Hilfe:Bilder] (de)
*[http://www.mediawiki.org/wiki/Help:Configuration_settings Configuration Settings (en)]
*[http://meta.wikimedia.org/wiki/MediaWiki_FAQ FAQ (en)]
 
*http://meta.wikimedia.org/wiki/Using_a_very_short_URL
 
====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
 
Beispiel:
<nowiki>INSERT INTO interwiki (iw_prefix, iw_url, iw_local, iw_trans, iw_api, iw_wikiid) VALUES ('kruedewagen','http://www.kruedewagen.de/wiki/$1', 1, 0, '', '');</nowiki>
 
==== Sidebar anpassen ====
*[[MediaWiki:Sidebar | Navigation/Sidebar ändern]]
 
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:
*[http://meta.wikimedia.org/wiki/MediaWiki_FAQ#How_do_I_change_the_contents_of_the_navigation_toolbar.3F How_do_I_change_the_contents_of_the_navigation_toolbar]
*http://www.mediawiki.org/wiki/Manual:Navigation_bar
 
==== Layout ====
*[http://meta.wikimedia.org/wiki/Layout_customization Layout customization]
 
==== 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 <tt>includes/Setup.php</tt> hinzufügen:
<pre>
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');
</pre>
 
Um PHP in den Wiki-Seiten zu nutzen, statt <?PHP ... ?> nun <PHP> ... </PHP> verwenden.
 
Beispiel:
 
<pre>
<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>
</pre>
 
==== Links ====
Links zum eigenen Server können mittels der SERVER Variablen angelegt werden, z.B. [{{SERVER}}/blog/ KRÜDEWAGEN BLOG]. Wiki-Syntax: <nowiki>[{{SERVER}}/blog/ KRÜDEWAGEN BLOG]</nowiki>
 
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 <tt>&action=purge</tt> geleert werden.
*'''Hinweis 2'''
Wenn ein Link in der Sidebar gesetzt wird, wird die SERVER Variable nicht im Cache gehalten.
 
==== Links mit "action" Parameter ====
Siehe http://www.sciencemedianetwork.org/wiki/Mediawiki_templates_for_edit_and_history
 
Beispiel-Link zur Versionsgeschichte:
<nowiki><span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=history}} edit history]</span></nowiki>
 
Hinweis: Mit dem "span" wird der Link als "intern" markiert.
 
==== 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 ====
<pre>
$wgParserCacheType = CACHE_ANYTHING;
$wgParserCacheExpireTime = 3600;
 
$wgEnableParserCache = true;
$wgEnableSidebarCache = false;
</pre>
 
==== 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
 
==== Copyright-Text im Footer und Editor ändern ====
*http://www.mediawiki.org/wiki/Copyright
*http://www.mediawiki.org/wiki/Manual:Configuration_settings#Copyright
 
Warnung im Editor:
*[[MediaWiki:Copyrightwarning]]
*[[MediaWiki:Copyrightwarning2]] (greift falls $wgRightsPage, $wgRightsText leer sind)
 
Anpassung im Footer in ''LocalSettings.php'':
<pre>
$wgRightsPage = "www.kruedewagen.de:Lizenz"; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "CC BY-NC-SA 3.0";
$wgRightsIcon = "{$wgUploadPath}/f/f2/By-nc-sa.eu.svg";
</pre>
 
Siehe auch [[www.kruedewagen.de:Lizenz|Lizenz]].
 
==== Footer ändern ====
*http://www.mediawiki.org/wiki/Manual:Footer
 
==== Skin anpassen ====
*Beobachtungsliste mit Stern-Symbol: http://www.mediawiki.org/wiki/Manual:$wgVectorUseIconWatch
*http://de.wikipedia.org/wiki/Wikipedia:Technik/Skin
 
== 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 ===
<pre>
#redirect [[Page]]
</pre>
 
=== 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 ===
[[/Sub1|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 ===
*[[MediaWiki:Sidebar | Navigation/Sidebar change]] (as Sysop)
 
See also:
*[http://meta.wikimedia.org/wiki/MediaWiki_FAQ#How_do_I_change_the_contents_of_the_navigation_toolbar.3F 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 <nowiki><h1></nowiki> should be enclosed with <nowiki><nowiki></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:
<pre><nowiki><h1>Caption</h1></nowiki></pre>
 
=== Embed Template or Page ===
*Template: <nowiki>{{template_name}}</nowiki>
*Page: <nowiki>{{:page_name}}</nowiki>
 
=== How do I rename my Wiki ===
See http://www.mediawiki.org/wiki/Manual_talk:FAQ#How_do_I_rename_my_wiki.3F .
 
=== Dump Import ===
Nach einem XML Export kann man eine neue Seite importieren durch Anpassen der XML Datei.
 
<source lang="XML">
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.6/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.6/ http://www.mediawiki.org/xml/export-0.6.xsd" version="0.6" xml:lang="en">
  <siteinfo>
  ...
  </siteinfo>
  <page>
    <title>Testimport1</title>
    <ns>0</ns>
    <revision>
      <contributor>
        <username>Username</username>
        <id>99</id>
      </contributor>
      <text xml:space="preserve">Das ist der Source Code der Wiki Seite</text>
    </revision>
  </page>
</mediawiki>
</source>
 
Siehe auch:
*http://www.mediawiki.org/wiki/Manual:Importing_XML_dumps
*http://biowikifarm.net/meta/Mediawiki_XML_page_importing
 
Hinweise:
*<siteinfo> aus einem aktuellen Export verwenden.
*Mehrere <page> Elemente können eingefügt werden.
*<username>Username</username> und <id>99</id> müssen angepasst werden gemäß den Werten aus [[Spezial:Einstellungen]].
*Existierende Seiten gemäß <title> werden überschrieben.
*Import nur von Admin möglich.
 
=== Configure Wiki-specific Favicon ===
The favicon file should have 16x16 pixels. Add to LocalSettings.php:
$wgFavicon = "$wgScriptPath/rawino_logo.ico";
 
=== Sortable Table ===
*http://de.wikipedia.org/wiki/Hilfe:Tabellen_f%C3%BCr_Fortgeschrittene
{| {{Prettytable_Sortable}}
!Row 1
!Row 2
!Row 3
|-
|a
|b
|3
|-
|x
|y
|2
|-
|c
|f
|1
|}
 
Sortable table (header must be given with "!"), see [http://en.wikipedia.org/wiki/Help:Sorting Sorting]:
{| width="90%" {{Prettytable_Sortable}}
|- {{Highlight1}}
!Col A
!Col B
!class="unsortable"|Col C
!data-sort-type="isoDate"|'''Date'''
|-
|x
|y
|1
|01-Jan-2010
|-
|a
|z
|2
|11-Dec-2012
|-
|bv
|ui
|3
|31-Jul-2011
|}
 
=== Source Code Listings ===
Source code can be listed within '''<nowiki><source lang="php"></source></nowiki>''' tags. This feature is provided by the [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi SyntaxHighlight_GeSHi] extension.
 
Example:
<source lang="php">
// Extension SyntaxHighlight_GeSHi
require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");
</source>
 
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:''' <nowiki>{{Pre2|text}}</nowiki>
{{Pre2|
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:''' <nowiki>{{Pre2|scroll|text}}</nowiki>
{{Pre2|scroll|
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 [http://www.mediawiki.org/wiki/Extension:RawMsg RawMsg] extension by adding one of the following to your wiki page:
 
*Using the extension directly:
<nowiki>{{#rawmsg:pagebreak}}</nowiki>
 
*Using the [[Template:pagebreak]] template:
<nowiki>{{pagebreak}}</nowiki>
 
See also [http://www.htmldoc.org/documentation.php/Comments.html HTMLDOC comments].
 
=== Timelines ===
Extension [http://www.mediawiki.org/wiki/Extension:EasyTimeline EasyTimeline] mit [http://ploticus.sourceforge.net Ploticus].
 
Beispiel 1:
 
<timeline>
TimeAxis  = orientation:horizontal
ImageSize = width:680 height:200
PlotArea  = width:620 height:150 bottom:50 left:20
DateFormat = dd/mm/yyyy
#AlignBars = early
Period    = from:01/12/2004 till:01/02/2009
 
# Colors see http://ploticus.sourceforge.net/doc/color.html
Colors =
  id:canvas value:rgb(0.97,0.97,0.97)
  id:grid  value:rgb(0.86,0.86,0.86)
  id:bars  value:gray(0.85)
 
  id:magenta1  value:magenta #
  id:orange1  value:orange #
  id:green2  value:brightgreen #
  id:purple1  value:purple #
  id:blue2  value:darkblue #
  id:blue3  value:powderblue #
  id:orange2  value:lightorange #
  id:yellow1  value:yellow #
  id:green3  value:teal #
 
ScaleMajor = unit:month increment:1 start:01/01/2005 gridcolor:grid
BackgroundColors = canvas:canvas
 
BarData=
  barset:pert
  bar:Monat
 
PlotData=
 
# set defaults
  width:25 fontsize:M textcolor:black align:left anchor:from shift:(10,-5) color:bars
 
  barset:pert
 
  from:01/12/2004 till:31/03/2005 color:blue3 text:"P h a s e 1"
  from:01/04/2005 till:30/09/2005 color:orange2 text:"P h a s e 2"
  from:01/10/2005 till:30/04/2006 color:yellow1 text:"P h a s e 3"
  from:01/05/2006 till:10/11/2006 color:green3 text:"P h a s e 4"
  from:12/11/2006 till:31/07/2007 color:red text:"P h a s e 5"
  from:01/08/2007 till:28/04/2008 color:orange1 text:"P h a s e 6"
  from:29/04/2008 till:30/11/2008 color:green2 text:"P h a s e 7"
 
  bar:Monat width:5 align:center fontsize:S shift:(0,-45) anchor:middle color:canvas
  from:01/01/2005 till:01/02/2005 text:Jan
  from:01/03/2005 till:01/04/2005 text:Mar
  from:01/05/2005 till:31/05/2005 text:May
  from:01/07/2005 till:31/07/2005 text:Jul
  from:01/09/2005 till:01/10/2005 text:Sep
  from:01/11/2005 till:01/12/2005 text:Nov
 
  from:01/01/2006 till:01/02/2006 text:Jan
  from:01/03/2006 till:01/04/2006 text:Mar
  from:01/05/2006 till:31/05/2006 text:May
  from:01/07/2006 till:31/07/2006 text:Jul
  from:01/09/2006 till:01/10/2006 text:Sep
  from:01/11/2006 till:01/12/2006 text:Nov
 
  from:01/01/2007 till:01/02/2007 text:Jan
  from:01/03/2007 till:01/04/2007 text:Mar
  from:01/05/2007 till:31/05/2007 text:May
  from:01/07/2007 till:31/07/2007 text:Jul
  from:01/09/2007 till:01/10/2007 text:Sep
  from:01/11/2007 till:01/12/2007 text:Nov
 
  from:01/01/2008 till:01/02/2008 text:Jan
  from:01/03/2008 till:01/04/2008 text:Mar
  from:01/05/2008 till:31/05/2008 text:May
  from:01/07/2008 till:31/07/2008 text:Jul
  from:01/09/2008 till:01/10/2008 text:Sep
  from:01/11/2008 till:30/11/2008 text:Nov
 
  from:01/01/2009 till:01/02/2009 text:Jan
</timeline>
 
Beispiel 2:
<timeline>
ImageSize = width:900 height:auto barincrement:20
PlotArea  = top:10 bottom:30 right:130 left:20
AlignBars = early
 
DateFormat = dd/mm/yyyy
Period    = from:01/01/2008 till:31/12/2008
TimeAxis  = orientation:horizontal
ScaleMajor = grid:black unit:month increment:1 start:01/01/2008
 
# Colors see http://ploticus.sourceforge.net/doc/color.html
 
Colors    =
  id:canvas      value:rgb(0.97,0.97,0.97)
  id:c1  value:green
  id:c2  value:red
  id:c3  value:blue
  id:c4  value:tan2
  id:c5  value:magenta
  id:c6  value:black
  id:c7  value:orange
  id:c8  value:claret
  id:c9  value:magenta #
  id:c10  value:orange #
  id:c11  value:darkblue
  id:c12  value:yellow
  id:c13  value:teal
  id:c14  value:brightblue
 
  id:free  value:brightgreen
  id:purple1  value:purple #
  id:blue2  value:darkblue #
  id:eddchri  value:powderblue #
  id:orange2  value:lightorange #
  id:yellow1  value:yellow #
#  id:green3  value:teal #
 
Backgroundcolors = canvas:canvas
 
BarData =
  barset:Vacation
  bar:Monat
 
PlotData=
 
  barset:Vacation width:5 align:left fontsize:S shift:(5,-4) anchor:till
  from:04/02/2008 till:04/02/2008 color:c1 text:"[[name1]](04.02)"
  from:14/03/2008 till:14/03/2008 color:c1 text:"[[name1]](14.03)"
  from:11/04/2008 till:14/04/2008 color:c2 text:"[[name2]](11.-14.04)"
  from:02/05/2008 till:02/05/2008 color:c1 text:"[[name1]](02.05)"
  from:02/05/2008 till:02/05/2008 color:c2 text:"[[name2]](02.05)"
  from:23/05/2008 till:23/05/2008 color:c1 text:"[[name1]](23.05)"
  from:15/09/2008 till:19/09/2008 color:c1 text:"[[name1]](15.-19.09)"
  from:24/12/2008 till:24/12/2008 color:c1 text:"[[name1]](24.12)"
  from:31/12/2008 till:31/12/2008 color:c2 text:"[[name2]](31.12)"
  barset:skip
 
  from:31/12/2008 till:31/12/2008 color:c3 text:"[[name3]](31.12)"
 
  barset:skip
 
  from:31/12/2008 till:31/12/2008 color:c4 text:"[[name4]](31.12)"
 
  barset:skip
 
  from:31/12/2008 till:31/12/2008 color:c5 text:"[[name5]](31.12)"
 
  barset:skip
 
  bar:Monat width:5 align:center fontsize:S shift:(0,-20) anchor:middle color:canvas
  from:01/01/2008 till:01/02/2008 text:Jan
  from:01/02/2008 till:01/03/2008 text:Feb
  from:01/03/2008 till:01/04/2008 text:Mar
  from:01/04/2008 till:01/05/2008 text:Apr
  from:01/05/2008 till:01/06/2008 text:Mai
  from:01/06/2008 till:01/07/2008 text:Jun
  from:01/07/2008 till:01/08/2008 text:Jul
  from:01/08/2008 till:01/09/2008 text:Aug
  from:01/09/2008 till:01/10/2008 text:Sep
  from:01/10/2008 till:01/11/2008 text:Okt
  from:01/11/2008 till:01/12/2008 text:Nov
  from:01/12/2008 till:31/12/2008 text:Dez
</timeline>
 
== Semantic MediaWiki ==
*Set a property: <nowiki>[[attTest::Dummyentry]]</nowiki>: [[attTest::Dummyentry]]
*Hide a property: <nowiki>[[attTest::Dummyentry| ]]</nowiki>: [[attTest::Dummyentry| ]]
*Enter Property/Attribute page, will list all pages with that property: <nowiki>[[Property:attTest]]</nowiki> , Example:[[Property:attTest]]
*Set data type of a property: Write e.g. <nowiki>[[Has type::number]]</nowiki> into the page of the property <nowiki>[[Property:attTest]]</nowiki>, Example:[[Property:attTest]]
 
 
*List of all data types: [[Special:Types]]
*List of all data properties: [[Special:Properties]]
*Semantic Search: [[Special:Ask]]
**Query Sample: [[attTest::Dummyentry]], [[attTest::]]
*Search by property: [[Special:SearchByProperty]]
 
 
*Inline Query: <nowiki>{{#ask: [[attTest::Dummyentry]] | ?attTest | ?attTest2}}</nowiki>:
{{#ask: [[attTest2::2000]]
| ?attTest
| ?attTest2
}}
*Inline Query: <nowiki>{{#ask: [[attTest2::2000]] | ?attTest | ?attTest2}}</nowiki>:
{{#ask: [[attTest::Dummyentry]]
| ?attTest
| ?attTest2
}}
*Inline Query (show): <nowiki>{{#show: Dummyentry | ?attTest2 = }}</nowiki>, {{#show: Dummyentry | ?attTest2 = }}
 
 
*Create Concept: Enter <nowiki>
{{#concept: [[attTest2::2000]]
| Descrition of Concept
}}
</nowiki> on page <nowiki>[[Concept::TestConcept]]</nowiki>
 
=== Style ===
CSS-Styles sollten in [[MediaWiki:Vector.css]] oder besser in [[MediaWiki:Common.css]] angepasst werden. Siehe auch http://semantic-mediawiki.org/wiki/Help:Table_format.
 
=== Line Breaks / Zeilenumbruch ===
Wenn z.B. in Templates Attribute ausgegeben werden und dabei - wenn dieses leer sind - ungewünscht Zeilenumbrüche eingefügt werden, dann man man das mit einem einzelnen <nowiki><nowiki/></nowiki> Tag beheben. Damit werden z.B. leere Text-Attribute auch wirklich leer ausgegeben.
Beispiel innerhalb eines Templates:
<nowiki>{{#if: {{{Para1|}}}|[[Att1::{{{Para1|}}}]]}}<nowiki/></nowiki>
 
Siehe auch:
*http://smw.referata.com/wiki/Avoiding_newlines_between_template_calls
*http://wikimedia.7.n6.nabble.com/Template-Unwanted-Line-Breaks-SOLUTION-td556446.html
 
=== Liste in Template und Tabelle ===
Wenn man einem Template-Parameter einen Text übergibt, der direkt mit einem "*" anfängt (Liste), dann muss man zuvor eine Leerzeile einfügen, damit der Listenanfang erkannt wird, sonst wird es als "=*" interpretiert.
 
Beispiel:
<pre><nowiki>
{{#if: {{{Para1|}}}|
{{!}} '''Überschrift'''
{{!}}<!-- hier Leerzeile --->
[[Att1::{{{Para1|}}}]]
{{!}}-
}}
</nowiki></pre>
 
Siehe auch:
*http://smw.referata.com/wiki/Display_a_bulleted_list_in_a_table
 
== 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: <nowiki>[[Form:NameOfForm]]</nowiki>: [[Form:ReMoSCellStatus]]
See [http://www.mediawiki.org/wiki/Extension:Semantic_Forms mediawiki.org]
 
== Siehe auch ==
*[[Sandbox]]

Aktuelle Version vom 24. Dezember 2019, 10:30 Uhr

MediaWiki Hilfe

Update

Vorlagen

Siehe Vorlagen oder

Vorlagen können auch beliebige (?) Subpages sein, z.B. Sandbox/Vorlage1. Einzubinden dann z.B. auf der Seite Sandbox relativ mittels {{/Vorlage1}}.

Auflisten der Seiten, die eine Vorlage verwenden mittels: {{Vorlage:Vorlagennutzer}}

Benutzung und Konfiguration von MediaWiki

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

Beispiel:

INSERT INTO interwiki (iw_prefix, iw_url, iw_local, iw_trans, iw_api, iw_wikiid) VALUES ('kruedewagen','http://www.kruedewagen.de/wiki/$1', 1, 0, '', '');

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:

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.

Links mit "action" Parameter

Siehe http://www.sciencemedianetwork.org/wiki/Mediawiki_templates_for_edit_and_history

Beispiel-Link zur Versionsgeschichte:

<span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=history}} edit history]</span>

Hinweis: Mit dem "span" wird der Link als "intern" markiert.

Wiki URL

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

Copyright-Text im Footer und Editor ändern

Warnung im Editor:

Anpassung im Footer in LocalSettings.php:

$wgRightsPage = "www.kruedewagen.de:Lizenz"; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "CC BY-NC-SA 3.0";
$wgRightsIcon = "{$wgUploadPath}/f/f2/By-nc-sa.eu.svg";

Siehe auch Lizenz.

Footer ändern

Skin anpassen

Subpages

Siehe

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

See also:

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 .

Dump Import

Nach einem XML Export kann man eine neue Seite importieren durch Anpassen der XML Datei.

<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.6/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.6/ http://www.mediawiki.org/xml/export-0.6.xsd" version="0.6" xml:lang="en">
  <siteinfo>
   ...
  </siteinfo>
  <page>
    <title>Testimport1</title>
    <ns>0</ns>
    <revision>
      <contributor>
        <username>Username</username>
        <id>99</id>
      </contributor>
      <text xml:space="preserve">Das ist der Source Code der Wiki Seite</text>
    </revision>
  </page>
</mediawiki>

Siehe auch:

Hinweise:

  • <siteinfo> aus einem aktuellen Export verwenden.
  • Mehrere <page> Elemente können eingefügt werden.
  • <username>Username</username> und <id>99</id> müssen angepasst werden gemäß den Werten aus Spezial:Einstellungen.
  • Existierende Seiten gemäß <title> werden überschrieben.
  • Import nur von Admin möglich.

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

Sortable table (header must be given with "!"), see Sorting:

Col A Col B Col C Date
x y 1 01-Jan-2010
a z 2 11-Dec-2012
bv ui 3 31-Jul-2011

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}}
{{pagebreak}}

See also HTMLDOC comments.

Timelines

Extension EasyTimeline mit Ploticus.

Beispiel 1:

<timeline> TimeAxis = orientation:horizontal ImageSize = width:680 height:200 PlotArea = width:620 height:150 bottom:50 left:20 DateFormat = dd/mm/yyyy

  1. AlignBars = early

Period = from:01/12/2004 till:01/02/2009

  1. Colors see http://ploticus.sourceforge.net/doc/color.html

Colors =

 id:canvas value:rgb(0.97,0.97,0.97)
 id:grid   value:rgb(0.86,0.86,0.86)
 id:bars   value:gray(0.85)
 id:magenta1  value:magenta #
 id:orange1   value:orange #
 id:green2   value:brightgreen #
 id:purple1   value:purple #
 id:blue2   value:darkblue #
 id:blue3   value:powderblue #
 id:orange2   value:lightorange #
 id:yellow1   value:yellow #
 id:green3   value:teal #

ScaleMajor = unit:month increment:1 start:01/01/2005 gridcolor:grid BackgroundColors = canvas:canvas

BarData=

 barset:pert
 bar:Monat

PlotData=

  1. set defaults
 width:25 fontsize:M textcolor:black align:left anchor:from shift:(10,-5) color:bars
 barset:pert
 from:01/12/2004 till:31/03/2005 color:blue3 text:"P h a s e 1"
 from:01/04/2005 till:30/09/2005 color:orange2 text:"P h a s e 2"
 from:01/10/2005 till:30/04/2006 color:yellow1 text:"P h a s e 3"
 from:01/05/2006 till:10/11/2006 color:green3 text:"P h a s e 4"
 from:12/11/2006 till:31/07/2007 color:red text:"P h a s e 5"
 from:01/08/2007 till:28/04/2008 color:orange1 text:"P h a s e 6"
 from:29/04/2008 till:30/11/2008 color:green2 text:"P h a s e 7"
 bar:Monat width:5 align:center fontsize:S shift:(0,-45) anchor:middle color:canvas
 from:01/01/2005 till:01/02/2005 text:Jan
 from:01/03/2005 till:01/04/2005 text:Mar
 from:01/05/2005 till:31/05/2005 text:May
 from:01/07/2005 till:31/07/2005 text:Jul
 from:01/09/2005 till:01/10/2005 text:Sep
 from:01/11/2005 till:01/12/2005 text:Nov
 from:01/01/2006 till:01/02/2006 text:Jan
 from:01/03/2006 till:01/04/2006 text:Mar
 from:01/05/2006 till:31/05/2006 text:May
 from:01/07/2006 till:31/07/2006 text:Jul
 from:01/09/2006 till:01/10/2006 text:Sep
 from:01/11/2006 till:01/12/2006 text:Nov
 from:01/01/2007 till:01/02/2007 text:Jan
 from:01/03/2007 till:01/04/2007 text:Mar
 from:01/05/2007 till:31/05/2007 text:May
 from:01/07/2007 till:31/07/2007 text:Jul
 from:01/09/2007 till:01/10/2007 text:Sep
 from:01/11/2007 till:01/12/2007 text:Nov
 from:01/01/2008 till:01/02/2008 text:Jan
 from:01/03/2008 till:01/04/2008 text:Mar
 from:01/05/2008 till:31/05/2008 text:May
 from:01/07/2008 till:31/07/2008 text:Jul
 from:01/09/2008 till:01/10/2008 text:Sep
 from:01/11/2008 till:30/11/2008 text:Nov
 from:01/01/2009 till:01/02/2009 text:Jan

</timeline>

Beispiel 2: <timeline> ImageSize = width:900 height:auto barincrement:20 PlotArea = top:10 bottom:30 right:130 left:20 AlignBars = early

DateFormat = dd/mm/yyyy Period = from:01/01/2008 till:31/12/2008 TimeAxis = orientation:horizontal ScaleMajor = grid:black unit:month increment:1 start:01/01/2008

  1. Colors see http://ploticus.sourceforge.net/doc/color.html

Colors =

 id:canvas      value:rgb(0.97,0.97,0.97)
 id:c1   value:green
 id:c2   value:red
 id:c3   value:blue
 id:c4   value:tan2
 id:c5   value:magenta
 id:c6   value:black
 id:c7   value:orange
 id:c8   value:claret
 id:c9  value:magenta #
 id:c10   value:orange #
 id:c11   value:darkblue
 id:c12   value:yellow
 id:c13   value:teal
 id:c14   value:brightblue
 id:free   value:brightgreen
 id:purple1   value:purple #
 id:blue2   value:darkblue #
 id:eddchri   value:powderblue #
 id:orange2   value:lightorange #
 id:yellow1   value:yellow #
  1. id:green3 value:teal #

Backgroundcolors = canvas:canvas

BarData =

 barset:Vacation
 bar:Monat

PlotData=

 barset:Vacation width:5 align:left fontsize:S shift:(5,-4) anchor:till
 from:04/02/2008 till:04/02/2008 color:c1 text:"name1(04.02)"
 from:14/03/2008 till:14/03/2008 color:c1 text:"name1(14.03)"
 from:11/04/2008 till:14/04/2008 color:c2 text:"name2(11.-14.04)"
 from:02/05/2008 till:02/05/2008 color:c1 text:"name1(02.05)"
 from:02/05/2008 till:02/05/2008 color:c2 text:"name2(02.05)"
 from:23/05/2008 till:23/05/2008 color:c1 text:"name1(23.05)"
 from:15/09/2008 till:19/09/2008 color:c1 text:"name1(15.-19.09)"
 from:24/12/2008 till:24/12/2008 color:c1 text:"name1(24.12)"
 from:31/12/2008 till:31/12/2008 color:c2 text:"name2(31.12)"
 barset:skip
 from:31/12/2008 till:31/12/2008 color:c3 text:"name3(31.12)"
 barset:skip
 from:31/12/2008 till:31/12/2008 color:c4 text:"name4(31.12)"
 barset:skip
 from:31/12/2008 till:31/12/2008 color:c5 text:"name5(31.12)"
 barset:skip
 bar:Monat width:5 align:center fontsize:S shift:(0,-20) anchor:middle color:canvas
 from:01/01/2008 till:01/02/2008 text:Jan
 from:01/02/2008 till:01/03/2008 text:Feb
 from:01/03/2008 till:01/04/2008 text:Mar
 from:01/04/2008 till:01/05/2008 text:Apr
 from:01/05/2008 till:01/06/2008 text:Mai
 from:01/06/2008 till:01/07/2008 text:Jun
 from:01/07/2008 till:01/08/2008 text:Jul
 from:01/08/2008 till:01/09/2008 text:Aug
 from:01/09/2008 till:01/10/2008 text:Sep
 from:01/10/2008 till:01/11/2008 text:Okt
 from:01/11/2008 till:01/12/2008 text:Nov
 from:01/12/2008 till:31/12/2008 text:Dez

</timeline>

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



  • Inline Query: {{#ask: [[attTest::Dummyentry]] | ?attTest | ?attTest2}}:
  • Inline Query: {{#ask: [[attTest2::2000]] | ?attTest | ?attTest2}}:
 AttTestAttTest2
HilfeDummyentry
  • Inline Query (show): {{#show: Dummyentry | ?attTest2 = }},


  • Create Concept: Enter {{#concept: [[attTest2::2000]] | Descrition of Concept }} on page [[Concept::TestConcept]]

Style

CSS-Styles sollten in MediaWiki:Vector.css oder besser in MediaWiki:Common.css angepasst werden. Siehe auch http://semantic-mediawiki.org/wiki/Help:Table_format.

Line Breaks / Zeilenumbruch

Wenn z.B. in Templates Attribute ausgegeben werden und dabei - wenn dieses leer sind - ungewünscht Zeilenumbrüche eingefügt werden, dann man man das mit einem einzelnen <nowiki/> Tag beheben. Damit werden z.B. leere Text-Attribute auch wirklich leer ausgegeben. Beispiel innerhalb eines Templates:

{{#if: {{{Para1|}}}|[[Att1::{{{Para1|}}}]]}}<nowiki/>

Siehe auch:

Liste in Template und Tabelle

Wenn man einem Template-Parameter einen Text übergibt, der direkt mit einem "*" anfängt (Liste), dann muss man zuvor eine Leerzeile einfügen, damit der Listenanfang erkannt wird, sonst wird es als "=*" interpretiert.

Beispiel:

{{#if: {{{Para1|}}}|
{{!}} '''Überschrift'''
{{!}}<!-- hier Leerzeile --->
[[Att1::{{{Para1|}}}]]
{{!}}-
}}

Siehe auch:

Semantic Forms

See mediawiki.org

Siehe auch