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, 05:50
K
koreshs 10
May 12 2017, 05:50 #368057
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 27
May 12 2017, 13:11 #368065
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!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
K
koreshs 10
May 12 2017, 21:22 #368099
Is this how it is done?
{var:JFactory::getConfig()->getValue( 'CONFIG_NAME' )}
admin 27
May 12 2017, 22:15 #368100
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!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
K
koreshs 10
May 13 2017, 00:06 #368105
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.