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

Search found 26 matches
Smarty Forum Index
Author Message
  Topic: Smarty 3.0 and PHP 5.3
Karel S.

Replies: 6
Views: 16356

PostForum: Smarty 3   Posted: Thu Oct 01, 2009 1:32 pm   Subject: Smarty 3.0 and PHP 5.3
Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set( ...
  Topic: Problem with includes
Karel S.

Replies: 2
Views: 5925

PostForum: Smarty 3   Posted: Fri Sep 25, 2009 1:56 pm   Subject: Problem with includes
I do every morning a svn update. Current build is 3221. Can't find build 3320?

The file_dependency information in the main html file (with contains the includes):


<?php $_smarty_tpl->dec ...
  Topic: Problem with includes
Karel S.

Replies: 2
Views: 5925

PostForum: Smarty 3   Posted: Fri Sep 25, 2009 10:18 am   Subject: Problem with includes
I have a product page with some tabs (8 tabs). I use includes for the overview.


<div id="product_specs">{include file="products/product_page_specs.html"}</d ...
  Topic: Strip doesn't work always?
Karel S.

Replies: 0
Views: 4456

PostForum: Smarty 3   Posted: Fri Sep 25, 2009 8:15 am   Subject: Strip doesn't work always?
Got some code for printing product specs:


{if $SpecValues && $aPrimarySpecs}
{strip}
<h4>
{foreach $aPrimarySpecs as $aSpec}
{if $ ...
  Topic: Smarty 3 Almost Here!
Karel S.

Replies: 3
Views: 6674

PostForum: Smarty 3   Posted: Fri Sep 25, 2009 7:09 am   Subject: Smarty 3 Almost Here!
Never needed the {php} tags. But I tested it with a previous 3.0 build (a month age I think) and it worked. Were they removed in one of the latest builds?
  Topic: clear_cache () doesn't work ?
Karel S.

Replies: 2
Views: 6047

PostForum: Smarty 3   Posted: Wed Sep 09, 2009 6:47 am   Subject: clear_cache () doesn't work ?
Thanks.
  Topic: clear_cache () doesn't work ?
Karel S.

Replies: 2
Views: 6047

PostForum: Smarty 3   Posted: Tue Sep 08, 2009 7:19 am   Subject: clear_cache () doesn't work ?
I'm trying to clear the frontpage cache after editing a product.

index.php:


$smarty->caching = 2;
$smarty->cache_lifetime = 54000;

if ( !$smarty->is_cached ( 'start.tpl' ...
  Topic: Caching with cache id
Karel S.

Replies: 4
Views: 11003

PostForum: Smarty 3   Posted: Wed Sep 02, 2009 3:16 pm   Subject: Caching with cache id
Ah, ok. Testing right now ...

I see the point that this does it more difficult to upgrade from Smarty2 to Smarty3.

It's not difficult. The problem is, I can't find any documentation about the ne ...
  Topic: Caching with cache id
Karel S.

Replies: 4
Views: 11003

PostForum: Smarty 3   Posted: Wed Sep 02, 2009 7:56 am   Subject: Caching with cache id
I'm trying to cache some product pages. Because all products have the same template, I must use the productid as cache id.


$smarty->caching = 1;

$aTemplate[$iProductId] = 'product_v ...
  Topic: smarty_modifier_nl2br
Karel S.

Replies: 3
Views: 7097

PostForum: Smarty 3   Posted: Wed Sep 02, 2009 6:57 am   Subject: smarty_modifier_nl2br
That is also a solution Smile
  Topic: Caching with cache lifetime
Karel S.

Replies: 2
Views: 6003

PostForum: Smarty 3   Posted: Wed Sep 02, 2009 6:56 am   Subject: Caching with cache lifetime
Thanks.
  Topic: {if $tempValue != ($tempValue = $iProductId)}
Karel S.

Replies: 3
Views: 6675

PostForum: Smarty 3   Posted: Wed Sep 02, 2009 6:55 am   Subject: {if $tempValue != ($tempValue = $iProductId)}
Yes, it always worked. This is the code:


{assign var="tempName" value=""}
{foreach from=$aProducts item="aData" key="sCategoryName"}
...
  Topic: Not equal to
Karel S.

Replies: 2
Views: 20473

PostForum: Smarty 3   Posted: Wed Sep 02, 2009 6:47 am   Subject: Not equal to
Tested, it works. Thanks.
  Topic: Caching with cache lifetime
Karel S.

Replies: 2
Views: 6003

PostForum: Smarty 3   Posted: Tue Sep 01, 2009 2:53 pm   Subject: Caching with cache lifetime

$smarty->caching = 2;
$smarty->cache_lifetime = 54000;

if ( !$smarty->is_cached ( 'test.tpl' ) )
{
//run some querys and assign data
}

var_dump ( $sm ...
  Topic: {if $tempValue != ($tempValue = $iProductId)}
Karel S.

Replies: 3
Views: 6675

PostForum: Smarty 3   Posted: Tue Sep 01, 2009 2:35 pm   Subject: {if $tempValue != ($tempValue = $iProductId)}
This works fine:


{assign var="tempValue" value=""}
{foreach from=$aProducts item="aData" key="iProductId"}

{if $tempValue != $ ...
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT
Jump to:  


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