MediaWiki

Change the Tagline (Site Subtitle) of MediaWiki

Tagline (Site Subtitle) in MediaWiki is a bit similar as Drupal's site slogan, so how to configure it? Change the name of the wiki give a good example:

Tagline

The tagline can be edited either in the language files, or through the MediaWiki namespace. Using the latter method, the edit MediaWiki:Tagline and amend the existing text as required.

Note: Editing the MediaWiki namespace will only have an effect if $wgUseDatabaseMessages is set to true. This is the default.

So what's the meaning? Just edit the content of page MediaWiki:Tagline (e.g. http://example.com/wiki/MediaWiki:Tagline) and it will take effect to your tagline :-)

P.S. Some other useful resources:

MediaWiki with "Clear URL"

Drupal have "Clear URL" mechanism, require for Apache mod_rewrite activated and edit local .htaccess only, which will forward request URL from:

/drupal/?q=node

As more elegant style:

/drupal/node

MediaWiki also come with "Short URL" (http://www.mediawiki.org/wiki/Manual:Short_URL); BTW, it will required for Apache and root access (http://www.mediawiki.org/wiki/Manual:Short_URL#Disadvantages), so it is not suitable if you are using some virtual hosting service. There is still some other mini-HOWTO (http://www.mediawiki.org/wiki/Manual:Short_URL#Other_how-to_mini-guides), but still too complicated for me. What if we only require for something similar as Drupal's "Clear URL" in MediaWiki, how to do so?

Step 1: activate Apache's mod_rewrite

First of all, ensure your Apache's mod_rewrite is activated. It is too common and so will not detail in here.

Step 2: define rewrite rule under .htaccess

Next, create a new .htaccess under your MediaWiki root directory. E.g. If your MediaWiki is installed under /home/groups/project1/public_html/mediawiki, you will need to create the file /home/groups/project1/public_html/mediawiki/.htaccess as below:

RewriteEngine on
# If your site is running in a VirtualDocumentRoot at http://example.com/,
#
uncomment the following line:
#RewriteBase /
RewriteBase /mediawiki/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?title=$1 [L,QSA]

Well... What if we only have MediaWiki installed under /public_html directly? Just use the rewrite rule as RewriteBase / (or just left it blank if you are not using VirtualDocumentRoot). BTW, this style is not recommended in MediaWiki official documents (http://www.mediawiki.org/wiki/Manual:Short_URL#URL_like_-_example.com.2F...).

How about if MediaWiki installed under /public_html/production/mediawiki? Man, you are too fancy... Use the rewrite rule as RewriteBase /production/mediawiki...

Step 3: ask MediaWiki to handle the redirect request

Finally, edit /home/groups/project1/public_html/mediawiki/LocalSettings.php and check/add the follow lines:

$wgScriptPath       = "/mediawiki";
$wgArticlePath      = "/mediawiki/$1";

If you have some special case as stated above, change this 2 line accordingly ;-)

Final result

Therefore, whenever you access:

/mediawiki/index.php?title=Main_Page

You will be forward to:

/mediawiki/Main_Page

Which similar as Drupal's "Clear URL" style :-)

Syndicate content