ServerTweak.com Posted May 16, 2008 Share Posted May 16, 2008 works for me, should for you (WHMCS v3.6.1) backup files: admin/javascript/menu.js admin/templates/homepage.tpl admin/templates/topmenu.tpl Open file admin/javascript/menu.js *********** FIND function clearhidemenu(){if (typeof delayhide!="undefined") clearTimeout(delayhide) } if (hidemenu_onclick=="yes") document.onclick=hidemenu *********** ADD AFTER // ServerTweak Mod Intelligent Search all pages //* var whmcsajax_debug_mode = false; var whmcsajax_request_type = "GET"; var whmcsajax_target_id = ""; var whmcsajax_failure_redirect = ""; function whmcsajax_debug(text) { if (whmcsajax_debug_mode) alert(text); } function whmcsajax_init_object() { whmcsajax_debug("whmcsajax_init_object() called..") var A; var msxmlhttp = new Array( 'Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'); for (var i = 0; i < msxmlhttp.length; i++) { try { A = new ActiveXObject(msxmlhttp); } catch (e) { A = null; } } if(!A && typeof XMLHttpRequest != "undefined") A = new XMLHttpRequest(); if (!A) whmcsajax_debug("Could not create connection object."); return A; } var whmcsajax_requests = new Array(); function whmcsajax_cancel() { for (var i = 0; i < whmcsajax_requests.length; i++) whmcsajax_requests.abort(); } function whmcsajax_do_call(func_name, args) { var i, x, n; var uri; var post_data; var target_id; whmcsajax_debug("in whmcsajax_do_call().." + whmcsajax_request_type + "/" + whmcsajax_target_id); target_id = whmcsajax_target_id; if (typeof(whmcsajax_request_type) == "undefined" || whmcsajax_request_type == "") whmcsajax_request_type = "GET"; uri = "/vip/admin/index.php"; if (whmcsajax_request_type == "GET") { if (uri.indexOf("?") == -1) uri += "?rs=" + escape(func_name); else uri += "&rs=" + escape(func_name); uri += "&rst=" + escape(whmcsajax_target_id); uri += "&rsrnd=" + new Date().getTime(); for (i = 0; i < args.length-1; i++) uri += "&rsargs[]=" + escape(args); post_data = null; } else if (whmcsajax_request_type == "POST") { post_data = "rs=" + escape(func_name); post_data += "&rst=" + escape(whmcsajax_target_id); post_data += "&rsrnd=" + new Date().getTime(); for (i = 0; i < args.length-1; i++) post_data = post_data + "&rsargs[]=" + escape(args); } else { alert("Illegal request type: " + whmcsajax_request_type); } x = whmcsajax_init_object(); if (x == null) { if (whmcsajax_failure_redirect != "") { location.href = whmcsajax_failure_redirect; return false; } else { whmcsajax_debug("NULL whmcsajax object for user agent:\n" + navigator.userAgent); return false; } } else { x.open(whmcsajax_request_type, uri, true); // window.open(uri); whmcsajax_requests[whmcsajax_requests.length] = x; if (whmcsajax_request_type == "POST") { x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1"); x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); } x.onreadystatechange = function() { if (x.readyState != 4) return; whmcsajax_debug("received " + x.responseText); var status; var data; var txt = x.responseText.replace(/^\s*|\s*$/g,""); status = txt.charAt(0); data = txt.substring(2); if (status == "") { // let's just assume this is a pre-response bailout and let it slide for now } else if (status == "-") alert("Error: " + data); else { if (target_id != "") document.getElementById(target_id).innerHTML = eval(data); else { try { var callback; var extra_data = false; if (typeof args[args.length-1] == "object") { callback = args[args.length-1].callback; extra_data = args[args.length-1].extra_data; } else { callback = args[args.length-1]; } callback(eval(data), extra_data); } catch (e) { whmcsajax_debug("Caught error " + e + ": Could not eval " + data ); } } } } } whmcsajax_debug(func_name + " uri = " + uri + "/post = " + post_data); x.send(post_data); whmcsajax_debug(func_name + " waiting.."); delete x; return true; } // wrapper for find_matches function x_find_matches() { whmcsajax_do_call("find_matches", x_find_matches.arguments); } function run_query() { var x; x = document.getElementById("intellisearchval").value; x_find_matches(x, do_cb); } function do_cb(result) { eval(result); } Save file Open file admin/templates/homepage.tpl *********** FIND & Remove <div align="right" style="position:absolute;top:157px;left:590px;width:400px;"><img src="images/icons/search.png" align="absmiddle" /> <strong>Intelligent Search</strong> <input type="text" name="intellisearchval" id="intellisearchval" onKeyUp="run_query();" style="width:120px;" /> <a href="#" onclick="document.getElementById('intellisearchval').value='';document.getElementById('searchresults').style.display='none';return false"><img src="images/delete.gif" align="absmiddle" border="0" /></a> <div align="left" id="searchresults" style="border:1px solid #DFDCCE;background-color:#F7F7F2;padding:5px;margin-right:10px;display:none;" nowrap></div> </div> Save file Open file admin/templates/topmenu.tpl *********** FIND <span class="navbutton" onMouseOver="this.className='navbuttonover *********** Add Above <div align="right" style="position:absolute;top:157px;left:590px;width:400px;"><img src="images/icons/search.png" align="absmiddle" /> <strong>Intelligent Search</strong> <input type="text" name="intellisearchval" id="intellisearchval" onKeyUp="run_query();" style="width:120px;" /> <a href="#" onclick="document.getElementById('intellisearchval').value='';document.getElementById('searchresults').style.display='none';return false"><img src="images/delete.gif" align="absmiddle" border="0" /></a> <div align="left" id="searchresults" style="border:1px solid #DFDCCE;background-color:#F7F7F2;padding:5px;margin-right:10px;display:none;" nowrap></div> </div> Save file Let me know how it goes 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted May 16, 2008 Share Posted May 16, 2008 i havent tried it yet, but should definitely be added to the core. 0 Quote Link to comment Share on other sites More sharing options...
NH-Andrew Posted May 27, 2008 Share Posted May 27, 2008 This doesn't work for me, the search appears but doesn't work on any pages except the home page. 0 Quote Link to comment Share on other sites More sharing options...
impactgc Posted May 27, 2008 Share Posted May 27, 2008 I get the same issue as NH-Andrew -- works on the home page -- not on the others. Adam 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted May 27, 2008 Share Posted May 27, 2008 i confirm this, it doesn't work on my v3.6.1 except for the homepage 0 Quote Link to comment Share on other sites More sharing options...
ServerTweak.com Posted May 27, 2008 Author Share Posted May 27, 2008 let me check into this, i have it working on all pages on my end 0 Quote Link to comment Share on other sites More sharing options...
ServerTweak.com Posted May 27, 2008 Author Share Posted May 27, 2008 clear your cache, let me know while im finding out the reason why this mod isn't working 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted May 27, 2008 Share Posted May 27, 2008 cleared the browser cache and the templates_c folder, still doesn't work, confirmed with IE7 and FF 2.0.0.14 0 Quote Link to comment Share on other sites More sharing options...
whmfan Posted May 27, 2008 Share Posted May 27, 2008 This is for WHMCS developers: Hi, do you think the intelligent search on each admin page will be in your 3.6.2 update? Just curious, as Ive just seen it in the list of planned features in your dev pages. Also interested in Add Sorting to Client Area... 0 Quote Link to comment Share on other sites More sharing options...
bill Posted July 10, 2008 Share Posted July 10, 2008 ive updated to 3.6.2 however dont see search on all admin pages 0 Quote Link to comment Share on other sites More sharing options...
magga Posted July 10, 2008 Share Posted July 10, 2008 This is on the dev tracker it's not in 3.6.2 0 Quote Link to comment Share on other sites More sharing options...
deltatech Posted September 4, 2008 Share Posted September 4, 2008 This is an old thread but did anyone ever get this to work? It displays on all pages but only works on the home page on 3.62 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.