Extension talk:Add Metas/Archive 1

Latest comment: 10 years ago by Leucosticte in topic Usage section

Keyword Density Analyzer gives following error messages

http://www.seotoolset.com/tools/free_tools.html


Page TITLE Tag is out of sequence - should be before DESCRIPTION and KEYWORDS META Tags

Page DESCRIPTION Tag is out of sequence - should be after TITLE Tag and before KEYWORDS META Tags

Multiple Page KEYWORD Tags found - META Tag spam Page KEYWORD Tag is out of sequence - should be after TITLE and DESCRIPTION META Tags Page KEYWORD Tag is out of sequence - should be after TITLE and DESCRIPTION META Tags

How to fix this?

I really have no idea, i dont know about mediawiki internals i just played with two scripts and made one working "thing" :P :( you are free to fixit if you know how

Can't edit pages

I installed AddMetas yesterday on my MediaWiki 1.11 at www.compare-it.org and it worked perfectly. Until I tried to edit pages. Every time I clicked on an edit tab the site crashed. Unstalling AddMeta fixed that problem. What gives? Anyone gotten this working on MW 1.11?

Looks like removing $action !== 'edit' and && $action !== 'delete' helps...
Also, commenting out "$out->addMeta( 'Keywords'..." is a good idea, as it is already added by MediaWiki...

Bug Found

Try this: In the last bit of code from the page AddMetas.php modify it so this:

$out->addMeta( "revisit-after", "1 days"); return TRUE; }

}


Looks like this:


$out->addMeta( "revisit-after", "1 days");

} return TRUE; }

Other hook

What about this way?

$wgHooks['BeforePageDisplay'][] = 'wfAddMetas';

function wfAddMetas( &$out, &$skin ) {
  if( $out->isArticle() ) {
    $name = $out->getTitle()->getPrefixedDBKey();
    $out->addMeta( 'keywords', wfMsg('head-keywords') );
    $out->addMeta( 'author', wfMsg('head-author') );
    $out->addMeta( 'description', wfMsg('head-description') );
  }
  return true;
}

Usage section

Please add a "Usage" section explaining how to use (not just install and configure) this extension. Thanks. Leucosticte (talk) 10:06, 23 December 2013 (UTC)Reply

Return to "Add Metas/Archive 1" page.