Bücher online kostenlos Kostenlos Online Lesen
Working With MediaWiki

Working With MediaWiki

Titel: Working With MediaWiki
Autoren: Yaron Koren
Vom Netzwerk:
of the table. “!” marks a header cell, while “|” marks a regular cell. “|-” separates between rows. And note the presence of the “class” and “style” declarations. You can add such HTML-style attributes to the main table, as well as to any individual cell. If there is also text in a cell, separate the attribute from the text with a “|”. This text will produce a table like the following:

    10:30 - 11 AM
Snack break
11 - 11:30 AM
Clay sculpting

    You can also put table cells on the same line within the wikitext, which can possibly make for easier reading. To do that, just use “||”, or “!!”, to separate the cells. For instance, the following wikitext will produce a table consisting of a single horizontal row of three cells:
{| A || B || C |}
Transclusion
    You can embed pages within other pages — if, for instance, you have a lot of content whose editing you want to break up into multiple pages but still display together. If you have a page like “History of chairs” that you want to embed in a page called “Chairs”, you can do that with the following wikitext:
{{:History of chairs}}
    For pages in namespaces other than the main one, you would simply put the entire page name in curly brackets, like:
{{Help:How to get started}}
    Such embedding is also called “transclusion”. (You can see an explanation of namespaces here .)
    The most important use of such transclusion is to include templates, which, unlike other page types, can take in variables when they’re called. Templates are covered later in this chapter.
    Within transcluded pages, one can add the markup tags , and , all of which affect what shows up when the page is both viewed on its own, and transcluded elsewhere. These three tags are all covered in the section on templates.
    Finally, here is a brief listing of all the main elements of MediaWiki wikitext. Some of this syntax won’t be covered until later sections and chapters, but it may be helpful to have it all in one place, for easy reference:

    ----
''italics''
'''bold'''
'''''bold and italics'''''
==standard header==
===next-level header===
( ...and so on )
[[Internal link]]
[[Internal link|alternate text]]
[http://example.com text of external link]
[[Category:Example]]
( category tag )
[[:Category:Example]]
( link to category )
—-
( horizontal line )
* bulleted item
# numbered item
:indentation
::double indentation
( ...and so on )
;term : definition
[[File:Image-name.jpg|thumb|frame|Caption text]]
{{:Transcluded page name}}
{{Template name}}
( call to template )
#REDIRECT [[Page name]]
    ----

    This short reference is based on the Wikipedia syntax “cheat sheet”, available here:
https://commons.wikimedia.org/wiki/File:Cheatsheet-en.pdf
    If you’re planning to do any substantial MediaWiki editing, and you’re just starting out, it can be helpful to print that sheet out.

Interwiki links
    Interwiki links are basically a way to make external links to other wikis be callable like internal links, with two brackets instead of one. This is helpful for a few reasons: to clarify that some external wiki is a trusted source of information (and is trusted in general), to make linking to such wikis easier for editors, and to allow for linking from the sidebar.
    In order to have interwiki links pointing to a particular site, you first need to define an alias for that site, based on its URL structure. For instance, if you want interwiki links to the English-language Wikipedia, you could define a link like “enwp”, which looks like the following:
http://en.wikipedia.org/wiki/$1
    An interwiki link using this alias could then look like:
[[enwp:Rainbow|rainbow]]
    The text “Rainbow” would get substituted into the URL, where the “$1” is — so the linked URL would be http://en.wikipedia.org/wiki/Rainbow.
    And since it’s a link, you can include alternate link text (as shown in the example) — this is always recommended, because otherwise the interwiki alias (in this case, “enwp”) will show up in the link text.
    How do you define interwiki aliases? You can do it directly in the database, by adding to the “interwiki” table, but the recommended way is to use the Interwiki extension:
https://www.mediawiki.org/wiki/Extension:Interwiki
    This extension provides a nice graphical interface, at Special:Interwiki, for managing the set of interwiki aliases on a wiki.
    On Wikipedia, interwiki links to the other language Wikipedias, if
Vom Netzwerk:

Weitere Kostenlose Bücher