ozgurerdogan Posted August 4, 2015 Share Posted August 4, 2015 Can someone please convert this smarty2 to smarty3 syntax. Because I can not get it work with whmcs 6. {php} global $smarty; $kullaniciadi = $smarty->_tpl_vars["service"]["username"]; $table = "tblhosting"; $fields = "username,password"; $where = array("username"=>$kullaniciadi); $result = select_query($table,$fields,$where); $data = mysql_fetch_array($result); $password = $data['password']; $passtodec = $data["password"]; $command = "decryptpassword"; $adminuser = "admin"; $values["password2"] = $passtodec; $results = localAPI($command,$values,$adminuser); $sifre = $results["password"]; {/php} Thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 4, 2015 Share Posted August 4, 2015 have you read the documentation about this ? http://docs.whmcs.com/Version_6_Template_Migration_Guide#.7Bphp.7D_Block_Syntax 0 Quote Link to comment Share on other sites More sharing options...
ozgurerdogan Posted August 4, 2015 Author Share Posted August 4, 2015 (edited) I can not find to figure out this part : $kullaniciadi = $smarty->_tpl_vars["service"]["username"]; Edited August 4, 2015 by ozgurerdogan 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 4, 2015 Share Posted August 4, 2015 (edited) http://forum.whmcs.com/showthread.php?101707-Smarty-Issue-on-WHMCS-6-Beta-5&p=421914#post421914 btw - I posted that link because it contained the specific answer to your question - not so you could post the same question in the thread there! $smartyvars = $template->getTemplateVars(); $kullaniciadi = $smartyvars['service']['username']; Edited August 4, 2015 by brian! 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.