Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[YUI] Live Search Details »»
[YUI] Live Search
Version: 3.0.2, by mad@Max mad@Max is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.8.x Rating:
Released: 02-06-2009 Last Update: 07-10-2009 Installs: 162
Uses Plugins Auto-Templates
Additional Files  
No support by the author.

Features:
  • search only, if typed >= 3 symbols;
  • header to window with button close;
  • message about no result;
  • limit number of threads;
  • highlight words in result
  • trim title of thread, if it large (optional)
  • edit position of pop-up window
  • work with vBadvanced
  • limit the number of displayed results
  • group permission
  • search by your own forums
  • sort results of search
  • mod makes only one query to db
  • full compatibility with styles and browsers
  • search by individual words
  • integrate option into standard search
  • search only the specified length of each word
  • users search
  • interval requests
  • wrote 2 js class
Rewritten many things since version 1.6

Known Issues
Double click in search field - still not fixed.

Installation:
Upload all files from folder upload to forum folder.
Import product.

Upgrade
Uninstall the old version, delete files (if you has use it) and install new version.

If you already have opened search field, do following.
Search field look like this:

HTML Code:
                <form action="search.php?do=process" method="post">

                    <input type="hidden" name="do" value="process" />
                    <input type="hidden" name="quicksearch" value="1" />
                    <input type="hidden" name="childforums" value="1" />
                    <input type="hidden" name="exactname" value="1" />
                    <input type="hidden" name="s" value="$session[sessionhash]" />
                    <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
                    <input type="text" class="bginput" name="query" size="25" tabindex="1001" />
                    <input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" />

                </form>
So, after the opening tag <form ХХХ> add bottom:

HTML Code:
                    <div id="lsa_window">
Before the closing tag </form> add:

HTML Code:
                    </div>
We have prepared the search form to pop-up window. Now we need to bind to the field of javascript.
For this in tag <input type="text" /> add id="lsa_input"
As a result, you should get some of this code:

HTML Code:
				<form action="search.php?do=process" method="post">
					<div id="lsa_window">
					<input type="hidden" name="do" value="process" />
					<input type="hidden" name="quicksearch" value="1" />
					<input type="hidden" name="childforums" value="1" />
					<input type="hidden" name="exactname" value="1" />
					<input type="hidden" name="s" value="$session[sessionhash]" />
					<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
					<input type="text" id="lsa_input" class="bginput" name="query" size="25" tabindex="1001" />
					<input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" />
					</div>
				</form>
P.S. If you already have id in your search field and its change may be possible to reset the anchor CSS, do the following.
Open the template lsa_script and edit the line

var lsa = new AJAX_LiveSearch_Prepare("lsa", "lsa_input", "lsa_window");

where the arguments of the class:
lsa - variable name initialize class js
lsa_input - search field id
lsa_window - pop-up window id

Thus, changing the arguments of the class AJAX_LiveSearch_Prepare, you can not edit the search field.

Live DEMO: http://mixplay.ru/ (user: test, pass: 123456)
Live video: http://www.youtube.com/watch?v=t_16fk5VGYw

PS Some function writed by ChangUonDyU

If you like this mod - Click Install it

Download Now

File Type: zip [AJAX] Live Search 2.2.3 Eng.zip (7.3 KB, 305 views)
File Type: zip [AJAX] Live Search 2.3.1 Eng.zip (7.6 KB, 366 views)
File Type: zip [YUI] Live Search v3.0.2 En.zip (9.6 KB, 896 views)

Screenshots

File Type: jpg lsa_set_eng.jpg (110.2 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #232  
Old 06-14-2009, 06:51 PM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<div style="position: absolute; top: 100px; right: 50px;"><input ... /></div>
Reply With Quote
  #233  
Old 06-14-2009, 06:58 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That positioned the input box.

What I want is the results box below the navbar instead of a pop up window.
Reply With Quote
  #234  
Old 06-14-2009, 06:59 PM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dancue View Post
And how do I add this:
For that you need add this html
HTML Code:
<form name="ajaxsearch" method="post" action="search.php?do=process">
					<div id="tb-searchdiv"><div id="lsa_window">
						<div id="tb-searchbox"><input type="text" onmouseup="lsado();" onkeyup="lsado();" onblur="if(this.value==''){this.value='Живой поиск'};" onfocus="lsaclick();" value="Живой поиск" maxlength="$vboptions[lsa_maxsym]" tabindex="1001" name="query" id="lsa_input"/></div>
						<input type="hidden" value="process" name="do"/>
						<input type="hidden" value="1" name="quicksearch"/>
						<input type="hidden" value="1" name="childforums"/>
						<input type="hidden" value="1" name="exactname"/>
						<input type="hidden" value="" name="s"/>
	<input type="hidden" value="1245007919-d667b9a87020ead7dc88ef667e4022229b0e8b4b" name="securitytoken"/>
					</div>
<script type="text/javascript"> vbmenu_register("lsa_window",1); </script>
					</div>
					</form>
and this css
HTML Code:
#tb-searchdiv{float:right;padding: 3px 8px 0 0;text-align:center;line-height:13px;cursor:default}
#tb-searchbox{padding:4px 11px 11px 22px;width:119px;background:url(images/aria/misc/toolbar_searchbox.png) no-repeat;text-align:left;height:14px}
#tb-searchbox input{border:0;padding:0;width:119px;background:#fff;color:#000;font:12px/12px 'Lucida Grande',Verdana,sans-serif;height:14px;outline:none;cursor:text}
PS from source of my site.
Reply With Quote
  #235  
Old 06-14-2009, 07:05 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mad@Max View Post
For that you need add this html
HTML Code:
<form name="ajaxsearch" method="post" action="search.php?do=process">
					<div id="tb-searchdiv"><div id="lsa_window">
						<div id="tb-searchbox"><input type="text" onmouseup="lsado();" onkeyup="lsado();" onblur="if(this.value==''){this.value='Живой поиск'};" onfocus="lsaclick();" value="Живой поиск" maxlength="$vboptions[lsa_maxsym]" tabindex="1001" name="query" id="lsa_input"/></div>
						<input type="hidden" value="process" name="do"/>
						<input type="hidden" value="1" name="quicksearch"/>
						<input type="hidden" value="1" name="childforums"/>
						<input type="hidden" value="1" name="exactname"/>
						<input type="hidden" value="" name="s"/>
	<input type="hidden" value="1245007919-d667b9a87020ead7dc88ef667e4022229b0e8b4b" name="securitytoken"/>
					</div>
<script type="text/javascript"> vbmenu_register("lsa_window",1); </script>
					</div>
					</form>
and this css
HTML Code:
#tb-searchdiv{float:right;padding: 3px 8px 0 0;text-align:center;line-height:13px;cursor:default}
#tb-searchbox{padding:4px 11px 11px 22px;width:119px;background:url(images/aria/misc/toolbar_searchbox.png) no-repeat;text-align:left;height:14px}
#tb-searchbox input{border:0;padding:0;width:119px;background:#fff;color:#000;font:12px/12px 'Lucida Grande',Verdana,sans-serif;height:14px;outline:none;cursor:text}
PS from source of my site.
So that html is replacing the lsa_form template?
Reply With Quote
  #236  
Old 06-14-2009, 07:08 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and do I have to replace this:
Живой поиск

with what?
Reply With Quote
  #237  
Old 06-14-2009, 07:12 PM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not exactly. This a free piece of html, you can put it everywhere. This is a source
HTML Code:
<!-- SearchBox -->
					<form action="search.php?do=process" method="post" name="ajaxsearch">
					<div id="tb-searchdiv"><div id="lsa_window">
						<div id="tb-searchbox"><input type="text" $lsainput /></div>
						<input type="hidden" name="do" value="process" />
						<input type="hidden" name="quicksearch" value="1" />
						<input type="hidden" name="childforums" value="1" />
						<input type="hidden" name="exactname" value="1" />
						<input type="hidden" name="s" value="$session[sessionhash]" />
	<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
					</div>
<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"><script type="text/javascript"> vbmenu_register("lsa_window",1); </script></if>
					</div>
					</form>
<!-- /SearchBox --> 
Reply With Quote
  #238  
Old 06-14-2009, 07:14 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mad@Max View Post
Not exactly. This a free piece of html, you can put it everywhere. This is a source
HTML Code:
<!-- SearchBox -->
					<form action="search.php?do=process" method="post" name="ajaxsearch">
					<div id="tb-searchdiv"><div id="lsa_window">
						<div id="tb-searchbox"><input type="text" $lsainput /></div>
						<input type="hidden" name="do" value="process" />
						<input type="hidden" name="quicksearch" value="1" />
						<input type="hidden" name="childforums" value="1" />
						<input type="hidden" name="exactname" value="1" />
						<input type="hidden" name="s" value="$session[sessionhash]" />
	<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
					</div>
<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"><script type="text/javascript"> vbmenu_register("lsa_window",1); </script></if>
					</div>
					</form>
<!-- /SearchBox --> 
but, if I stick that somewhere else it will create a second box.
Reply With Quote
  #239  
Old 06-14-2009, 07:18 PM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Of course You need disable search form.
Reply With Quote
  #240  
Old 06-14-2009, 07:36 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay. I don't think we are thinking about the same thing here.

I want this box:


To show up here below the navbar:


And I want to keep this here within my header:
Reply With Quote
  #241  
Old 06-14-2009, 08:07 PM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In terms of version 2.3.1 is in the template lsa_script to replace everything on the
HTML Code:
<script language="JavaScript" type="text/javascript"><!--
/**
 * [AJAX] Live Search
 * Version 2.3.1
 * @author mad@Max
 */
var lsatimeout;function lsado(){var k,p=fetch_object("search_results"),l=fetch_object("lsazone").value,n=fetch_object("lsasort").value,b=fetch_object("lsasorttype").value,g=fetch_object("lsawithword").value,a=fetch_object("lsatype"),f=(a)?a.value:"0",h="",m=fetch_object("lsa_input").value,q=new Array(),e=false,o=m.split(" ");for(k=0;k<o.length;k++){if(o[k].length>=$vboptions[lsa_minsym]){q.push(o[k]);e=true}else{e=false}}var j=q.join(" ");this.lsa_handleSuccess=function(i){if(i.responseText!==undefined){p.innerHTML=i.responseText}};this.lsa_handleFailure=function(i){if(i.responseText!==undefined){alert(i.responseText)}};this.lsa_callback={success:lsa_handleSuccess,failure:lsa_handleFailure};var d="ajax.php";if(f=="0"){h="&searchin="+l+"&sortby="+n}var c="do=lsa&securitytoken="+SECURITYTOKEN+"&lsatype="+f+h+"&sorttype="+b+"&withword="+g+"&keyword="+PHP.urlencode(j);if(e){clearTimeout(lsatimeout);p.innerHTML='<p align="center" class="smallfont"><img src="images/misc/progress.gif" />$vbphrase[lsa_searching]</p>';lsatimeout=setTimeout("lsasend();",$vboptions[lsa_interval])}else{if(m.length<$vboptions[lsa_minsym]){p.innerHTML='<phrase 1="$vboptions[lsa_minsym]" 2="$vboptions[lsa_maxsym]" 3="$vboptions[lsa_nresults]">$vbphrase[lsa_lengthword]</phrase>'}}this.lsa_req=null;this.lsasend=function(){this.lsa_req=YAHOO.util.Connect.asyncRequest("POST",d,lsa_callback,c)}}function lsaclick(){fetch_object("lsa_input").value="";fetch_object("lsa_window").style.display = 'block';lsado();}
//--></script>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:18 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12054 seconds
  • Memory Usage 2,388KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (11)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete