Dec 04, 2008, 12:46 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: [1]   Go Down
  Print  
Author Topic: META name="keywords" vs. meta http-equiv="keywords"  (Read 2179 times)
0 Members and 1 Guest are viewing this topic.
Briggsy
Sr. Member
****
Posts: 372



WWW
« on: Mar 01, 2006, 07:01 AM »

Hey guys, I noticed some time ago that MODx put keywords in the following syntax
<meta http-equiv="keywords" content="blah, blah1, blah2">

Although it's valid I believe its more standard to use the following syntax
<META name="keywords" content="blah, blah1, blah2">


Is there anyway to change it? I'm trying to avoid the following"

4.1 Validate that http-equiv Keywords tag is NOT used
In an effort to trick public search engines people have tried to stuff pages with keywords repeatedly trick the search engine into giving a page a false high relevance ranking. This type of "Spam" could cause your page NOT to be indexed in a public search engine. A common searchability error is to use the http-equiv="keywords" to perform keyword stuffing, this check validates that this practice is not used.
Logged

Emergency Management Academy of New Zealand
      http://www.emanz.ac.nz

MODx Sandbox   Login: sandbox  Password: castle

Admin Sandbox   Login: sandbox  Password: castle
rthrash
Foundation
*
Posts: 9,575



WWW
« Reply #1 on: Mar 01, 2006, 08:39 AM »

Please file a bug report for that, I think it should be changed and agree. Thanks!
Logged

MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
Briggsy
Sr. Member
****
Posts: 372



WWW
« Reply #2 on: Mar 01, 2006, 10:06 AM »

reported in http://modxcms.com/bugs/task/292?tasks=reported
Logged

Emergency Management Academy of New Zealand
      http://www.emanz.ac.nz

MODx Sandbox   Login: sandbox  Password: castle

Admin Sandbox   Login: sandbox  Password: castle
yentsun
MODx Russia
Moderators
*
Posts: 516



WWW
« Reply #3 on: May 22, 2006, 09:42 AM »

Sorry to disturb but... is the case closed or what? I have a 0.9.2 installation and the meta tag is still "http-equiv="keywords".
Logged

http://modx.ru - российская поддержка MODx
http://modxnotes.blogspot.com/ - личный блог по MODx
OpenGeek
MODx Co-Founder
Foundation
*
Posts: 5,054


looking a little more like my avatar again...


WWW
« Reply #4 on: May 22, 2006, 09:53 AM »

This is fixed in trunk from SVN, but is not yet available in a stable release.  It is a very simple change and one you can easily make by searching for "http-equiv" in your manager/document.parser.class.inc.php and editing the instance relating to keywords in the mergeDocumentMETATags() function.
Logged

Jason Coward
MODx Co-Founder
xPDO Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
The spirit of a warrior is not geared to indulging and complaining, nor is it geared to winning or losing. The spirit of the warrior is geared only to struggle, and every struggle is a warrior's last battle on earth. Thus the outcome matters very little to him. In his last battle on earth a warrior lets his spirit flow free and clear. And as he wages his battle, knowing that his intent is impeccable, a warrior laughs and laughs.
  — don Juan Matus
hgw
Member
**
Posts: 62


WWW
« Reply #5 on: Jun 04, 2006, 10:10 AM »

Hi, this is more a question on positioning the meta-tags output:

The keywords are put directly after the doctype and before the "title" tag - they should be after "Content-Type" as "no. 4" - second starting row :-)

I couldn't find this in manager/inc/document.parser.class.inc.php ... dont't want to mess around, maybe somebody has a quick tip on that ... Thx!!
Logged
Boby
Full Member
***
Posts: 155



WWW
« Reply #6 on: Jun 15, 2006, 09:13 AM »

To put the metas after the title tag, you have to edit the same function Wink

Here is mine (a bit edited):
Code: (php)
<?php
   
function mergeDocumentMETATags($template) {
      if (
$this->documentObject['haskeywords'] == 1) {
         
//insert keywords
         
$keywords = implode (", ", $this->getKeywords());
         
$metas = "\t<meta name=\"keywords\" content=\"{$keywords}\" />\n";
      }

      if (
$this->documentObject['hasmetatags'] == 1) {
         
//insert meta tags
         
$tags = $this->getMETATags();
         foreach (
$tags as $n => $col) {
            
$tag = strtolower ($col['tag']);
            
$tagvalue = $col['tagvalue'];
            
$tagstyle = $col['http_equiv'] ? 'http-equiv' : 'name';
            
$metas .= "\t<meta {$tagstyle}=\"{$tag}\" content=\"{$tagvalue}\" />\n";
         }
      }
      
$template = preg_replace ("/(<\/title>)/i", "\\1\n".$metas, $template);

      return
$template;
   }
?>

Just replace it with this one and it's ready, but remove the <?php ?> tags.

Boby
Logged

...my Photo Gallery on Flickr...
bullrat
Member
**
Posts: 98


« Reply #7 on: Sep 21, 2006, 08:48 AM »

Thanks, Boby. I was searching the forums looking for a way to move the keywords tag below the title tag and your edit worked perfectly. Thanks for posting the solution.
Logged
davidm
Marketing & Design Team
*
Posts: 6,777


The best way to predict the future is to invent it


WWW
« Reply #8 on: Sep 21, 2006, 09:02 AM »

Great fix Boby, could you file this in the bugtracker so that this thing makes it in the next release ?
« Last Edit: Sep 21, 2006, 09:17 AM by davidm » Logged

.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net
rthrash
Foundation
*
Posts: 9,575



WWW
« Reply #9 on: Sep 21, 2006, 09:16 AM »

I'm adding it to trunk now... no need (for once!).
Logged

MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
OpenGeek
MODx Co-Founder
Foundation
*
Posts: 5,054


looking a little more like my avatar again...


WWW
« Reply #10 on: Sep 21, 2006, 10:52 AM »

This seems like we're assuming a little too much:

* that the document has a title tag
* that the document has a content-type tag and it appears before the title tag

I know that this is how they should be ordered, but should we always assume this?
Logged

Jason Coward
MODx Co-Founder
xPDO Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
The spirit of a warrior is not geared to indulging and complaining, nor is it geared to winning or losing. The spirit of the warrior is geared only to struggle, and every struggle is a warrior's last battle on earth. Thus the outcome matters very little to him. In his last battle on earth a warrior lets his spirit flow free and clear. And as he wages his battle, knowing that his intent is impeccable, a warrior laughs and laughs.
  — don Juan Matus
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!