<? /* bram brambring http://www.brambring.nl Installation: Save this file ( fe as local/metatag.php Add include_once("local/metatag.php"); to the end of your local.php Usage: [[meta:name content-text]] results in : <META name="name" content="content-text"> [[equiv:what content-text]] results in : <META http-equiv="what" content="content-text"> Change Log: bram 05-01-2004 1.0 Initial version as file */ $MetaTagName="/\\[\\[meta:([^ ]+) +([^\\]]+)\\]\\]/e"; $DoubleBrackets[$MetaTagName] = ''; $MetaTagEquiv="/\\[\\[equiv:([^ ]+) +([^\\]]+)\\]\\]/e"; $DoubleBrackets[$MetaTagEquiv] = ''; function PrintMetaTags() { global $MetaTagName; global $MetaTagEquiv; global $Text; global $action; if ( $action and ( $action!='browse' ) ) { return ; }; preg_match_all($MetaTagName,$Text,$match); for ($i=0; $i< count($match[0]); $i++) { print "<META name=\"" . $match[1][$i] . "\" content=\"" . $match[2][$i] ."\">\n"; } preg_match_all($MetaTagEquiv,$Text,$match); for ($i=0; $i< count($match[0]); $i++) { print "<META http-equiv=\"" . $match[1][$i] . "\" content=\"" . $match[2][$i] ."\">\n"; } } array_push($HTMLTitleFmt,"function:PrintMetaTags") ?>