Extension:Add HTML Meta and Title

—

This extension allows for easier SEO (search engine optimization) with MediaWiki.

Usage
When you enter  ...or the shorter... 

in a wiki-article some words are added to the html title and meta headers. This makes SEO (search engine optimization) with MediaWiki easier.

For example, the above would become: Original title, word1,word2,...        (the string ", word1,word2,..." is added)

    (this is a new meta tag - existing metas are left untouched)

How I did it
This extension uses two MediaWiki hooks - OutputPageBeforeHTML (for meta) and BeforePageDisplay (for title addition).

I've expanded the code of Extension:MetaKeywordsTag and due to the more capabilities of my version I decided to create a new extension. One day it may become the standard way for MediaWiki SEO, who knows :)

License
Add HTML Meta and Title is released under The MIT License.

Installation and Download

 * Download source from http://velko.org/mediawiki-extension-add-html-meta-and-title -  download the attached .phps file and rename it to php, and create a file extensions/Add_HTML_Meta_and_Title.php.
 * Enable the extension by adding this line to your LocalSettings.php:

v0.4

 * have put  in the parseSEO function because I got some nasty PHP notice for an unitialised variable...

v0.2

 * added htmlspecialchars as a filter to the text that is displayed in the title and meta - anything else needed  to prevent malicious people? I think no. (If you are an English speaker you may want to use the htmlentities PHP function, which is more restrictive)

v0.1

 * Initital version - everything works.