Bücher online kostenlos Kostenlos Online Lesen
Working With MediaWiki

Working With MediaWiki

Titel: Working With MediaWiki
Autoren: Yaron Koren
Vom Netzwerk:
latest versions of those as well. Extensions that don’t work with a certain MediaWiki version tend to break pretty easily when you try them out, so it should be fairly straightforward to see if any extensions need updating.

3  Editing in MediaWiki
Tabs
    In MediaWiki, nearly all page-specific actions are accessible through what are usually tabs, though it depends on the skin: in some cases the “tabs” are just links displayed on the side, and in the case of Vector, the default skin, some of the tab actions are dropdown links, viewable alongside the main tabs. The exact set of tabs/dropdown actions/etc. one sees depends on the type of page it is, the permissions one has, and the extensions installed. Figure 3.1 shows the (nearly) standard view of tabs and dropdown actions that an administrator would see, for a regular page in MediaWiki, with the Vector skin (along with the search interface alongside it).
    Figure 3.1 Row of tabs in the Vector skin
    The “Edit” tab shows up as “View source” instead, if the user isn’t allowed to edit the page, in Vector and most other skins.
    We’ll cover most of these actions in this chapter. The one feature that makes this different from the standard view an administrator would have is the “Refresh” action, which is defined by the Semantic MediaWiki extension — you can read about that here .

Creating and editing pages
    In MediaWiki, every page’s URL is also its title; there are no URLs that simply look like “?id=123456”, of the type that appear in many other content-management systems. That’s important, because it means that the creation and renaming of pages can be done in a transparent way, open to all users.
    The way to create a new page, and edit an existing page, are basically the same: in both cases, you first have to go to that page. How do you get to a page? Interestingly, for both existing pages and pages that don’t exist yet, there are the same three ways to do it:
Type in the page name in the URL
Search on that page name, and then either arrive at the page (for existing pages), or follow the link to create it in the search results (for pages that don’t exist)
Follow a link to that page.
    A link to a nonexistent page is usually called a “red link”. By default, they’re red, which easily distinguishes them from links to pages that exist, which are usually blue. The actual MediaWiki term for them, for what it’s worth, is “broken link” (though “redlink” is also used, in URLs). Broken/red links are useful for indicating that a page that doesn’t exist yet should be created. With Semantic Forms (an extension we’ll get to later), you can actually have red-linked pages created automatically in certain cases — but most of the time, this has to be done manually.
Page names
    For the most part, page names can contain any Unicode character. The following characters, however, are not allowed in page names:
# < > [ ] | { }
    The underscore character, _, could be added to that list as well, since underscores are simply treated the same as spaces.
    By default, page names always start with an uppercase letter: if a page name gets typed in that starts with a lowercase letter, it will simply get capitalized by the system. This can be changed, however, by adding the following to LocalSettings.php:
$wgCapitalLinks = false;
    Page names are restricted to 255 bytes, which, depending on the character set being used, can be as many as 255 characters or as few as 63 characters. Standard Latin characters are one byte each, while most other languages’ characters are represented using two or three bytes, and some archaic languages, mathematical symbols, etc. take four bytes.
Editing mode
    Once you’re at a page, you will see a slightly different interface depending on whether you’re allowed to edit it. If you can’t edit the page, there will most likely be a tab named “View source”, that lets you view the source wikitext of the page (if you’re interested in doing that). If you can edit the page, on the other hand, that same tab will most likely be called “Edit” instead. In that case, to edit the page, you just have to click on the “Edit” tab, and start typing. For new pages, the tab is called “Create” instead of “Edit”, and there’s usually an explanatory message on the page that includes a link to that tab, but otherwise it’s the same. In both cases, you end up at a URL that ends with “action=edit”, which
Vom Netzwerk:

Weitere Kostenlose Bücher