Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

smarty in whmcs

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
twister
Smarty n00b


Joined: 21 Aug 2019
Posts: 4

PostPosted: Wed Aug 21, 2019 12:42 pm    Post subject: smarty in whmcs Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu Aug 22, 2019 5:03 am    Post subject: Reply with quote

PHP code insertion in Smarty templates was deprecated a very long time ago.
And subsequently removed a long time ago.
Back to top
View user's profile Send private message
twister
Smarty n00b


Joined: 21 Aug 2019
Posts: 4

PostPosted: Fri Aug 23, 2019 7:06 am    Post subject: Reply with quote

it's still supported via WHMCS. but i cannot find a way to log the errors, just getting a blank page
Back to top
View user's profile Send private message
twister
Smarty n00b


Joined: 21 Aug 2019
Posts: 4

PostPosted: Thu Aug 29, 2019 6:17 am    Post subject: Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu Aug 29, 2019 2:33 pm    Post subject: Reply with quote

That makes no sense, sorry. How's mysqli in any way related to Smarty?
Back to top
View user's profile Send private message
twister
Smarty n00b


Joined: 21 Aug 2019
Posts: 4

PostPosted: Tue Oct 01, 2019 9:58 am    Post subject: Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Oct 02, 2019 9:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP