website logo
Auteur
avatar
colonelwog

Forum » » Thèmes Dynamic » » un header différent selon la page


Posté : 20 mai 2010 à 11:03 icone du post

bon j'ai tester un truc vite fait mais ça fonctionne pas quelqu'un peux m'aider ?

j'ai mis un deuxiéme header header1.html
avec une modif de header.php dans theme dynamic:


<?php
/************************************************************************/
/* DUNE by NPDS                                                         */
/* ===========================                                          */
/*                                                                      */
/* DYNAMIC THEME engine for NPDS                                        */
/* NPDS Copyright (c) 2002-2009                     */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
global $theme,$id;; $rep=false;
if (
file_exists("themes/".$theme."/html/header.html")) {$rep=$theme;}
elseif (file_exists("themes/default/html/header.html")) 
{$rep="default";}
elseif (file_exists("themes/default/html/header1.html")) 
{$rep="default";}
else {
   echo "header.html manquant / not find !<br />";
   die();
}
if (
$rep) {
   if (!
$ContainerGlobal)
      echo "<body !onload!=\"init();\" class=\"body\">\n";
   else {
      echo "<body !onload!=\"init();\">";
      echo 
$ContainerGlobal;
   }
   ob_start();
function url_actuelle()
{
     return "http://" . 
$_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; 
}

if (
$_SERVER["REQUEST_URI"]=index.php){   
!include!("themes/".
$rep."/html/header.html");
   
$Xcontent=ob_get_contents();
   ob_end_clean();
   echo meta_lang(aff_langue(
$Xcontent));}
elseif (
$_SERVER["REQUEST_URI"]!=index.php){
!include!("themes/".
$rep."/html/header1.html");
   
$Xcontent=ob_get_contents();
   ob_end_clean();
   echo meta_lang(aff_langue(
$Xcontent));}


}
?>



Cet article provient de NPDS
https://www.npds.org/viewtopic.php?topic=24363&forum=48