PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.smarty.general > Can't change delimiters.
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Can't change delimiters.

Réponse
 
LinkBack Outils de la discussion
Vieux 07/02/2006, 05h41   #1
Juan Carlos Cruz Dada
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Can't change delimiters.

Hello,

I've been playing with Smarty for a few now, and I have to say it is one of
the best template engines around.

Today I updated to the latest release (2.6.12) and when I change the
delimiters, it simply prints the whole template, without parsing it. I want
to change the delimiters as the final users tend to use the normal deliiters
a lot, because of the way they design their templates.

What could be the problem? I changed it on the main class and on the
instance script, as I would like it to stay that way even if my clients
modify the class instance "by mistake"

Here is the code I changed.

On libs/Smarty.class.php

/**
* The left delimiter used for the template tags.
*
* @var string
*/
var $left_delimiter = '<!{'; //'{';

/**
* The right delimiter used for the template tags.
*
* @var string
*/
var $right_delimiter = '}!>'; //'}';

and on the instancing of smarty class

$smarty->left_delimiter = '<!{';
$smarty->right_delimiter = '}!>';

Regards,

JC
  Réponse avec citation
Vieux 07/02/2006, 15h24   #2
Monte Ohrt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Can't change delimiters.

remove all compiled templates and cache files.


Juan Carlos Cruz Dada wrote:

>Hello,
>
>I've been playing with Smarty for a few now, and I have to say it is one of
>the best template engines around.
>
>Today I updated to the latest release (2.6.12) and when I change the
>delimiters, it simply prints the whole template, without parsing it. I want
>to change the delimiters as the final users tend to use the normal deliiters
>a lot, because of the way they design their templates.
>
> What could be the problem? I changed it on the main class and on the
>instance script, as I would like it to stay that way even if my clients
>modify the class instance "by mistake"
>
>Here is the code I changed.
>
>On libs/Smarty.class.php
>
> /**
> * The left delimiter used for the template tags.
> *
> * @var string
> */
> var $left_delimiter = '<!{'; //'{';
>
> /**
> * The right delimiter used for the template tags.
> *
> * @var string
> */
> var $right_delimiter = '}!>'; //'}';
>
>and on the instancing of smarty class
>
>$smarty->left_delimiter = '<!{';
>$smarty->right_delimiter = '}!>';
>
>Regards,
>
>JC
>
>
>

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 16h29.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07401 seconds with 10 queries