Bücher online kostenlos Kostenlos Online Lesen
Working With MediaWiki

Working With MediaWiki

Titel: Working With MediaWiki
Autoren: Yaron Koren
Vom Netzwerk:
indicates that you’re now in editing mode.
    For existing pages, you can most likely also click “Edit” on any page section — usually, every section header will have a link that looks like “[Edit]” near it. This is quite useful — if you have a small change you want to make, it’s always better to only edit the section in which it appears, because there’s less text to deal with.
    The edit page consists of, essentially, one big text area, plus some helper inputs at the bottom, including, most notably, the “Save page” button. The text of the page, or section, being edited goes in the big text area; it’s meant to be written in a syntax called wikitext, which is simpler than HTML but which can also include a lot of scripting-like functionality; this is covered in all of Chapter 4 . There are various toolbarsand utilities that can be used with editing. By default, the top of the text area has a toolbar that looks like Figure 3.2.
    Figure 3.2 Standard MediaWiki editing toolbar
    You can also use an extension called WikiEditor(we’ll cover extensions later), which provides a nicer toolbar, with support for special characters (symbols, and non-Latin characters), and other features. Figure 3.3 shows what it looks like, with the “Advanced” option selected.
    Figure 3.3 WikiEditor extension editing toolbar
    You can read more about it here:
https://www.mediawiki.org/wiki/Extension:WikiEditor
    There are some extensions that support intuitive, WYSIWYG-style editing, although they all have flaws at the moment; see here for more discussion of these (and a full explanation of “WYSIWYG”).
    There’s also the Semantic Forms extension, which lets you provide a form for editing, in addition to or instead of the standard edit page; this extension is covered in depth in Chapter 17 .
    Here is what the bottom of the edit page looks like, below the main input for the text:

    In the “Summary” field, the user is supposed to summarize their changes in the current edit; this is very useful when looking at the page history later. Clicking “Watch this page” adds this page to the user’s watchlist (which we’ll get to later in this chapter). “Save page” of course saves the page. “Show preview” shows what the page will look like if it’s saved in its current state, while leaving the edit form underneath the preview, so that the user can keep editing. “Show changes” shows the differences between the current text and the saved page, again with the edit form placed at the bottom. It’s generally a good idea to hit both of these before saving a page, to make sure that everything looks alright, and that nothing was deleted, or added, accidentally.
    “Cancel” and “Editing help” are simply links. “Cancel” takes the user back to the regular page, while “Editing help” brings the user to to the page “Help:Editing”, which by default is blank. The latter is a somewhat silly feature — it means that every wiki needs to maintain its own editing help page. The best course of action is to simply put in a link on the local page Help:Editing to the following URL:
https://www.mediawiki.org/wiki/Help:Editing

Page history
    The next feature available for every content page in MediaWiki is the history page. You can reach it by adding "action=history" to a page’s URL query string, and, as with the edit page, it’s available in most skins via a tab, and in some skins as a sidebar link. In English, the tab is called “History” or "View history", depending on the skin.
    The history page doesn’t usually get much attention, although it is, in a sense, the heart of MediaWiki, because being able to see the page history is what lets wikis function like wikis. Because you can always see the entire set of changes, you can open up editing of your content to any group of people, no matter how large, without fear that important data will be lost.
    Here are a few rows from the history page for the article “Paul Broca”, on the English-language Wikipedia:

    Every row represents a single edit to the page, and all edits are stored permanently. (In MediaWiki nomenclature, an edit is also known as a “revision”. It’s rarely called a “version”; that word is generally reserved for software.) Each row holds important information and links:
“cur” and “prev” links, and radio buttons, for showing differences (as described in the next section, “Page diffs”)
the date and time in which the edit
Vom Netzwerk:

Weitere Kostenlose Bücher