I had some custom work done to CMSMS to allow for functions not available with the the base install.
The developer is using User Defined Tags to reference a script page.
My question. Is their a better way to reference the script page without pointing to the page like below.
require_once("/serverpath/domains/domain.com/html/scripts/functions.php");
$address = getAddress();
echo $address;
Thanks for the help
[SOLVED]User Defined Tags
[SOLVED]User Defined Tags
Last edited by sugna on Thu Nov 03, 2011 10:24 pm, edited 1 time in total.
Re: User Defined Tags
Not sure what you're asking. If you want to run PHP code located in a file, that's the way to do it. You have to 'include' it or it won't know what to do.
An alternative is to copy the code from that file into the UDT. The file will no longer be needed.
Another alternative is to make it a plugin. Look at the scripts in the plugins/ directory to see how it's done.. That function will be available to call from anywhere in CMSMS that takes Smarty code.
An alternative is to copy the code from that file into the UDT. The file will no longer be needed.
Another alternative is to make it a plugin. Look at the scripts in the plugins/ directory to see how it's done.. That function will be available to call from anywhere in CMSMS that takes Smarty code.
Re: User Defined Tags
Answer:
"An alternative is to copy the code from that file into the UDT. The file will no longer be needed."
Thanks Wishbone!
"An alternative is to copy the code from that file into the UDT. The file will no longer be needed."
Thanks Wishbone!