Extension talk:YetAnotherKeywords
Latest comment: 12 years ago by Jehy in topic Fixed for 1.19
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
Fatal error: Call to a member function addMessage()
editHow 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)
Fixed for 1.19
editPlease try version 0.2 Jehy (talk) 20:40, 17 September 2012 (UTC)
Cannot create template with tags
editI want to create template Template:Keywords Template looks like: <metakeywords> {{{1}}} </metakeywords> but in html I got the following: <meta name="keywords" content="{{{1}}}" />
Does it work with template?