yarantoos Posted March 25, 2016 Share Posted March 25, 2016 Hello, I want to convert dated to jalali in clientsummary.tpl . hook:AdminAreaClientSummaryPage return html but we need return an array. Which hook we should use ? 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted March 25, 2016 Share Posted March 25, 2016 ActionHook:AdminAreaPage 0 Quote Link to comment Share on other sites More sharing options...
yarantoos Posted March 25, 2016 Author Share Posted March 25, 2016 Please test this code : function hook_my_clsum2($vars) { $return = array(); $return = array("field1" => "value1", "field2" => "value2"); return $return; } add_hook('AdminAreaPage', 1, 'hook_my_clsum2'); You will see field1 and field2 is not set in clientsummary.tpl 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted March 25, 2016 Share Posted March 25, 2016 I may misunderstod your request, what exatly do you need to do there? If you need to pass Smarty Tags/Variables to that page, which will need manual modification in clientsummary.tpl file, use: http://docs.whmcs.com/Hooks:AdminAreaPage But if you need to display HTML code directly, use the ActionHook below: http://docs.whmcs.com/Hooks:AdminAreaClientSummaryPage 0 Quote Link to comment Share on other sites More sharing options...
yarantoos Posted March 25, 2016 Author Share Posted March 25, 2016 I need to pass Smarty Tags/Variables to that page but unfortunately "AdminAreaPage" doesn't' work . You can check it in your side . I sent the sample code in my previous post. Thanks 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted March 25, 2016 Share Posted March 25, 2016 actually it does not work for me too, very strange maybe you need to report it to WHMCS as a bug. test was done in WHMCS v6.2.0 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 26, 2016 Share Posted March 26, 2016 actually it does not work for me too, very strange maybe you need to report it to WHMCS as a bug.test was done in WHMCS v6.2.0 confirmed not working in v6.2.2 interestingly, the following was posted in May 2015... http://forum.whmcs.com/showthread.php?100886-Passing-admin-module-data-to-Smarty&p=418590#post418590 I submitted a ticket to WHMCS support. They have believe the issue may be due to a bug in WHMCS and said that the developers will address the issue in a future release. In the mean time, they suggested querying the data directly from the template using {php}{/php} tags. This will work fine for us as a temporary workaround. so it's apparently been known as a bug for at least ten months... 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.