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

Very Simple Code with 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 -> 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: 1785

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: 1785

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: 1785

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:   
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 -> 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