|
|
#1 |
|
Member
Join Date: Aug 2008
Posts: 68
Rep Power: 5 ![]() |
Hi,
I have written my own modifier plugin with the following header, please can someone tell me what is the syntax to call this from within a tpl file? function smarty_modifier_custom_output_age($date_of_birth) I have tried the following but get an error: {custom_output_age date_of_birth=$extra}
__________________
Many Thanks, Nagrap2 Developer Version 4.1 |
|
|
|
|
|
#2 | |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,847
Rep Power: 111 ![]() |
I think you need to rename it to smarty_function_custom_output_age($date_of_birth)
Quote:
Then it could be called in the template as: {custom_output_age date_of_birth=$extra}
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules |
|
|
|
|
|
|
#3 |
|
Moderator
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,397
Rep Power: 41 ![]() ![]() |
I think that you actually need to name the Smarty function file itself:
smarty_function_custom_output_age Within the file, you need to have your function with this type of syntax: function smarty_modifier_custom_output_age($date_of_birth) Then you call the function from within your tpl file like this {custom_output_age date_of_birth=$extra} -Mike
__________________
Mike-N-Tosh v3.1.10 Developer IndianaPC.org - A community website Sandbox v4.0.9, 4.1 Templates, Mods & Docs for sale | My blog with much content for 68 Classifieds. Web Hosting | Web Design & Development | 68 Classifieds Customizations I am not a 68C employee, just a user and try to help out |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Modifying smarty function | HotAir | v3.1 Modules & Modifications | 5 | 06-15-2008 03:23 PM |
| Smarty Function for Top Listing | Soleiltan | v3.1 Questions & Support | 1 | 02-05-2008 08:24 AM |
| What do you call this? / | Eric Barnes | Off Topic | 5 | 06-16-2006 06:53 PM |
| Call from userjoin.php to terms page???'s | dawyatt | v3.0 Questions & Support | 7 | 04-24-2006 01:40 PM |
| Help needed with syntax | Maffo | v3.0 Questions & Support | 3 | 04-24-2006 11:43 AM |