hmaddy Posted September 27, 2022 Share Posted September 27, 2022 (edited) i would like to add a small image to the left side of clientarea home page. so i added a hook page like this. But after that what to do next.? <?php if (!defined("WHMCS")) die("This file cannot be accessed directly"); add_hook('ClientAreaSidebars', 1, function() { GLOBAL $smarty; $templatefile = $smarty->getVariable('templatefile'); $allowedpages = ['clientareahome','homepage','knowledgebase']; if (in_array($templatefile, $allowedpages)) { $secondarySidebar = Menu::secondarySidebar(); $title = 'Image Banner'; $bodyHtml = '<div> <div> <div> <a href=""> <img src="https://dummydomain.tld/clients/images/kbaseimages/bharat_pey_qr.jpg" height="95px"> <div> <h4>Los Angeles</h4> </div> </a> </div> </div> </div>'; } }); Edited September 27, 2022 by dove 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted September 28, 2022 Share Posted September 28, 2022 Put the hook file in to WHMCS_install/includes/hooks. 1 Quote Link to comment Share on other sites More sharing options...
hmaddy Posted September 28, 2022 Author Share Posted September 28, 2022 already added the code to hook folder with file name clntareasidebarhooks.php 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted September 28, 2022 Share Posted September 28, 2022 Hi, What exactly are you looking to do with $title and $bodyHtml ? You declare them but you've not passed them back to the sidebar. 0 Quote Link to comment Share on other sites More sharing options...
hmaddy Posted September 28, 2022 Author Share Posted September 28, 2022 1 minute ago, leemahoney3 said: Hi, What exactly are you looking to do with $title and $bodyHtml ? You declare them but you've not passed them back to the sidebar. Solved. 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.