Unofficial new feature patch for Smarty 2.1.1
| From: | Stealth Dave | Date: | Mon, 20 May 2002 22:37:32 +0000 |
| Subject: | Unofficial new feature patch for Smarty 2.1.1 | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-4315@lists.php.net to get a copy of this message | ||
Hello. Allow myself to introduce... myself. My name is David Still,
and I'm a web site developer who's been using Smarty in an e-commerce
project since 1.4.1. Over the past few months, I've created several
plugins to expand Smarty's already exceptional functionality that I
think other people would find useful. I also created a new function
which requires a patch rather than a plugin.
Most of the plugins are extremely simple: single function modifiers, but
very useful (three trim functions and a URL encoder). Other functions,
like block capture and count array, are more useful. But the best
addition is one that I feel Smarty has needed for quite some time: a
for loop.
The patch is for a real for loop which assigns the counter in a variable
which can be used by other functions. Currently, the only way to create
a loop in smarty is by using either section or foreach, both of which
require an existing array. The new forloop function has no such
requirement. I needed it to create a page counter, but it is certainly
useful for many other functions as well.
You can find all of the plugins and the patch at
http://www.wiskars.com/Smarty. The forloop patch
requires Smarty
2.1.1. Any feedback would be greatly appreciated.
One other thing, I'd like to submit these functions for inclusion in the
next version of Smarty. Who do I need to contact about that?
Thanks,
- Dave
--
David E. Still phone:818.980.6909
dave@stilldesigning.com http://www.stilldesigning.com