Cain72 Posted September 10, 2014 Share Posted September 10, 2014 Hi guys, Just a quick one, is there or has anyone come up with a way to pull total client count ? im sure there would be a way to do it, what i'd like to do is get the total count and link it up to one of the pages, a lame eg: would be ... <div class="maxclientcount"> <p>{$maxclientcount}, happy customers cant be wrong, sign up today!!</p> </div> you get the idea, can anyone point me in the right direction, cheers Cain 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 10, 2014 Share Posted September 10, 2014 hello Cain, your request is very simple just create new hook file in "/includes/hooks/" directory with any name for example "totalclients.php" so this will be located here: WHMCS-Main-Dir/includes/hooks/totalclients.php and put the following code inside it: <?php function hook_getTotalClients($params){ $totalclients = get_query_val("tblclients","COUNT(id)",""); return array('maxclientcount', $totalclients); } add_hook("ClientAreaPage", 1, "hook_getTotalClients"); ?> so this: <div class="maxclientcount"> <p>{$maxclientcount}, happy customers cant be wrong, sign up today!!</p> </div> will display a real number of your clients, let me know if run into issues, 0 Quote Link to comment Share on other sites More sharing options...
Cain72 Posted September 10, 2014 Author Share Posted September 10, 2014 Hi sentq, awesome, thanks for that mate, now you got me hooked on hooks .. lol Cain 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 10, 2014 Share Posted September 10, 2014 now you got me hooked on hooks .. lol you are welcome! 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.