Buy Now
Sign in

Add variables for field: {site:sitename}, {site:mailfrom},{site:fromname}, {site:replyto},{site:replytoname}, {site:CONFIG_NAME}

koreshs , May 12 2017
k
koreshs

Very, very much I ask you to add support of variables in fields.
These variable values are the parameters of the site configuration.
{site:sitename}, {site:mailfrom},{site:fromname}, {site:replyto},{site:replytoname}, {site:CONFIG_NAME}, where CONFIG_NAME is JFactory::getConfig()->getValue( 'CONFIG_NAME' ); .
Especially I ask you to use support:
{site:sitename}, {site:mailfrom},{site:fromname}, {site:replyto},{site:replytoname}.

admin

Hi koreshs,

You can get the value of these settings inside a PHP function, then return the value and use the {var:function_name} syntax.

Best regards,
Max

Max
If your main question got answered then please mark the answer using the button!

k
koreshs

Is this how it is done?
{var:JFactory::getConfig()->getValue( 'CONFIG_NAME' )}

admin

No, create a new form event, drag PHP function inside and use this code:

				
return JFactory::getConfig()->getValue( 'CONFIG_NAME' );

Now, in your custom code call this: {var:php_function_name}

where "php_function_name" is the name of the PHP function!

Best regards,
Max

Max
If your main question got answered then please mark the answer using the button!

k
koreshs

Thank you. I will know this for the future.
But still, getting the email site is norm.
SQL requests and write code every time for this is not good.