Hilfe:Hilfe: Unterschied zwischen den Versionen

aus www.kruedewagen.de, Homepage von Ralf und Judith Krüdewagen (Kruedewagen)
Zur Navigation springen Zur Suche springen
K (hat „www.kruedewagen.de:Hilfe“ nach „Hilfe:Hilfe“ verschoben: verschiebe in anderen Namespace)
Zeile 155: Zeile 155:
The favicon file should have 16x16 pixels. Add to LocalSettings.php:
The favicon file should have 16x16 pixels. Add to LocalSettings.php:
  $wgFavicon = "$wgScriptPath/rawino_logo.ico";
  $wgFavicon = "$wgScriptPath/rawino_logo.ico";
=== Sortable Table ===
{| {{Prettytable_Sortable}}
|Row 1
|Row 2
|Row 3
|-
|a
|b
|3
|-
|x
|y
|2
|-
|c
|f
|1
|}
=== 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].


== Siehe auch ==
== Siehe auch ==
*[[Sandbox]]
*[[Sandbox]]

Version vom 24. Juli 2008, 08:55 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.

Siehe auch