Re: Plugin Question
| From: | Anders Janson | Date: | Thu, 21 Mar 2002 09:49:28 +0000 |
| Subject: | Re: Plugin Question | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3169@lists.php.net to get a copy of this message | ||
Philipp Andreas wrote:
> Hi Developers ;=)
>
> I currently developing with a older smarty version. Now i'm switching
> to 2.0 and i have a Plugin Question, Problem ;)
>
> In the older smarty versions there was a smartyaddon file there i
> could put any type of function.
>
> then, in the class file i must link the functionname with a
> templatefunction name. like
> "smarty_func1","templatefunctionname".
>
> so on this way i had created 2 function
>
> {border} and {/border}. this function creates a nice html border ;)
>
> but in smarty 2.0 i must name the file in the plugindir like the name
> of the template command. but i can't name my files like
> function./border.php, and the functionname in the pluginfile is also
> imposible ;(
>
> could someone gives me a hint ?? please..
>
> ps. i dont want rename the function like this {borderstart} /
> {borderend}
>
I assume your reason for not wanting to rename a function is that you don't
want to change your template sources.
Maybe a simple prefilter that changes "/border" in your template source to
"borderend" would do?
/Anders