Author |
Message |
Topic: a few bugs in the "truncate" plugin |
Notromda
Replies: 6
Views: 25274
|
Forum: Bugs Posted: Wed Nov 26, 2008 9:09 pm Subject: Be consistant |
If the smarty plugins don't support UTF8 because php doesn't, then let's be consistent and offer official _mb_ functions that do the equivalent as PHP does.
I found this to be extremely useful, a m ... |
Topic: Smarty 3.0 Alpha 1: Proof of Concept |
Notromda
Replies: 93
Views: 250272
|
Forum: Smarty 3 Posted: Thu Oct 16, 2008 2:50 pm Subject: Smarty 3.0 Alpha 1: Proof of Concept |
class Smarty Implements ArrayAccess { ...
Thanks for the input. But Smarty2 did already support that you pass an array with varibale assignments with a single call to the assign method.
The cu ... |
Topic: Smarty 3.0 Alpha 1: Proof of Concept |
Notromda
Replies: 93
Views: 250272
|
Forum: Smarty 3 Posted: Thu Oct 16, 2008 12:35 am Subject: Smarty 3.0 Alpha 1: Proof of Concept |
+1 for php templates, and for short tags.
I just discovered a trick I like for my own smarty subclass that may be good for smarty... in PHP5, use the builtin ArrayAccess class:
class Smarty Imp ... |
Topic: PHP 5 and E_STRICT |
Notromda
Replies: 23
Views: 60301
|
Forum: Smarty Development Posted: Tue Jan 09, 2007 8:04 pm Subject: PHP 5 and E_STRICT |
The recommendation from the PHP group is NOT to run E_STRICT in production environments. So its not really a show-stopper.
The problem is, using a custom error handler, one *can't* disable the E_ ... |
Topic: PHP 5 and E_STRICT |
Notromda
Replies: 23
Views: 60301
|
Forum: Smarty Development Posted: Tue Jan 09, 2007 6:31 pm Subject: PHP 5 and E_STRICT |
but on 2nd thought, this works fine:
This doesn't work when you provide your own error handler via set_error_handler()... the error handler is getting absolutely pounded with E_STRICT call ... |
Topic: silencing errors on uninitialized variables |
Notromda
Replies: 4
Views: 6761
|
Forum: General Posted: Fri Oct 08, 2004 10:08 pm Subject: silencing errors on uninitialized variables |
I know I can turn off debugging. The idea was to clean up the code so that it wouldn't be necessary. I had a report of someone trying to use my application with an unusual setup, where too many warn ... |
Topic: silencing errors on uninitialized variables |
Notromda
Replies: 4
Views: 6761
|
Forum: General Posted: Fri Oct 08, 2004 4:15 pm Subject: silencing errors on uninitialized variables |
I'm trying to hunt down uninitialized variables, (just being picky, I guess) and I get warnings from smarty when a template variable is not defined.
I tried using the example {assign var="foo" valu ... |
Topic: register_function problem |
Notromda
Replies: 3
Views: 8173
|
Forum: General Posted: Tue Aug 31, 2004 2:49 am Subject: fixed with plugins |
It seems that the function was not in scope, so I switched to plugins instead. |
Topic: register_function problem |
Notromda
Replies: 3
Views: 8173
|
Forum: General Posted: Tue Aug 31, 2004 2:20 am Subject: Re: register_function problem |
(Note, this is inside a class that extends smarty)
Correction, it doesn't extend smarty, it simply contains a smarty instance. |
Topic: register_function problem |
Notromda
Replies: 3
Views: 8173
|
Forum: General Posted: Tue Aug 31, 2004 2:17 am Subject: register_function problem |
I'm getting an error: "custom function 'url_for' is not implemented" with the following code and template: (Note, this is inside a class that extends smarty)
<?php
function dispatch($controller ... |
Topic: multiple compiles for one file |
Notromda
Replies: 3
Views: 6907
|
Forum: General Posted: Mon Aug 30, 2004 9:56 pm Subject: FIXED |
indeed, that fixed it. I moved the logic about the subdirectory up a ways to the display() call, and everything is working better. Thanks! |
Topic: multiple compiles for one file |
Notromda
Replies: 3
Views: 6907
|
Forum: General Posted: Mon Aug 30, 2004 9:46 pm Subject: multiple compiles for one file |
So given the single template_dir = '/view/', templates 'foo/index' and 'bar/index' should each result in different compile files.
Ah... I think I'm setting up a different template_dir for each co ... |
Topic: multiple compiles for one file |
Notromda
Replies: 3
Views: 6907
|
Forum: General Posted: Mon Aug 30, 2004 9:28 pm Subject: multiple compiles for one file |
I am working on an MVC framework using Smarty templates, similar in style to Ruby on Rails http://www.rubyonrails.org
I pass in some arguments to a dispatcher like this:
http://hostname/index.ph ... |
|