Vorlage:SEO: Unterschied zwischen den Versionen
Aus Afterbuy-Wiki
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
<phptag> | <phptag> | ||
$seoData=transclude("MediaWiki:SEO:Data"); | $seoData=transclude("MediaWiki:SEO:Data"); | ||
− | |||
$title = trim($argv[0]); | $title = trim($argv[0]); | ||
if(isset($argv['seopage'])){ | if(isset($argv['seopage'])){ | ||
$title = trim($argv['seopage']); | $title = trim($argv['seopage']); | ||
} | } | ||
− | |||
$out = "{{#seo: title=".$title." | title_mode=replace"; | $out = "{{#seo: title=".$title." | title_mode=replace"; | ||
$seoDataLines = explode( '+' , $seoData); | $seoDataLines = explode( '+' , $seoData); | ||
Zeile 13: | Zeile 11: | ||
$key = trim(strtolower($items[0])); | $key = trim(strtolower($items[0])); | ||
if( $key == "keywords" ){ | if( $key == "keywords" ){ | ||
− | $out.=" | keywords="; | + | $out.=" | keywords=Afterbuy"; |
− | $keywords= | + | $keywords=$items; |
+ | unset($keywords[0]); | ||
foreach($keywords as $keyword){ | foreach($keywords as $keyword){ | ||
$out.=",".trim($keyword); | $out.=",".trim($keyword); | ||
} | } | ||
} else if( $key == "description" ){ | } else if( $key == "description" ){ | ||
− | $out.=" | description=".$items[1]; | + | $out.=" | description=" . $items[1]; |
} | } | ||
} | } | ||
− | $out.=" | locale=de_DE | robots=noindex, nofollow | googlebot=noindex, nofollow | author=ViA-Online GmbH | section=eCommerce }}"; | + | $out .= " | locale=de_DE | robots=noindex, nofollow | googlebot=noindex, nofollow | author=ViA-Online GmbH | section=eCommerce }}"; |
echo $out; | echo $out; | ||
</phptag> __NOTITLE__ | </phptag> __NOTITLE__ |