Index du forum »»  Le coin des codeurs »» modifier article.php pour inclure un texte entre hometext et bodytext

modifier article.php pour inclure un texte entre hometext et bodytext#22451

2Contributeur(s)
gilbauTito
3 Modérateur(s)
developpeurjpbJireck
gilbau gilbauicon_post
je voudrais mettre un !include! dnas le code du fichier article.php :


   if ($bodytext == "") {
         $bodytext = meta_lang("$hometext<br /><br />$notes");
      } else {
         $bodytext = meta_lang("$hometext<br /><br />$bodytext<br /><br />$notes");
      }


qui serait un truc du genre :


   if ($bodytext == "") {
         $bodytext = meta_lang("$hometext<br /><br />$notes");
      } else {
         $bodytext = meta_lang("$hometext<br /><br />");
         !include! "static/googleadsense_parainage_milieu_article.html");
         meta_lang("$bodytext<br /><br />$notes");
      }



Mais ça coince, si quelqu'un pouvait corriger ce code ?
Tito Titoicon_post
Citation : gilbau


if ($bodytext == "") {
   $bodytext = meta_lang("$hometext<br /><br />$notes");
} else {
   $bodytext = meta_lang("$hometext<br /><br />");
   $bodytext .= file_get_contents("static/googleadsense_parainage_milieu_article.html");
   $bodytext .= meta_lang("$bodytext<br /><br />$notes");
}


Ca devrait le faire :=!
gilbau gilbauicon_post
Merci tito, mais ça coince encore un peu
voir mon essai à http://www.vivrenu.com/article2.php?sid=758

Ca met 2 zones hometext et pub
au lieu de hometext + pub texte bleu (comparateur de vols) + bodytext

J'ai essayé de triturer ton code dans tous les sens, je n'y arrive pas
Tito Titoicon_post
Effectivement!

if ($bodytext == "") {
   $bodytext = meta_lang("$hometext<br /><br />$notes");
} else {
   $bodytext = meta_lang("$hometext<br /><br />").file_get_contents("static/googleadsense_parainage_milieu_article.html").meta_lang("$bodytext<br /><br />$notes");
}


Ca devrait aller comme ça
gilbau gilbauicon_post
Merci, ça marche impeccable :=!