minadreapta Posted March 15, 2017 Share Posted March 15, 2017 Hello, i recently upgraded WHMCS to v7 and the Intelligent Search from the admin header are is not working anymore. It only works if i press enter. The one in the Client Profile dropdown works thou without pressing enter key. I tried the solutions from here: https://forum.whmcs.com/showthread.php?106674-Admin-Area-Intelligent-Search-While-Typing&highlight=intelligent+search it didn't work. i tried reuploading the admin files but that didn't help. any ideea what should i do to make the header Intelligent search work? thanks. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 15, 2017 Share Posted March 15, 2017 i recently upgraded WHMCS to v7 and the Intelligent Search from the admin header are is not working anymore. It only works if i press enter.The one in the Client Profile dropdown works thou without pressing enter key. I tried the solutions from here: https://forum.whmcs.com/showthread.php?106674-Admin-Area-Intelligent-Search-While-Typing&highlight=intelligent+search it didn't work. in fairness, that solution was for v6 - v7 doesn't even use head.js any more, so it's no surprise it didn't work. http://docs.whmcs.com/WHMCS_7.1_Asset_Changes i tried reuploading the admin files but that didn't help.any idea what should i do to make the header Intelligent search work? it would work if you added the code from that thread into header.tpl - either directly in the template or using an action hook... <?php function admin_searchbar_hook($vars) { $head_return = '<script> /* Intelligent Search On Typing */ $(document).ready(function(){ $("#intellisearchval").on("keyup", function() { $("#intellisearchval").css("background-image","url(\'images/loading.gif\')"); $.post("search.php", $("#frmintellisearch").serialize(), function(data){ $("#searchresultsscroller").html(data); $("#searchresults").slideDown("slow",function(){ $("#intellisearchval").css("background-image","url(\'images/icons/search.png\')"); }); }); }); });</script>'; return $head_return; } add_hook("AdminAreaHeadOutput",1,"admin_searchbar_hook"); 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted March 15, 2017 Author Share Posted March 15, 2017 thanks Brian, adding that js snippet into header.tpl did the trick. "v7 doesn't even use head.js any more, so it's no surprise it didn't work." - well, the search form is still there, isn't it? in a fresh whmcs v7 installation. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 15, 2017 Share Posted March 15, 2017 thanks Brian, adding that js snippet into header.tpl did the trick. bear in mind that if you've added it directly to the template, the WHMCS Automatic Updater might remove it during a future update - if you've used the hook method, it won't matter. "v7 doesn't even use head.js any more, so it's no surprise it didn't work." - well, the search form is still there, isn't it? in a fresh whmcs v7 installation. the code from head.js still exists - it's just that it's incorporated into script.min.js now. 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.