Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Very Simple Code with WHMCS

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
sqpp
Smarty n00b


Joined: 15 Oct 2017
Posts: 3

PostPosted: Sun Oct 15, 2017 2:06 pm    Post subject: Very Simple Code with WHMCS Reply with quote

Hey!

I have smarty enabled on WHMCS, but for some reason this code is not working.

I would like to encode the field to MD5 (no need to be that secure, since I going to decrypt it, but have to be unique)

Code:
{php} $usid = $service_custom_fields.1; echo md5($usid); {/php}

I have no error, but when sending email, got big error with any detailed info
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1404

PostPosted: Sun Oct 15, 2017 2:24 pm    Post subject: Reply with quote

{php} tags are not supported anymore.
You can use any PHP function as a modifier.
Code:
{$service_custom_fields.1|md5}
Back to top
View user's profile Send private message
sqpp
Smarty n00b


Joined: 15 Oct 2017
Posts: 3

PostPosted: Sun Oct 15, 2017 3:06 pm    Post subject: Reply with quote

The problem is, Email message rendered empty - please check the email message Smarty markup syntax
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1404

PostPosted: Sun Oct 15, 2017 3:27 pm    Post subject: Reply with quote

http://lmgtfy.com/?q=how+to+find+error+in+your+code

For a starter, make your template work for the web page. You can use {debug} tag for visual aid.
Back to top
View user's profile Send private message
sqpp
Smarty n00b


Joined: 15 Oct 2017
Posts: 3

PostPosted: Sun Oct 15, 2017 3:29 pm    Post subject: Reply with quote

AnrDaemon wrote:
http://lmgtfy.com/?q=how+to+find+error+in+your+code

For a starter, make your template work for the web page. You can use {debug} tag for visual aid.


Brother, I just copied the code, you just sent me, there is no other code.

Nevermind..

modifier 'md5' not allowed by security setting
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1404

PostPosted: Sun Oct 15, 2017 5:23 pm    Post subject: Reply with quote

sqpp wrote:
modifier 'md5' not allowed by security setting

Well, that's a completely different issue then Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General 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