Working With MediaWiki

Working With MediaWiki by Yaron Koren Read Free Book Online Page B

Book: Working With MediaWiki by Yaron Koren Read Free Book Online
Authors: Yaron Koren
page called “City:Brussels”, and then remember that you haven’t yet created a “City” namespace. You do that, and then you discover that the page “City:Brussels” is blank again! That’s because the page you created was “City:Brussels” in the main namespace, whereas the page you’re going to now is “Brussels” in the “City” namespace. How can you recover the page that was created before? There are three ways: the first, and probably easiest, way is to temporarily unset the “City” namespace, then move the page “City:Brussels” to any name that doesn’t start with “City”, then reinstate the “City” namespace, and move the page back to the name “City:Brussels”. The second way is to call the script “namespaceDupes.php”, available in MediaWiki’s /maintenance directory. The third involves going into the database, finding the entry for the page in the ’page’ table, and changing both the namespace and the page name via SQL or some other tool. It requires knowledge of database manipulation, and isn’t recommended unless you really know what you’re doing.
    A similar problem can come about if the underlying number gets changed for any namespace. Again, those three previous solutions can also be used in this case.

Redirects
    Redirects are another useful basic feature of MediaWiki. Redirects let you point one page toward another, so that if a user goes to the URL for page A, what they’ll be shown instead is page B, with a note at the top saying "(Redirected from...".

    Redirects are generally done for one of three reasons:
to link a common typo in a page name to its correct spelling
to link one or more synonyms to a single page (e.g., redirecting “USA” and “United States of America” to “United States”)
to link a topic that’s considered not meaningful enough to have its own page, to a general one that’s meant to cover that specific topic to some extent (e.g., redirecting “Fax” to “Company communications policy in an internal company wiki)
    A redirect is defined by placing the following text in the page that will be redirecting:
#REDIRECT [[target page name]]
    The "REDIRECT" can actually be written with any casing, though by convention it’s usually written as all capital letters.
    In most cases that’s the only thing that appears on a redirect page, though in theory any other text can appear as well — users just won’t see it. The one piece of text that it can be useful to add is category declarations — if you add one or more category declarations to a redirect page, that page will in fact show up as a member in all those category pages, though the name will be in italics. Category declarations are generally only done for the third type of redirect — specific subjects redirecting to more general topics.
    Semantic MediaWiki (Chapter 16 ) has its own behavior when dealing with redirect pages: properties that point to a redirect page are treated as if they’re pointing to the ultimate destination page; which is useful for the first two kinds of redirects (for typos and synonyms), though not always for the third (subtopics to larger topics).

Subpagesand super-pages
    Subpages are a handy way to break up a single page into multiple pages, if it gets too big or unwieldy. A subpage is simply a page whose name takes the form " main page name/additional text ", where " main page name " already exists. So if you have a page about the company Ace Motors, and it contains a long section about company’s history, you could spin off that section into its own page, named "Ace Motors/History", and link to it from the "Ace Motors" page.
    Of course, you could also call the page "History of Ace Motors", which is how it would be done on Wikipedia (Wikipedia doesn’t use subpages in its main namespace, though it does use them in other namespaces, like “Wikipedia:” and “Template:”). So are subpages just another naming convention? To some extent, yes, although

Similar Books

Is

Joan Aiken

Westlake, Donald E - Novel 50

Sacred Monster (v1.1)

Red Hats

Damon Wayans

The Opposite of Me

Sarah Pekkanen

Knockout

Tracey Ward

Powerful Magic

Karen Whiddon

First Evil

R.L. Stine

The Horseman's Son

Delores Fossen