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 > Selective compiled template deletion
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Selective compiled template deletion

Réponse
 
LinkBack Outils de la discussion
Vieux 15/10/2006, 23h11   #1 (permalink)
Marcus Bointon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Selective compiled template deletion

I'm in an odd place - I need to call clear_compiled_tpl(), but I only
want to clear all compiled templates with a certain compile ID. From
the docs it looks like I either clear everything, or just a specific
template with a name AND a compile id. I need something in between -
can I do clear_compiled_tpl('', 'my_compile_id') to clear everything
with that compile ID?

My situation is that I have a web interface to an email sending
process and I'm having problems with stale compiled versions of email
templates, which have a compile ID, and I want to clear them all
without clearing the compiled templates for the web interface too.

Marcus
--
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/
  Réponse avec citation
Vieux 17/10/2006, 13h38   #2 (permalink)
Marcus Bointon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Selective compiled template deletion

On 15 Oct 2006, at 23:11, Marcus Bointon wrote:

> clear_compiled_tpl('', 'my_compile_id')


If I'm getting a template from a custom resource, of course I won't
have a template filename, just a resource identifier - does this
still work?

clear_compiled_tpl('myresource:123', 'my_compile_id')

Marcus
--
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/
  Réponse avec citation
Vieux 17/10/2006, 13h54   #3 (permalink)
messju mohr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Selective compiled template deletion

On Tue, Oct 17, 2006 at 01:38:49PM +0100, Marcus Bointon wrote:
> On 15 Oct 2006, at 23:11, Marcus Bointon wrote:
>
> >clear_compiled_tpl('', 'my_compile_id')

>
> If I'm getting a template from a custom resource, of course I won't
> have a template filename, just a resource identifier - does this
> still work?
>
> clear_compiled_tpl('myresource:123', 'my_compile_id')


why don't you just TIAS?

> Marcus

  Réponse avec citation
Vieux 17/10/2006, 13h59   #4 (permalink)
messju mohr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Selective compiled template deletion

On Tue, Oct 17, 2006 at 01:38:49PM +0100, Marcus Bointon wrote:
> On 15 Oct 2006, at 23:11, Marcus Bointon wrote:
>
> >clear_compiled_tpl('', 'my_compile_id')


you want ->clear_compiled_tpl(null, 'my_compile_id') here, AFAIK.


> If I'm getting a template from a custom resource, of course I won't
> have a template filename, just a resource identifier - does this
> still work?
>
> clear_compiled_tpl('myresource:123', 'my_compile_id')
>
> Marcus
> --
> Marcus Bointon
> Synchromedia Limited: Creators of http://www.smartmessages.net/
> marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

  Réponse avec citation
Vieux 17/10/2006, 14h05   #5 (permalink)
Marcus Bointon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Selective compiled template deletion

On 17 Oct 2006, at 13:54, messju mohr wrote:

> why don't you just TIAS?


I will - I just wanted to be sure that if it did work, that it was
working for the right reason!

Thanks,

Marcus
--
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/
  Réponse avec citation
Vieux 17/10/2006, 15h14   #6 (permalink)
Monte Ohrt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Selective compiled template deletion

You can use the mod operator in IF statement logic, or use the more
natural language "is $foo div by 3"

Marcus Bointon wrote:
> On 17 Oct 2006, at 13:54, messju mohr wrote:
>
>> why don't you just TIAS?

>
> I will - I just wanted to be sure that if it did work, that it was
> working for the right reason!
>
> Thanks,
>
> Marcus
> --Marcus Bointon
> Synchromedia Limited: Creators of http://www.smartmessages.net/
> marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/
>
> --Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

  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 03h52.


Édité par : vBulletin® version 3.7.2
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
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10328 seconds with 14 queries