[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]function handle_output($output)
{
global $fusion_page_head_tags ,$fusion_page_footer_tags, $fusion_page_title, $fusion_page_meta, $fusion_page_replacements, $fusion_output_handlers, $settings;
if(!empty($fusion_page_footer_tags))
{
$output = preg_replace("#</body>#", $fusion_page_footer_tags."</body>", $output, 1);
}
if(!empty($fusion_page_head_tags))
{
$output = preg_replace("#</head>#", $fusion_page_head_tags."</head>", $output, 1);
}
if($fusion_page_title != $settings['sitename'])
{
$output = preg_replace("#<title>.*</title>#i", "<title>".$fusion_page_title."</title>", $output, 1);
}
if(!empty($fusion_page_meta))
{
foreach($fusion_page_meta as $name => $content)
{
$output = preg_replace("#<meta (http-equiv|name)='$name' content='.*' />#i", "<meta \\1='".$name."' content='".$content."' />", $output, 1);
}
}
if(!empty($fusion_page_replacements))
{
eval($fusion_page_replacements);
}
if(!empty($fusion_output_handlers))
{
eval($fusion_output_handlers);
}
return $output;
}[/syntaxhighlighter]
then in templates
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false] echo handle_output($output);[/syntaxhighlighter]
0 replies