Index du Forum » » Thèmes Dynamic

Auteur

un header différent selon la page
colonelwog
1947       
 

  Posté : 20-05-2010 11:03

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         ;                           & nbsp;            &n bsp;         */
/* ===========================                     & nbsp;            &n bsp;        */
/*            &nb sp;            &nbs p;              ;                           & nbsp;    */
/* DYNAMIC THEME engine for NPDS   &n bsp;            &nb sp;            &nbs p;          */
/* NPDS Copyright (c) 2002-2009    &n bsp;            &nb sp;   */
/*            &nb sp;            &nbs p;              ;                           & nbsp;    */
/* This program is free software. You can& nbsp;redistribute it and/or modify */
/* it under the terms of the GNU Gene ral Public License as published by */
/* the Free Software Foundation; either version  2 of the License.        ;*/
/************************************************************************/ br />
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 f ind !<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

http://www.npds.org/viewtopic.php?topic=24363&forum=48