vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - [YUI] Live Search (https://vborg.vbsupport.ru/showthread.php?t=204517)

mad@Max 02-06-2009 10:00 PM

[YUI] Live Search
 
1 Attachment(s)
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:)

Daniel_HBK 02-07-2009 01:47 AM

Great Hack ,

thanks

NAZIA 02-07-2009 02:34 AM

thanks good work.. I will do it soon.. ASAP

vietfancy 02-07-2009 02:40 AM

can you do the same as: http://www.thienduongnhac.com/forum/index.php where the results appear below navbar instead of a popup?

lazydesis 02-07-2009 03:07 AM

awesome hack .. does this add any queries or slow down the server in any way ..

ajax :eek:

smirkley 02-07-2009 03:34 AM

Let me know when this works with the standard search in navbar, I would love that.

At the moment, I get some kinda browser error when I try to install it into navbar vb search.

It does work well though if I have a standalone live search below navbar.

Hornstar 02-07-2009 04:14 AM

hopefully vb4 will take something like this on and improve upon it.

rn-nr.com 02-07-2009 04:47 AM

thanks ,
very nice ,

groupak 02-07-2009 05:25 AM

thanks :)

mad@Max 02-07-2009 09:38 AM

vietfancy, this is not hard, but i think that disappearing window is better:)
lazyindian, i have installed this hack on 2 and more forums and no one went to work slowly and do not get down. In any case, you can disable it work for certain groups in settings
smirkley, i will try but not promise:)
hornstar1337, i too:)


All times are GMT. The time now is 11:25 PM.

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.01314 seconds
  • Memory Usage 1,750KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete