Extension talk:YetAnotherKeywords
From MediaWiki.org
Patch to add replacing existing meta keywords tag instead of creating second tag:
--- YetAnotherKeywords-orig.php Fri Aug 21 14:54:01 2009
+++ YetAnotherKeywords.php Fri Aug 21 14:52:51 2009
@@ -116,8 +116,9 @@
// Merge keywords data into OutputPage as meta tag
foreach ($data AS $item) {
$content = @base64_decode($item);
+
if ($content)
- $out->addMeta( 'keywords', $content );
+ $out->mKeywords = explode(',', $content);
}
return true;
}
How about to add special parameter to tag which will decide what to do with existing keywords?
Possible actions:
- add duplicate meta keywords tag (default, for compatibility)
- append new keywords to existing
- replace existing
--Nettroll 11:02, 21 August 2009 (UTC)
[edit] Fatal error: Call to a member function addMessage()
How to fix an error like this:
- Fatal error: Call to a member function addMessage() on a non-object in .../extensions/YetAnotherKeywords.php on line 71
I use MW 1.18 (upgraded from 1.16).
aa_haq (talk | Website | Wikiapbn) 11:07, 13 February 2012 (UTC)