Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Search found 39 matches
Smarty Forum Index
Author Message
  Topic: Smarty evaluation of a string?
joncampbell

Replies: 2
Views: 10068

PostForum: General   Posted: Fri Feb 29, 2008 9:21 pm   Subject: Smarty evaluation of a string?
I have a quesiton about the db_get_timestamp function in the resource example, is this a timestamp of when the template was created, or a timestamp of the last time the cache was saved, or what?

Al ...
  Topic: Smarty evaluation of a string?
joncampbell

Replies: 2
Views: 10068

PostForum: General   Posted: Thu Feb 28, 2008 11:16 pm   Subject: Smarty evaluation of a string?
I am not new to smarty, I have been using it for about 3 years now, and use it in all my projects, my most recent project is to try and incorporate an email template system that would store a copy of ...
  Topic: date_format problems
joncampbell

Replies: 4
Views: 10603

PostForum: General   Posted: Wed Aug 15, 2007 8:31 pm   Subject: date_format problems
I can confirm that %S in linux prints the current seconds

echo strftime('%d%S %b %Y %H:%M:%S',$now);

outputs:

1504 Aug 2007 13:30:04


lowercase %s prints the current epoch unix timestamp: ...
  Topic: {html_select_date} and Global Constants
joncampbell

Replies: 2
Views: 6289

PostForum: General   Posted: Wed Aug 15, 2007 7:42 pm   Subject: {html_select_date} and Global Constants
Thank you, it appears that I could use a ` to escape these variables in the double-quotes.
  Topic: {html_select_date} and Global Constants
joncampbell

Replies: 2
Views: 6289

PostForum: General   Posted: Mon Aug 13, 2007 10:44 pm   Subject: {html_select_date} and Global Constants
I am trying to make a framework, and I have used a few {html_select_date} functions in my template, in the atempt of making the whole application more modular I have started to move all these types of ...
  Topic: Passing POST variables to a TPL file
joncampbell

Replies: 5
Views: 20588

PostForum: General   Posted: Fri Aug 10, 2007 10:24 pm   Subject: Passing POST variables to a TPL file
Why are you using $this->smarty I don't see any class definitions in the php file listed, and I do not see your smarty class instance either?

another approach would be to have alittle logic in y ...
  Topic: {literal} displays as a linefeed in html output
joncampbell

Replies: 3
Views: 8953

PostForum: General   Posted: Fri Aug 10, 2007 10:13 pm   Subject: {literal} displays as a linefeed in html output
I see what you are saying, but wouldn't it make sense to have smarty delete the '\n\r' or linefeed after a tag, so that you could have better formatted source, or please give a source example how you ...
  Topic: {literal} displays as a linefeed in html output
joncampbell

Replies: 3
Views: 8953

PostForum: General   Posted: Fri Aug 10, 2007 6:14 pm   Subject: {literal} displays as a linefeed in html output
I know I can do this to correct this issue, but this produces unledgible template source, and I don't want that Sad

example:

<style type="text/css">
{literal}#a ...
  Topic: {literal} displays as a linefeed in html output
joncampbell

Replies: 3
Views: 8953

PostForum: General   Posted: Fri Aug 10, 2007 6:06 pm   Subject: {literal} displays as a linefeed in html output
Is there a way to make it so that the {literal} and {/literal} tags do not produce a linefeed or carriage return in html output? I have {if} functions in my template that also produce linefeeds, why i ...
  Topic: Singleton pattern and smarty?
joncampbell

Replies: 7
Views: 12038

PostForum: General   Posted: Wed Jul 11, 2007 7:27 pm   Subject: Singleton pattern and smarty?
Sweet, it works Smile thank you for all your help everyone.
  Topic: Singleton pattern and smarty?
joncampbell

Replies: 7
Views: 12038

PostForum: General   Posted: Wed Jul 11, 2007 9:55 am   Subject: Singleton pattern and smarty?
And how would I instantiate it, with the :: scope operator or with the -> operator?


MySmarty::Smarty->display('some.tpl');

$MySmarty->Smarty->display('some.tpl' ...
  Topic: Can someone code this for me in PHP and C?
joncampbell

Replies: 4
Views: 7489

PostForum: General   Posted: Wed Jul 11, 2007 7:50 am   Subject: Can someone code this for me in PHP and C?
I would go to www.google.com and type in "php echo" and click "I am feeling lucky". That will take you to a page that will give you the answers to that question.
  Topic: Singleton pattern and smarty?
joncampbell

Replies: 7
Views: 12038

PostForum: General   Posted: Wed Jul 11, 2007 7:12 am   Subject: Singleton pattern and smarty?
Your right, I accidentally pasted the wrong pattern, that is a factory pattern, here is what a standard singleton pattern looks like, can someone post what it would look like if I was using it with sm ...
  Topic: Singleton pattern and smarty?
joncampbell

Replies: 7
Views: 12038

PostForum: General   Posted: Tue Jul 10, 2007 10:25 pm   Subject: Singleton pattern and smarty?
I am very new to php5, but have a good understanding of php4, I am trying to implement a singleton pattern for smarty, to help ease the pain of creating modules with smarty, can someone please give an ...
  Topic: How do you test if a Smarty Object is already instantiated?
joncampbell

Replies: 1
Views: 4781

PostForum: General   Posted: Sat May 05, 2007 7:05 am   Subject: How do you test if a Smarty Object is already instantiated?
How would you test if a Smarty Object is already instantiated, kinda like checking if a session is already open or not?
 
Page 1 of 3 Goto page 1, 2, 3  Next
All times are GMT
Jump to:  


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