Hilfe:Hilfe: Unterschied zwischen den Versionen

aus www.kruedewagen.de, Homepage von Ralf und Judith Krüdewagen (Kruedewagen)
Zur Navigation springen Zur Suche springen
Zeile 264: Zeile 264:
   from:01/05/2006 till:10/11/2006 color:green3 text:"P h a s e 4"
   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: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 6a"
   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"
   from:29/04/2008 till:30/11/2008 color:green2 text:"P h a s e 7"


Zeile 346: Zeile 346:


   barset:Vacation width:5 align:left fontsize:S shift:(5,-4) anchor:till
   barset:Vacation width:5 align:left fontsize:S shift:(5,-4) anchor:till
   from:04/02/2008 till:04/02/2008 color:c2 text:"[[name2]](04.02)"
   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: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:11/04/2008 till:14/04/2008 color:c2 text:"[[name2]](11.-14.04)"

Version vom 24. Juli 2008, 10:39 Uhr

MediaWiki Hilfe

Update

Vorlagen

Siehe Vorlagen oder

Benutzung und Konfiguration von MediaWiki

Namenrä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.

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 Links in der Sidebar gesetzt wurde, wird die SERVER Variable nicht im Cache gehalten.

Cache-Einstellungen

$wgParserCacheType = CACHE_ANYTHING;
$wgParserCacheExpireTime = 3600;

$wgEnableParserCache = true;
$wgEnableSidebarCache = false;

Variablen

Siehe http://www.mediawiki.org/wiki/Help:Variables/de.

Subpages

See http://meta.wikimedia.org/wiki/Sub_pages and http://en.wikipedia.org/wiki/Wikipedia:Subpages.

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:

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

See also HTMLDOC comments.

Timelines

Extension "EasyTimeline".

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>

Siehe auch