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

Custom functions shorttags

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
thesame
Smarty n00b


Joined: 23 Mar 2011
Posts: 3

PostPosted: Wed Mar 23, 2011 2:40 pm    Post subject: Custom functions shorttags Reply with quote

Hi. I found it annoying that custom functions cannot accept shorthand parameters, so I made small patch for that: http://pastebin.com/dUN86YTX
Back to top
View user's profile Send private message
thesame
Smarty n00b


Joined: 23 Mar 2011
Posts: 3

PostPosted: Wed Mar 23, 2011 3:04 pm    Post subject: Reply with quote

oops http://pastebin.com/TvLAAP9n
Back to top
View user's profile Send private message
comrade_fuzz
Smarty n00b


Joined: 17 Dec 2011
Posts: 3

PostPosted: Sat Dec 17, 2011 6:08 pm    Post subject: Reply with quote

Thanks a lot! This is really good feature i've googled so hard.
Back to top
View user's profile Send private message
comrade_fuzz
Smarty n00b


Joined: 17 Dec 2011
Posts: 3

PostPosted: Sat Dec 17, 2011 6:10 pm    Post subject: Reply with quote

Have you any ideas how can I upgrade smarty without replacing those lines?
Back to top
View user's profile Send private message
comrade_fuzz
Smarty n00b


Joined: 17 Dec 2011
Posts: 3

PostPosted: Sat Dec 17, 2011 6:20 pm    Post subject: Reply with quote

This patch corrupts compiling boolean shorthands like this:
Code:
{foobar bar=foo flag}

flag supposed to be true, but it generates an error in template's cache
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


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