For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > January 2005 > Re: [SMARTY] need help with executing own function









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] need help with executing own function
Zuhaimi Zainal

2005-01-18, 4:09 pm

>May be the best way is to make translation of car type at >PHP-side?
thanks ON.KG.
yup that can surely fix it.. but $car come from a db query result..
much like a listing. there must be a better way.

>two way
>http://smarty.php.net/manual/en/lan...n.functions.php
>
>or you writting your pluggin
>
>http://smarty.php.net/manual/en/plugins.writing.php

thanks Jean-Michel Juzan.
this is more likely.. but i'm wondering where it should go to.. is it
prefilter, postfilter or output filter? i've tried but it doesnt work
either. i think i got it wrong somewhere.

here is what i did..
1)i've created (prefilter|postfilter|outputfilter).myfunction.php in
SMARTY_DIR\plugins

2) what i understand from reading the manual was that i dont have to
do anything else.. smarty is smart enuff to detect my function.. but
it didnt work.. so i even included it in the template like this
{include_php file="../includes/functions.inc.php"}

but still i cant make it work.. *sigh* anybody can point me where i messed up?


--
When you signup for PayPal, you can start accepting credit card
payments instantly. As the world's number one online payment service,
PayPal is the fastest way to open your doors to over 40 million member
accounts worldwide.
Best of all, it's completely free to sign up!
To sign up or learn more, click here:
https://www.paypal.com/row/mrb/pal=ET694X3JAP9X2
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com