. */ /* */ /*************************************************************************************/ /* Substitutions de type contenu */ function substitcontenu($texte){ global $motcle, $id_contenu; $tcontenu = new Contenu(); $tcontenudesc = new Contenudesc(); $url = ""; if($id_contenu){ if ($tcontenu->charger($id_contenu)) { $tcontenudesc->charger($tcontenu->id); $url = $tcontenudesc->getUrl(); } } $texte = str_replace("#CONTENU_URL", $url, $texte); $texte = str_replace("#CONTENU_ID", "$id_contenu", $texte); $texte = str_replace("#CONTENU_MOTCLE", "$motcle", $texte); $texte = str_replace("#CONTENU_NOM", $tcontenudesc->titre, $texte); $texte = str_replace("#CONTENU_CHAPO", $tcontenudesc->chapo, $texte); $texte = str_replace("#CONTENU_DESCRIPTION", $tcontenudesc->description, $texte); $texte = str_replace("#CONTENU_POSTSCRIPTUM", $tcontenudesc->postscriptum, $texte); return $texte; } ?>