Forum » » Questions » » Meta Mot dans une page static
Posté : 28 juin 2009 à 08:50
function themesidebox($title, $content) {
//cette partie a été modifiée pour faire appel aux modèles html
global $theme, $B_class_title, $B_class_content, $bloc_side;
$inclusion=false;
if (file_exists("themes/".$theme."/html/bloc-right.html") and ($bloc_side=="RIGHT")) {$inclusion="themes/".$theme."/html/bloc-right.html";}
if (file_exists("themes/".$theme."/html/bloc-left.html") and ($bloc_side=="LEFT")) {$inclusion="themes/".$theme."/html/bloc-left.html";}
if (!$inclusion) {
if (file_exists("themes/".$theme."/html/bloc.html")) {$inclusion="themes/".$theme."/html/bloc.html";}
elseif (file_exists("themes/default/html/footer.html")) {$inclusion="themes/default/html/bloc.html";}
else {
echo "bloc.html manquant / not find !<br />";
die();
}
}
ob_start();
!include!($inclusion);
$Xcontent=ob_get_contents();
ob_end_clean();
$npds_METALANG_words=array(
"'!B_title!'i"=>"$title",
"'!B_class_title!'i"=>"$B_class_title",
"'!B_class_content!'i"=>"$B_class_content",
"'!B_content!'i"=>"$content"
);
echo meta_lang(preg_replace(array_keys($npds_METALANG_words),array_values($npds_METALANG_words), $Xcontent));
}
Cet article provient de NPDS
https://www.npds.org/viewtopic.php?topic=24420&forum=9