This extension allows the addition of <meta keywords=""> and <meta description=""> tags based on namespace. To configure it, you would need to edit Mediawiki:Metakeywords and Mediawiki:Metadescription according to the following format.
The keywords provided are added into the metatag keyword that is automatically generated after the first term, which is the page title, and before the nine other auto-generated words. Both the (all) keywords and the namespace keywords are included.
The description is a new meta-tag, which has a value of either the Namespace specific line OR the (all) line. You can use $1 to represent the page title.
namespace_name|content to add to tag
//[[Mediawiki:Metakeywords]] (all)|Wiktionary,free,dictionary,online (main)|definition,translation,define Talk|discussion,about
//[[Mediawiki:Metadescription]] (all)|Wiktionary, a GFDL dictionary, thesaurus and general word forum. (main)|Free definition of $1 from Wiktionary. Wiktionary|Discussion about the leading online GFDL dictionary
PHP notices: please fix
If I just configure the extension as below, I get some PHP notices when viewing Special:Version.
require_once( "$IP/extensions/MetaKeywords/MetaKeywords.php" );
Notice: Undefined offset: -1 in phase3\extensions\MetaKeywords\MetaKeywords.php on line 51 Notice: Undefined index: * in phase3\extensions\MetaKeywords\MetaKeywords.php on line 53 Notice: Undefined offset: -1 in phase3\extensions\MetaKeywords\MetaKeywords.php on line 65 Notice: Undefined index: * in phase3\extensions\MetaKeywords\MetaKeywords.php on line 67
Can you please provide a patch to the latest SVN version to fix this in bugzilla: (in the process of being updated a bit)? Possibly by adding some defaults in MetaKeywords.i18n.php. Cheers! Siebrand 12:01, 11 August 2008 (UTC)