Extension talk:MetaKeywordsTag

From MediaWiki.org
Jump to: navigation, search

This extension is just adding another meta tag for keywords, not replacing the existing one. Does anyone know if this is allowed/supported by search engines?

<meta name="keywords" content="a,b,c,d,e" /> 
<meta name="keywords" content="Test123" /> 
AFAIK, Search engines don't really use meta keywords anymore. But I have no idea whether those that do will acknowledge multiple such tags. --Jimbojw 15:56, 20 March 2007 (UTC)

Contents

[edit] Multiple Meta Tags

According to this article, there is no problem with multiple meta tags.

http://googlewebmastercentral.blogspot.com/2007/03/using-robots-meta-tag.html

Terrybritton 22:25, 3 April 2007 (UTC)

[edit] Replace existing keywords patch

Here is a patch for replacing existing meta keywords tag:

--- MetaKeywordsTag-orig.php       Fri Aug 21 15:04:03 2009
+++ MetaKeywordsTag.php Fri Aug 21 15:05:33 2009
@@ -118,7 +118,7 @@
     # Merge keyword data into OutputPage as meta tags
     foreach ($data AS $item) {
         $content = @base64_decode($item);
-        if ($content) $out->addMeta( 'keywords', $content );
+               if ($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:13, 21 August 2009 (UTC)

This extension seems to be broken for MW 1.16. Any suggestions on a patch or other fix? -- Prodoom 13:48, 15 December 2010 (UTC)

[edit] Where <keywords insert content="ListOfKeywords" /> insert?

Complete download and installation. Where and how now inserts <keywords content="ListOfKeywords" />? Within the text on the main page I've added the line, but now it appears below the text! The source code is not, however! What do I do now?

-- klengelwood 17:15, 14 February 2011 (UTC)

[edit] Fatal error: on line 73

The error occurred right after the installation of the extention: "Fatal error: Call to a member function addMessage() on a non-object in [myservername]/wiki/extensions/MetaKeywordsTag.php on line 73"

Help, please!

Info:

  • PHP Version 5.2.17
  • MediaWiki Version 1.18.0

-- Zoid 23:55, 29 December 2011 (UTC)

Try the unofficial version 0.3 I posted at the bottom of the main article. It works with 1.18.0 -Brted 16:20, 15 January 2012 (UTC)

[edit] Does not work with Lucene

This extension works great with SphinxSearch, but does NOT work with Lucene. I found this out the hard way after upgrading from Sphinx to Lucene. Luckily, there is another way:

Extension_talk:Lucene-search#Meta_tag_Indexing_11130

--Jlemley 15:08, 20 January 2012 (UTC)

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox