|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
adzero Smarty n00b
Joined: 09 Oct 2004 Posts: 3
|
Posted: Sat Oct 09, 2004 5:05 pm Post subject: Difficulties in loading personal plugin... |
|
|
Hi to you all...
I'm a new user of Smarty and I tried developping a plugin (function)...
I followed the naming rules and placed the file in my plugins direct ory...
However, when I call this plugin in a template, it doesn't work ! The name of the plugin appears instead of the result...
I developped a modifier plugin and this one works...
Strange...
Can anyone help me ?
THX |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sat Oct 09, 2004 6:02 pm Post subject: |
|
|
sure -- just post some actual details |
|
Back to top |
|
kills Smarty Elite
Joined: 28 May 2004 Posts: 493
|
Posted: Sat Oct 09, 2004 6:46 pm Post subject: |
|
|
boots wrote: | sure -- just post some actual details |
e.g. your code? |
|
Back to top |
|
adzero Smarty n00b
Joined: 09 Oct 2004 Posts: 3
|
Posted: Sun Oct 10, 2004 8:13 am Post subject: Solution found... |
|
|
After some tests I found the solution to my problem...and by the same time I think I've found a bug in smarty...
Here it is !
The function plugin I was trying to create was a derivate version of html_table...
So I copied the file smarty.function.html_table.php to smarty.function.html_tablev2.php. Then I changed the name of the function inside my new file to smarty_html_tablev2.
At template execution the only thing I can see is html_tablev2...instead of the table.
Then I had the idea of changing names to something like"test". The new file name was smarty.function.test.php and the corresponding function test.php.
With this name, It works, I obtain the table just as with html_table function.
Later I found that if two plugins have names that begin with the same string (e.g. html_table and html_tablev2), the function with the longest name cannot be used...
Seems like a bug... Need more testing to be sure... |
|
Back to top |
|
adzero Smarty n00b
Joined: 09 Oct 2004 Posts: 3
|
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sun Oct 10, 2004 12:43 pm Post subject: Re: It's really a bug |
|
|
adzero wrote: | Seems o be (re) new with 2.6.5 version. |
yes. and fixed in cvs quite some time ago. |
|
Back to top |
|
|
|
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
|