The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[AJAX] Live Search Details »» | |||||||||||||||||||||||||||||
Description: Search without reload pages: by threads, by users with many sort criteria.
Features:
Installation: Upload all files from folder upload to forum folder. Import product. History: 4.0.0 - initial release 4.0.1 - fixed some issues, compatibility with 4.0.x 4.0.5 - rewrote js engine 4.0.6 - fix bug with chrome, fix overlay, some js optimization If you like this hack, please, click INSTALL and Nominate for MOTM Download Now
Screenshots
Show Your Support
|
Comments |
#182
|
||||
|
||||
Noticed the above still had some problems with Chrome.
Updated to 4.0.6, ran it through an un-minifier, and ended up with this: Code:
/** * [YUI] Live Search Main Script Version 4.0.5 * * @author mad@Max */ (function() { var g = YAHOO.util, e = g.Dom, c = g.Event, i = YAHOO.lang; i .augmentObject( YAHOO.vBulletin.lsa, { init : function() { c.removeListener(this.textobj, "focus", this.start); c.on(this.textobj, "blur", this.winop, this, true); c.on(this.textobj, "focus", this.winop, this, true); c.on(this.textobj, "keyup", function(a) { a = a || window.event; PHP.in_array(a.keyCode || a.which, [ 37, 39, 32, 36, 35 ]) > -1 || this.get() }, this, true); c.on("lsarld", "click", this.get, this, true); c.on("lsacls", "click", this.winop, this, true) }, load : function() { YAHOO.util.Connect .asyncRequest( "POST", this.bb + "/ajaxlivesearch.php?do=lsawin", { success : function(a) { if (a.responseXML) { this.cont = document .createElement("div"); this.cont.id = "lsa_cont"; this.cont.style.position = "absolute"; this.cont.style.display = "none"; this.cont.innerHTML = a.responseXML .getElementsByTagName("lsagetwin")[0].firstChild.nodeValue; document.body .appendChild(this.cont); this.textobj.value = ""; this.resobj = e .get("lsa_results"); this.init(); (new g.DD(this.cont.id)) .setHandleElId("lsadd"); this.winop(); init_collapsers() } }, failure : vBulletin_AJAX_Error_Handler, timeout : vB_Default_Timeout, scope : this }, SESSIONURL + "securitytoken=" + SECURITYTOKEN + "&do=lsawin") }, winop : function(a) { if (this.cont.style.display == "none") { this.textobj.value = ""; this.resobj.innerHTML = vbphrase.lsa_wait; this.cont.style.display = "block"; center_element(this.cont) } else { if (c.getTarget(do_an_e(a)).id == "lsacls") this.cont.style.display = "none"; this.textobj.value = this.textobj.value || vbphrase.live_search } }, get : function() { var a = PHP.trim(this.textobj.value), h = e .get("lsawithword").value > 0, b = ""; if (a.length >= this.min) { b = a; if (!h) { var d = a.split(" "); b = ""; for ( var f in d) d[f].length < this.min || (b += (b ? " " : "") + d[f]) } } if (b.length >= this.min) { if (h || !(d.length > 1 && b != a)) { this.timeout && this.timeout.cancel(); this.timeout = i.later(500, this, this.send, b) } } else this.resobj.innerHTML = vbphrase.lsa_wait }, send : function(a) { var h = new vB_Hidden_Form(null), b = this.resobj, d = e .get("lsaloading"); h.add_variables_from_object(e.get("lsform")); e.removeClass(d, "hidden"); g.Connect.isCallInProgress(this.req) && g.Connect.abort(this.req); var f = new vB_AJAX_Handler(true); f.callback = function(j) { e.addClass(d, "hidden"); b.innerHTML = j.responseXML .getElementsByTagName("ajaxlivesearch")[0].firstChild.nodeValue }; var sendData = "&do=search&" + h .build_query_string() .replace( /lsazone=([a-z0-9]+)&/g, function(j,k,l) { try { var test = RegExp.rightContext; } catch (e) { return (l == 24 ? "lsazone=" : ",") + k + ''; } return ( l == 24 ? "lsazone=" : ",") + k + (RegExp.rightContext .search(/^lsasort/) == 0 ? "&" : ""); }) + "keyword=" + PHP.urlencode(a); f .send( "ajaxlivesearch.php?do=search", sendData ); this.req = f.conn } }) })(); HTH |
#183
|
||||
|
||||
Interesting.
|
#184
|
|||
|
|||
Installed :P
|
#185
|
||||
|
||||
Quote:
|
#186
|
|||
|
|||
I want to use this mod with sphinx but it's not working, anyone has the code modification to let it work with sphinx?
|
#187
|
|||
|
|||
Hi:
It did not work for me. Do I need to upload two files .js in the do_not_upload folder? Thanks. |
#188
|
||||
|
||||
Not working for me in 4.1.4. Wack.
|
#189
|
|||
|
|||
Not working with Chrome, vB 4.1.0
|
#190
|
|||
|
|||
There is a way to have the results into a drop down menu instead of the popup window?
And who can we move that popup window to specific position? Let's say under the search box Thank you! |
#191
|
||||
|
||||
One day it started working on my site. It was real random but I turned it off as it was annoying the crap out of me every time I typed in a couple letters and automatically began searching instead of showing a list like most ajax powered search boxes.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|