|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
twister Smarty n00b
Joined: 21 Aug 2019 Posts: 4
|
Posted: Wed Aug 21, 2019 12:42 pm Post subject: smarty in whmcs |
|
|
hi there,
i have an old tempalte from whcms 6.4 and now transitioning to Whmcs 7.5
the issue i have is that smarty is not rendering all my php code and whcms debug is very limited. as an error i get a blank page on the template. is there a way to enable some sort of debugging instead of blank page ? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Aug 22, 2019 5:03 am Post subject: |
|
|
PHP code insertion in Smarty templates was deprecated a very long time ago.
And subsequently removed a long time ago. |
|
Back to top |
|
twister Smarty n00b
Joined: 21 Aug 2019 Posts: 4
|
Posted: Fri Aug 23, 2019 7:06 am Post subject: |
|
|
it's still supported via WHMCS. but i cannot find a way to log the errors, just getting a blank page |
|
Back to top |
|
twister Smarty n00b
Joined: 21 Aug 2019 Posts: 4
|
Posted: Thu Aug 29, 2019 6:17 am Post subject: |
|
|
if someone is interested, you can use {php}{/php} with included php files, it's the only way mysqli queries will parse variables to your template. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Aug 29, 2019 2:33 pm Post subject: |
|
|
That makes no sense, sorry. How's mysqli in any way related to Smarty? |
|
Back to top |
|
twister Smarty n00b
Joined: 21 Aug 2019 Posts: 4
|
Posted: Tue Oct 01, 2019 9:58 am Post subject: |
|
|
if you use old mysql syntaxes they will work inside PHP tags in a smarty template.
if you need to mysqli syntaxes you will need to run those queries in a separate example.php file and include it as a file in your smarty template |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Oct 02, 2019 9:19 pm Post subject: |
|
|
twister wrote: | if you use old mysql syntaxes they will work inside PHP tags in a smarty template.
if you need to mysqli syntaxes you will need to run those queries in a separate example.php file and include it as a file in your smarty template |
Why would you do anything like that to begin with? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|