jhrhp Posted June 25, 2016 Share Posted June 25, 2016 I'm trying to use the tag {php}, but I can not, even using just {php}{/php} The pages that try to use are blank 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted June 26, 2016 Share Posted June 26, 2016 By default, WHMCS locks the {php} tag from template usage, and this is the expected behavior. I wouldn't get too used to using it, as it's highly frowned upon, however if you go to admin -> setup -> general settings -> security, you can enable this feature. Again, don't get too used to using it, I wouldn't be terribly surprised if that got yanked out in v7. using {php} in smarty has been frowned upon for quite some time, it was disabled by default in smarty3, and , again, I wouldn't be totally surprised if it was removed entirely in future versions of smarty. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted June 26, 2016 Share Posted June 26, 2016 you need to enable support of {php} tag from Admin Area -> Setup -> General Settings -> Security Tab -> *Allow Smarty PHP Tags* but it is recommended to write your PHP logic in ActionHook function and pass the results to Smarty, this is better and safe An option was added to WHMCS 6 to enable use of the potentially dangerous {php} tag in custom templates. This option is disabled by default but can be enabled if required in Setup > General Settings > Security. We strongly encourage using hook functions over php code blocks inside of templates for backend interaction. 0 Quote Link to comment Share on other sites More sharing options...
jhrhp Posted June 27, 2016 Author Share Posted June 27, 2016 It was only activate the panel. Thanks for the advice. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.