Précédent   Forum des professionnels en informatique > PHP > Bibliothèques et frameworks > Templates
Templates Forum d'entraide sur les templates (gabarits) avec PHP. Exemples : Smarty, TinyButStrong... Avant de poster -> FAQ templates et Cours gabarits
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 26/06/2011, 21h01   #1
Débutant
 
Avatar de ETVigan
 
Homme Esteban
Conseil - Consultant en systèmes d'information
Inscription : avril 2010
Messages : 632
Détails du profil
Informations personnelles :
Nom : Homme Esteban
Localisation : France, Gard (Languedoc Roussillon)

Informations professionnelles :
Activité : Conseil - Consultant en systèmes d'information
Secteur : Finance

Informations forums :
Inscription : avril 2010
Messages : 632
Points : 122
Points : 122
Envoyer un message via MSN à ETVigan Envoyer un message via Skype™ à ETVigan
Par défaut Template en PHP

Bonsoir,

J'ai un souci avec un script de gestion de template en PHP obtenu d'un site pourtant sérieux... mais personne n'est sérieux dans ce bas monde.....
Le zip en pièce attachée est le script original....
Je l'ai sérieusement modifier pour arriver à ce qu'il fonctionne.
Dans cette version (l'originale), il me donne l'erreur suivante:

Code :
1
2
Error: Could not load template CONFIG_TEMPLATEPATHcommon/footer.tpl
Ce que j'ai pu corriger en modifiant sérieusement ce dernier....
Mais est alors apparue une autre erreur, peut être existante... je n'en sais rien....

Voici le code de l'index.php
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/config/config.php');
require_once($_SERVER['DOCUMENT_ROOT'] . '/class/intelli.php');

/*
 Starting the Template
*/
$template = new Intelli();
$template->SetTemplatePath(CONFIG_TEMPLATEPATH);

/*
 Assign the PHP variable(s) which will be called from (inside) the template(s)
*/
$param = array();
$param['var_today'] 	= '<span class="datetime">'.date("F j, Y g:i:s A D").'</span>';

/*
 Render & Parse the Templates
*/
echo $template->render('header.tpl');
echo $template->render('menu.tpl');
echo $template->render('body.tpl'   , $param);
echo $template->render('footer.tpl' , $param);
?>
Je n'ai pas trouvé de trace de la variable $var_today qui est peut être une variable PHP, PEAR ou.... je n'ai rien trouvé sur les sites correspondants !

Voici le code de l'header..tpl

Code :
1
2
3
4
5
6
7
8
9
10
11
12
<div class="wrapper">
	<span class="welcome">Welcome to 
    	<span class="intelli">Intelli Pro Template</span>
    </span>
    <br />
	Simple & Powerful Template Engine<br /><br />
	The following time is a variable passing from PHP:<br />
	<?php echo $var_today; ?><br /><br />

	body.tpl
</div>
Dans Dream... je fais un search global de $var_today et ne trouve que les occurences citées + haut...

Code :
1
2
Le site considérablement modifié se trouve dans l'attachment intellipro.zip qui lui même contient un sous-répertoire ZIP qui contient le 1er attachement....
Un p'tit coup de main me ferait grand plaisir....

Merci à ceussss qui se pencheront sur mon problème....
Fichiers attachés
Type de fichier : rar intelli.rar (21,4 Ko, 1 affichages)
Type de fichier : rar intellipro.rar (42,2 Ko, 1 affichages)
__________________
Esteban
ETVigan est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/06/2011, 16h14   #2
Membre confirmé
 
Homme Vincent
Développeur informatique
Inscription : janvier 2009
Messages : 246
Détails du profil
Informations personnelles :
Nom : Homme Vincent
Localisation : France, Essonne (Île de France)

Informations professionnelles :
Activité : Développeur informatique
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : janvier 2009
Messages : 246
Points : 235
Points : 235
Salut, tu n'es pas sur le bon Forum. Essai plutôt : http://www.developpez.net/forums/f61...rks/templates/ Bonne chance
philodido est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 09/07/2011, 17h31   #3
Membre éclairé
 
Homme Gérard Okono
Développeur Web
Inscription : juillet 2006
Messages : 711
Détails du profil
Informations personnelles :
Nom : Homme Gérard Okono
Localisation : Cameroun

Informations professionnelles :
Activité : Développeur Web
Secteur : Administration - Collectivité locale

Informations forums :
Inscription : juillet 2006
Messages : 711
Points : 328
Points : 328
Il y'a bien pourtant de moteurs de template puissants et à jour comme Smarty et phpBB2. Je les utilise et suis satisfait. Pourquoi réinventé la roue ?

Meilleures salutations.
okoweb est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 09/07/2011, 17h40   #4
Débutant
 
Avatar de ETVigan
 
Homme Esteban
Conseil - Consultant en systèmes d'information
Inscription : avril 2010
Messages : 632
Détails du profil
Informations personnelles :
Nom : Homme Esteban
Localisation : France, Gard (Languedoc Roussillon)

Informations professionnelles :
Activité : Conseil - Consultant en systèmes d'information
Secteur : Finance

Informations forums :
Inscription : avril 2010
Messages : 632
Points : 122
Points : 122
Envoyer un message via MSN à ETVigan Envoyer un message via Skype™ à ETVigan
Par défaut Template.... smarty & phpBB2

Merci de ta réponse, phpbb, je crois que c'est un forum non ?
Je ne connais pas phpBB2....

Quand à Smarty, je vais m'y pencher !

Merci

Esteban
__________________
Esteban
ETVigan est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 02h58.


 
 
 
 
Partenaires

Hébergement Web