Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Search found 55 matches
Smarty Forum Index
Author Message
  Topic: strip between beta and production site
bluejester

Replies: 3
Views: 3380

PostForum: General   Posted: Wed May 07, 2014 12:21 pm   Subject: strip between beta and production site
You'd better do this on PHP side.

Remove your {strip} in your TPL.
In your PHP, add something like this :

if ($deploy == 'PUBLIC')
$smarty->loadFilter('output', 'trimwhitesp ...
  Topic: Appeler une méthode d'un objet contenu dans un objet Session
bluejester

Replies: 1
Views: 7957

PostForum: Language: French   Posted: Tue Apr 08, 2014 2:32 pm   Subject: Appeler une méthode d'un objet contenu dans un objet Session
Hello,

Essaye de vider ton dossier templates_c, Smarty a peut-être galéré à compiler.

Sinon, Smarty 2.6.28 est basée sur Smarty 2.6, qui est sorti en 2003.
Utiliser une version aussi vieille a ...
  Topic: Need help for gzip cache file handler
bluejester

Replies: 4
Views: 5690

PostForum: General   Posted: Tue Mar 04, 2014 10:25 am   Subject: Need help for gzip cache file handler
It works on the production environment of a high traffic website for more than 3 weeks. Performances are great. Cool
  Topic: Need help for gzip cache file handler
bluejester

Replies: 4
Views: 5690

PostForum: General   Posted: Fri Feb 07, 2014 11:16 am   Subject: Need help for gzip cache file handler
Uwe, it works amazingly well ! Smile
Thanks a lot ! Cool
  Topic: Need help for gzip cache file handler
bluejester

Replies: 4
Views: 5690

PostForum: General   Posted: Thu Feb 06, 2014 10:50 am   Subject: Need help for gzip cache file handler
Hello everyone,

I recently posted a Smarty 3 Cache plugin enabling Cache handling in a database through PDO support and optionnal Gzip compression :
http://www.smarty.net/forums/viewtopic.php?t=24 ...
  Topic: Smarty 3 : PDO Cache handler (w/ optionnal GZIP support)
bluejester

Replies: 4
Views: 14431

PostForum: Tips and Tricks   Posted: Tue Jan 14, 2014 10:11 am   Subject: Smarty 3 : PDO Cache handler (w/ optionnal GZIP support)
OK, that makes sense.

Here's the new class without the fetchTimestamp() and the getFetchStatement() methods and simplified statements :


<?php

/**
* PDO Cache Handler
* Allows you to ...
  Topic: Smarty 3: Memory cache resource (APC)
bluejester

Replies: 15
Views: 64892

PostForum: Tips and Tricks   Posted: Mon Jan 13, 2014 1:52 pm   Subject: Smarty 3: Memory cache resource (APC)
Hello,

It looks like this plugin is no longer up-to-date with Smarty 3.1x.
I put the code in a cacheresource.apc.php file in my plugins_dir.

Now when I run :
$this->Smarty->loadCacheReso ...
  Topic: Smarty 3 : PDO Cache handler (w/ optionnal GZIP support)
bluejester

Replies: 4
Views: 14431

PostForum: Tips and Tricks   Posted: Thu Jan 09, 2014 8:35 am   Subject: Smarty 3 : PDO Cache handler (w/ optionnal GZIP support)
Hello Uwe,

Indeed. Is it better to remove the fetchTimestamp() method so ?
Do you mean that the $smarty->isCached() method doesn't just fetch the modification time, but the whole content that ...
  Topic: Smarty 3 : PDO Cache handler (w/ optionnal GZIP support)
bluejester

Replies: 4
Views: 14431

PostForum: Tips and Tricks   Posted: Wed Jan 08, 2014 4:34 pm   Subject: Smarty 3 : PDO Cache handler (w/ optionnal GZIP support)
Hello,

Here's my contribution to Smarty with 2 plugins that enables cache handling with PDO, and cache handling with PDO and Gzip.

Rodney, I know you made a class once for that (and I reused som ...
  Topic: Nested blocks and parent issue
bluejester

Replies: 3
Views: 5318

PostForum: General   Posted: Thu Sep 26, 2013 10:15 am   Subject: Nested blocks and parent issue
Hi Uwe,

OK, I understand, and I'll deal with it.

Thanks for your quick reply !
Ben
  Topic: Nested blocks and parent issue
bluejester

Replies: 3
Views: 5318

PostForum: General   Posted: Wed Sep 25, 2013 2:38 pm   Subject: Nested blocks and parent issue
Hello guys,

I'm having an issue with nested blocks and getting infos from the parent. Here's how to reproduce :

File A.tpl :

{block 'FooAndBar'}
<div id="FooAndBar"&g ...
  Topic: Recursive function on each assigned template variable ?
bluejester

Replies: 1
Views: 3496

PostForum: General   Posted: Fri Sep 13, 2013 1:02 pm   Subject: Recursive function on each assigned template variable ?
It's OK, I did it that way :

$this->Smarty->tpl_vars = self::FixCharsetRecursive($this->Smarty->tpl_vars);

Not really clean since tpl_vars is public, but it works...
  Topic: Problème d'affichage de date avec date_format
bluejester

Replies: 4
Views: 18195

PostForum: Language: French   Posted: Fri Sep 13, 2013 9:57 am   Subject: Problème d'affichage de date avec date_format
Il vaut mieux contrôler le content-type directement depuis php :

header('Content-Type: text/html; charset=utf-8');
ou
header('Content-Type: text/html; charset=ISO-8859-1') ...
  Topic: Afficher un lien d'une date à une autre
bluejester

Replies: 3
Views: 10426

PostForum: Language: French   Posted: Fri Sep 13, 2013 9:55 am   Subject: Afficher un lien d'une date à une autre
Hello,

Personnellement je fais comme ceci :

{if $smarty.now >= '2013-09-01 00:00:00'|date_format:'%s' && $smarty.now <= '2013-09-25 23:59:59'|date_format&# ...
  Topic: Recursive function on each assigned template variable ?
bluejester

Replies: 1
Views: 3496

PostForum: General   Posted: Fri Sep 13, 2013 9:37 am   Subject: Recursive function on each assigned template variable ?
Hello everyone,

I'm currently getting bald working with Smarty and DomPDF to create templates for PDF output, since I have to deal with UTF-8 and ANSI.

Well, some TPL vars (strings) that aren't ...
 
Page 1 of 4 Goto page 1, 2, 3, 4  Next
All times are GMT
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP