View Full Version : Add-On Releases - [YUI] Live Search
mad@Max
02-06-2009, 10:00 PM
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:
<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:
<div id="lsa_window">Before the closing tag </form> add:
</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:
<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:)
relaxiha
02-07-2009, 03:07 PM
hello
i think have problem with UTF-8 (arabic & persian)
because after type word in box show no result
mad@Max
02-07-2009, 03:33 PM
Try comment string in plugin Live Search AJAX
// $query = iconv('UTF-8', $stylevar['charset'], $query);
relaxiha
02-07-2009, 04:04 PM
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$query = iconv('UTF-8', $stylevar['charset'], $query)' at line 1
relaxiha
02-07-2009, 04:06 PM
hello i run query : // $query = iconv('UTF-8', $stylevar['charset'], $query);
plz little more info for this query !
ptwiggens
02-07-2009, 04:23 PM
Yeah,
This is cool, but having 2 search fields is lame. Is there not a way to just replace the regular search field in the navbar with this?
relaxiha
02-07-2009, 04:57 PM
yes i think again update previous was better
DjEddie
02-07-2009, 04:59 PM
Thanks for this mod.... it installs fine..
Just no results show up when a search is entered... keeps on with the loading but nothing appears... any ideas?
mad@Max
02-07-2009, 06:56 PM
relaxiha, open plugin Live Search AJAX and then find this string and comment it:
// $query = iconv('UTF-8', $stylevar['charset'], $query);
Who have problem, please, write your charset.
relaxiha
02-07-2009, 07:26 PM
hello
my charset is UTF-8 !!!
unknow change this!
plz say better information to me!
// $query = iconv('????', $stylevar['charset'], $query);
you say i change ??? to XXX ?
or no!
mad@Max
02-07-2009, 07:52 PM
// mean that string makes comment.
I not saying change utf-8. What collocation your db?
AcidX
02-07-2009, 08:36 PM
Why doesn't the mod actually look like the one in the demo?
Do we need to customize the look ourselves?
mad@Max
02-07-2009, 08:58 PM
What look do you mean?
AcidX
02-07-2009, 09:04 PM
What look do you mean?
The Live Search field... It should look like: https://vborg.vbsupport.ru/external/2009/02/78.png
But when I add "$lsaform", a very simple search form shows up... Shouldn't it come with some style, background image or something? :)
DjEddie
02-07-2009, 09:31 PM
Thanks for this mod.... it installs fine..
Just no results show up when a search is entered... keeps on with the loading but nothing appears... any ideas?
Hi, u have any ideas on my problem above?
Thanks :)
mad@Max
02-07-2009, 10:17 PM
AcidX, this is css:) Hm, mb in next version i add this.
DjEddie, so, what your charset and collocation?:)
relaxiha
02-08-2009, 01:08 AM
i have problem again with LANg Persian and no result search//
i put // $query = iconv('UTF-8', $stylevar['charset'], $query);
mad@Max
02-09-2009, 01:01 PM
Version 2.0.1
Fixed work with non english language:)
relaxiha
02-09-2009, 11:29 PM
Hello
i have problem yet!
in CP live chat :
Search in your own forums
Separate each option with a new-line. Separate title and forumids with |. Separate forum ids with commas
example:
Oder1 title|1,2,5
Oder2 title|21,15,7
Oder3 title|14
���������1|1,2,5
���������2|21,15,7
���������3|14
true LANG
mad@Max
02-10-2009, 12:05 AM
I just forgot translate this setting. Reuploaded.
rapidphim
02-13-2009, 05:21 AM
Can someone please show/guide how to put the search field on the navbar with this http://mixplay.ru/images/as4/global/toolbar_searchbox.png? Thanks.
Also, how can we make it searching with UTF language?
Also, how can we make it search throughout the entire board?
Also, will this hack search or work for blog?
mad@Max
02-13-2009, 06:19 AM
About search field:
CSS:
#tb-searchdiv{float:right;padding:8px 5px 0 0;text-align:center;line-height:13px;cursor:default}#tb-searchdiv a{color:#000;font-size:11px;text-decoration:none;cursor:pointer}#tb-searchbox{padding:4px 11px 11px 22px;width:119px;background:url(images/as4/global/toolbar_searchbox.png) no-repeat;text-align:left;height:14px}#tb-searchbox input{border:0;padding:0;width:119px;background:#f ff;color:#000;font:12px/12px 'Lucida Grande',Verdana,sans-serif;height:14px;outline:none;cursor:text}
<div id="tb-searchdiv"><div id="lsa_window">
<div id="tb-searchbox"><input type="text" id="lsa_input" name="query" tabindex="1001" maxlength="$vboptions[lsa_maxsym]" value="$vbphrase[live_search]" onfocus="if(this.value=='$vbphrase[live_search]' || document.getElementById('lsa_window_menu').style.d isplay == 'none'){this.value=''};<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"> showHint();</if>" onblur="if (this.value==''){this.value='$vbphrase[live_search]'}"<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"> onkeyup="showHint();</if>"/></div>
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"><script type="text/javascript"> vbmenu_register("lsa_window",1); </script></if></div>
<a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a>
<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]" />
</div>
</form>
You have a problem with UTF language?
Search work throughout board.
What do you mean about blog?
mad@Max
02-13-2009, 03:46 PM
Updated video work of mod. http://www.youtube.com/watch?v=4w6AankLJkY :)
rapidphim
02-13-2009, 04:45 PM
Thanks Max for the guiding. However, I am trying to understand:
1/ where to put the HTML code? The CSS part, I assume, I need to put to the bottom of the CSS section.
2/ When I tried the Search from the Search drop down function, with few words that I recently posted, it did not come up.
3/ About blog, does this hack also work for searching in Blog? When I tried to do a blog search from Search drop down function, it's not working... or did I do something not right?
Theater
02-13-2009, 07:57 PM
Updated video work of mod. http://www.youtube.com/watch?v=4w6AankLJkY :)
Might want to double-check that video URL... :p
mad@Max
02-13-2009, 08:00 PM
lol !!!!!! Sorry))))))))))))))))))))))))))))))))
Here that video http://www.youtube.com/watch?v=t_16fk5VGYw
rapidphim
02-13-2009, 08:32 PM
I watched video but have no clue on how to add the Search field on the navbar... any hints? Thanks and sorry for stupidity!
mad@Max
02-13-2009, 08:59 PM
Do following. In template navbar find:
<td class="alt2" nowrap="nowrap">
<div class="smallfont">
<strong><phrase 1="$bbuserinfo[username]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase></strong><br />
add above
<td class="alt1" align="center" nowrap="nowrap">
$lsaform
</td>
rapidphim
02-13-2009, 10:16 PM
that did the job. however, I am finding difficulty to make it show this toolbar_searchbox.png. I did change the image path, uploaded the image, add CSS and nothing work.
Did I miss the HTML part? If so, where to I place those HTML codes? Thanks so much!
mad@Max
02-13-2009, 11:14 PM
In next version i myself add this as feature.
rapidphim
02-14-2009, 01:07 AM
Thanks Max... so, right now, I just have to wait for your next version? Can you manual guide me to put it on?
Can you also make it search result for Blog too? or at least make it an option for admin to decide?
Firestar.chkn
02-16-2009, 10:03 AM
Mine doesn't give a pop up when I click on the search box. Is there a problem? I didn't do any of the edits, and only did the navbar edit to get it to show above my nav bar. Obviously, I also imported the product. I get the results when I type something in, and press enter, but that's just like the normal search.
Also, is there no way to just replace the default search box from the search drop down menu with this search box, assuming it works, of course?
mad@Max
02-16-2009, 01:51 PM
Were can i look on problem?
Firestar.chkn
02-16-2009, 05:51 PM
<a href="http://forums.prophecy.co.za" target="_blank">http://forums.prophecy.co.za</a>
Enabling access for unregistered/guests in 1 minute.
EDIT:
Hmmm, this is weird. When I log in with my test user, it works, but not with my admin account. I can see the field with both, but only on the test user does the popup appear. Let me not waste your time. I'll see what I can figure out and then get back to you, if there's still a problem. Thanks for the help any ways!
Firestar.chkn
02-16-2009, 05:59 PM
Ok, now something is funny...
I have a thread called "Problems with my hands..."
Now, if I use the search, and I type in
problems
... I get too many results
If I type in "problems with my"
then I get the thread as a result.
However, if I type in
"Hands problems" then I get no results.
"Problem hands" also gives no results.
Is the search case sensitive, or does it search for strings only or does it make use of a contains clause?
mad@Max
02-16-2009, 06:00 PM
Maybe you wrong set usergroup permission in hack setting?
Search work only by one word.
Firestar.chkn
02-16-2009, 06:02 PM
Yea, for some reason it works fine now, except for the problem described in my post #44 above.
Firestar.chkn
02-16-2009, 06:13 PM
Ok, only works on one word. Thanks, I somehow missed that part.
Are there any plans to increase this to multiple words?
mad@Max
02-16-2009, 06:26 PM
Yes, i'll plan, but it isn't easy:)
RobbieZ
02-19-2009, 02:52 PM
This is my open field search.
<div class="qsandlogin">
<h4>Quick Search</h4>
<form id="searchbox_008514742519005312674:stktp-0amaq" action="search.php" method="get">
<input type="hidden" name="cx" value="008514742519005312674:stktp-0amaq" />
<input type="hidden" name="cof" value="FORID:9" />
<div class="searchfield"><input name="q" type="text" class="search-quick" value="" /><input name="do" value="process" type="hidden" /></div>
<div class="searchfield"><input name="showposts" value="0" type="hidden" />
<input name="s" value="" type="hidden" /><input src="images/royalflush/misc/gosearch.gif" type="image" /></div>
</form>
<a href="search.php">Go Advanced</a>
</div>
any ideas how to insert live search into here?
mad@Max
02-19-2009, 03:53 PM
<div class="qsandlogin">
<h4>Quick Search</h4>
<form id="searchbox_008514742519005312674:stktp-0amaq" action="search.php" method="get">
<div id="lsa_window">
<input type="hidden" name="cx" value="008514742519005312674:stktp-0amaq" />
<input type="hidden" name="cof" value="FORID:9" />
<div class="searchfield"><input name="q" type="text" class="search-quick" id="lsa_input" maxlength="$vboptions[lsa_maxsym]" value="$vbphrase[live_search]" onfocus="if(this.value=='$vbphrase[live_search]'){this.value=''};<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"> showHint();</if>" onblur="if (this.value==''){this.value='$vbphrase[live_search]'}"<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"> onkeyup="showHint();</if> /><input name="do" value="process" type="hidden" /></div>
<div class="searchfield"><input name="showposts" value="0" type="hidden" />
<input name="s" value="" type="hidden" /><input src="images/royalflush/misc/gosearch.gif" type="image" /></div>
</div>
<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"><script type="text/javascript"> vbmenu_register("lsa_window",1); </script></if>
</form>
<a href="search.php">Go Advanced</a>
</div>
RobbieZ
02-19-2009, 04:01 PM
Thanks Maxim :D
rapidphim
02-20-2009, 03:22 AM
Max.... I'm not sure if you are able to help me with this but I still have problem with Vietnamese language.
Example: when I typed "những", it returned no result. However, when I type "nhung" it somehow shown "những, nhung,...." on the result box. Is there away to make it search with Vietnamese language?
Thanks.
almohd
02-20-2009, 03:42 AM
Wonderful
Thank you
rapidphim
02-20-2009, 03:56 PM
hello Max,
Would you please kindly show me how to place the search field on the upper right corner of the header instead of the navbar? Thanks.
mad@Max
02-20-2009, 05:27 PM
By forces css :)
rapidphim
02-20-2009, 05:57 PM
would you kindly be more specific?
mad@Max
02-20-2009, 06:20 PM
You may look on source in demo site.
rapidphim
02-21-2009, 12:11 AM
thanks Max... finally I got it to work the way I wanted it. However, I still have couple small challenges that I still need your expertise on.
1/ How to make the search result include information in vbulletin blog?
2/ Where do I go to look for this since 3.8.x version does not include .js file.
url=url+"?query="+word
star88
02-25-2009, 12:05 PM
Geat hack, thank you mad@Max ! * Installed * :)
Just a problem for me: if I do a search with a word with french accents (?, ?, ?...) for example: " s?n?gal " the live search returns No Results.
The same search without french accents " senegal" works.
Do you have an idea to fix the problem ?
rapidphim
02-26-2009, 02:01 AM
I do have the same problem with Star88. Words as "những" return no result and also, the result does not pick up information in blog
fukdawrld
02-26-2009, 09:50 PM
This is great hack but no search results show for me. It just continues to load only after i click off somewhere else on the page and then click back into the box.
mad@Max
02-26-2009, 10:27 PM
For those who get result "no results" try comment or delete this string in plugin Live Search AJAX $query = iconv('UTF-8', $stylevar['charset'], $query);
star88
02-26-2009, 11:16 PM
For those who get result "no results" try comment or delete this string in plugin Live Search AJAX $query = iconv('UTF-8', $stylevar['charset'], $query);
Thanks for your support. I deleted the line. But it returned "no results" again.
rapidphim
02-27-2009, 02:37 AM
I wonder where to find that string on Live Search Ajax? under lsa_script template?
star88
02-27-2009, 12:27 PM
I wonder where to find that string on Live Search Ajax? under lsa_script template?
check the line 189.
Switch02
02-27-2009, 03:32 PM
Thanks very nice ;)
fukdawrld
02-27-2009, 04:22 PM
For those who get result "no results" try comment or delete this string in plugin Live Search AJAX $query = iconv('UTF-8', $stylevar['charset'], $query);
Same for me..I still have to click off the box and and back in for it to even work..then it pulls up no results
carcomp
03-01-2009, 04:34 AM
Here is a small change I made to this mod. It is still ajax, but instead of popping open a box, it just kind "adds" to your screen. Its hard to explain. You'll just have to check it out.
The search bar is in the navbar.
http://www.quad4forums.com
mad@Max
03-01-2009, 07:35 AM
How i can look on it?
star88
03-02-2009, 12:09 AM
Unfortunately it doesn't work with non-english characters.
rapidphim
03-02-2009, 04:28 AM
we are all aware and been waiting patiently for a fix :-)
kmohamed
03-02-2009, 04:48 AM
this is really great i luv it
like any great mod need little more imprivment but i think is great work
thanx installed
lowey
03-02-2009, 01:36 PM
Absolutely fantastic mod, thank's a lot! :)
The only - very minor - issue that I have is, that some users have to double click on the search form to bring up the popup. It seems, this is only the case when using Firefox or Safari. Maybe someone got an idea on how to fix that?
Keep up the great work!
rapidphim
03-06-2009, 01:26 AM
what will be the padding for the toolbar_searchbox.png to show on the left hand side intead of the right ?
dancue
03-10-2009, 04:30 AM
If you already have opened search field, do following.
Can someone explain what this means?
fukdawrld
03-10-2009, 08:21 AM
No luck on results not showing and having to click off the search box issue?
mad@Max
03-10-2009, 08:05 PM
Not showing search box?
fukdawrld
03-10-2009, 09:36 PM
Yes my results don't show..only the black box...And for the black box to pop up I have to click off the search box and back onto it.
mad@Max
03-10-2009, 09:45 PM
I do not fully understand the issues:)
Can you post your site?
fukdawrld
03-11-2009, 09:25 AM
I do not fully understand the issues:)
Can you post your site?
PM SENT
mad@Max
03-11-2009, 11:38 AM
Version 2.0.2
Rewritten some functions.
fukdawrld
03-11-2009, 05:01 PM
Thank you for the update! It pulls up results now. It still has the issue where you have to click outside the box in order for it to search for the results. If you don't it just has a blank box with no results. Also on my board it doesn't work at all in IE.
Thanks again for the update.
star88
03-14-2009, 08:35 AM
Thanks Max for the update but it still doesn't work with non-english characters searches.
I didn't find the issue
mad@Max
03-14-2009, 11:36 AM
I searching decision of this issue.
thanhcavn
03-14-2009, 06:21 PM
Not work in IE (popup result does not display)
keeptry
03-15-2009, 05:57 PM
great hack but it has a wrong position -.-"... can someone help?http://img5.imageshack.us/img5/5933/98021795.jpg
maidos
03-17-2009, 12:26 PM
i got a issue, i have quick search but when i add your code it will then have 2 search box needhelp. Wish to use the template default search bar so need help
also is it also possible the search starts instantly when u type more than x words
im unableto move the search window because on vbulletion option you only grant us to change the height and width but not allowing to move the top
<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="" />
<input type="hidden" name="securitytoken" value="guest" />
<div class="searchBoxInput">
<input type="text" class="searchinput" name="query" value="Search Forum" onfocus="if (this.value == 'Search Forum') this.value = '';" onblur="if (this.value == '') this.value = 'Search Forum';" />
mad@Max
03-18-2009, 04:56 PM
If you wanna use moveable window, you can use old version of hack:) I still not plan moveable window.
maidos
03-18-2009, 10:14 PM
well thing is i dont have the older version anymore and the result window is in mess aswell it displays over the search field. so hope u reconsider to make the window moveable again oratleast tell me where in template i can move the window
couldyouhelp me how to integrate your live search on the code i posted while keeping the default search bar? i prefer my templates search bar
mad@Max
03-20-2009, 01:43 PM
If you talk about default dropdown search, integration not easy...
The install guid is not clear.
I wont to display on nav bar...before was ok 3 letters and i saw results 4th and new results now dont works..
If i dont click search in advance doesnt search automaticaly also to display the box i have to click out..
This is my code
<form action="search.php?do=process" method="post">
<div id="lsa_window">
<div id="tb-searchbox"><b>Live Search: </b> <input type="text" class="bginput" name="query" tabindex="1001" id="lsa_input" maxlength="$vboptions[lsa_maxsym]" value="$vbphrase[live_search]" onfocus="if(this.value=='$vbphrase[live_search]'){this.value=''};<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"> showHint();</if>" onblur="if (this.value==''){this.value='$vbphrase[live_search]'}"<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"> onkeyup="showHint();</if> />
onfocus="if(this.value=='$vbphrase[search_forums]')this.value='';" onblur="if(this.value=='$vbphrase[search_forums]')this.value='';" onkeyup="showHint(this.value)" /></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>
</form>
EDIT
AFTER SOME EDITS TO YOUR CODE AT FORM TEMPLATE NOW WORKS GOOD AND NOT NEED CLICKOUTSIDE OF WINDOW TO OPEN THE SEARCH ALSO NOW WORK WITH3-4-5-6-7 LETTERS AND MAKE NEW SEARCH EVERYTIME THAT YOU WRITE SOMETHINK
i just add to my navbar $lsaform and activated from settings
BYT STILL CANT SEARCH WITH GREEK (NO RESUTLS)
MySQL charset: UTF-8 Unicode (utf8)
Tables latin1_swedish_ci
I fount out why some people need to click 2 times to open search box.
Is this Live search on the box..
If you remove it no more 2 clicks.
How to remove (Simple way)
Go to your language and search for Live Search (at results select this from GLOBAL live_search)
Click edit and at the boxes bellow with your languages just click a SPACE no let it empty..Just one space.)
mad@Max
03-22-2009, 01:40 PM
Version 2.0.3
Fixed some bugs with search field.
Updated instruction.
Updated
(you have remove the text from box right?)
Still no results a non english
FiMeTi
03-22-2009, 05:44 PM
Nice Addon. Good job. :)
mad@Max
03-22-2009, 08:34 PM
rmxs, no, i'm not removing, just rewrote some html and js things.
rmxs, no, i'm not removing, just rewrote some html and js things.
oh yes i ynistall and install and dont replace my changes :|
at my template i have add just the code
$lsaform
is that correct?
For me works good (except non eglish)
My db is UTF-8 byt tables are latin1_swedish_ci
maybe this is the problem with non english..
is possible to change tables collation or can we do it from code?
mad@Max
03-22-2009, 10:04 PM
Yes, thats it:)
fukdawrld
03-22-2009, 11:03 PM
Ok this release fixed the double click issue but I still have to click outside the box and back on it for the results to show up in Firefox and opera. Still doesn't work in IE at all on my board.
mad@Max
03-23-2009, 01:32 AM
This is intended:) On my forums search work on all browsers.
star88
03-24-2009, 07:59 AM
Thanks Max for this update
unfortunatly, because non-english characters don't return any result I can't use this great mod on my site.
Yes max must fix this error (old version was ok :( )
mad@Max
03-24-2009, 10:47 AM
With which the old version of hack it work?
fukdawrld
03-24-2009, 11:04 AM
This is intended:) On my forums search work on all browsers.
You mean its intended to have to click outside the box to pull up results?
Works with version 1.3
with ajax_search.php
here is the content of this file
<?php
/*
Live Search v1.3
Writed by: coderphp (https://vborg.vbsupport.ru/member.php?u=174485)
Modify by: mad@Max (https://vborg.vbsupport.ru/member.php?u=209608)
*/
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'ajax_search');
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array('global');
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
function utf8_to_win($string){
for ($c=0;$c<strlen($string);$c++){
$i=ord($string[$c]);
if ($i <= 127) @$out .= $string[$c];
if (@$byte2){
$new_c2=($c1&3)*64+($i&63);
$new_c1=($c1>>2)&5;
$new_i=$new_c1*256+$new_c2;
if ($new_i==1025){
$out_i=168;
} else {
if ($new_i==1105){
$out_i=184;
} else {
$out_i=$new_i-848;
}
}
@$out .= chr($out_i);
$byte2 = false;
}
if (($i>>5)==6) {
$c1 = $i;
$byte2 = true;
}
}
return $out;
}
$query = addslashes(trim($_GET['query']));
// if you use cp1251 collation your tables, uncomment below strings
//if (is_browser('opera')){
// $query = utf8_to_win ($query);
//}
if($query AND $_SERVER['HTTP_REFERER'])
{
foreach ($vbulletin->userinfo['forumpermissions'] AS $forumid => $fperms)
{
if (!($fperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($fperms & $vbulletin->bf_ugp_forumpermissions['cansearch']) OR !verify_forum_password($forumid, $forum['password'], false) OR !($vbulletin->forumcache["$forumid"]['options'] & $vbulletin->bf_misc_forumoptions['indexposts']))
{
$excludelist .= ",$forumid";
}
else if ((!$vbulletin->GPC['titleonly'] OR $vbulletin->GPC['showposts']) AND !($fperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
{ // exclude forums that have canview but no canviewthreads if this is a post search
$excludelist .= ",$forumid";
}
}
$results = $db->query_read("SELECT * FROM ". TABLE_PREFIX ."thread WHERE `title` LIKE '%$query%' AND `". TABLE_PREFIX ."thread`.`forumid` NOT IN (0 $excludelist) LIMIT 50");
if ($db->num_rows($results)> 0)
{
while($result = $db->fetch_array($results))
{
$trimtitle = 45;
$lsfid = $result['forumid'];
$lsttitle = $result['title'];
$lsalt = $lsttitle;
if ($trimtitle > 0 && strlen($lsttitle) > $trimtitle)
{ $lsttitle = fetch_trimmed_title($lsttitle, $trimtitle); }
$lsttitle = preg_replace('/\<[a-zA-Z0-9 \<\<\>\>\:\;\"\'\,\.\?\/\~\`\!\@\#\$\%\^\&\*\(\)\_\-\+\=]*\>/', '', $lsttitle);
// $lsttitle = preg_replace("#(".$query.")#si", "<span style=\"color: #ff0000; font-weight: bold;\">\\1</span>", $lsttitle);
$lsttitle = preg_replace("#(".$query.")#si", "<span class=\"highlight\">\\1</span>", $lsttitle);
$lstid = $result['threadid'];
$lsftitle = $db->query_first("SELECT title FROM ". TABLE_PREFIX ."forum WHERE forumid = $lsfid LIMIT 1");
$lsfname = $lsftitle['title'];
echo "<div style=\"float:left;\"><a href=\"".$vboptions[bburl]."/Vb/showthread.php?t=".$lstid."\" title=\"".$lsalt."\">".$lsttitle."</a></div><div style=\"float:right;\"><a href=\"".$vboptions[bburl]."/Vb/forumdisplay.php?f=".$lsfid."\"><font color=\"#666666\">".$lsfname."</font></a></div><br />";
}
}else{
echo "<div align=\"center\">" . $vbphrase[ls_no_results] . "</div>";
}
}
?>
I dont have the product and i have unistall it from vb to install this one.
i think here is the tip...
function utf8_to_win($string){
for ($c=0;$c<strlen($string);$c++){
$i=ord($string[$c]);
.............................
mad@Max
03-24-2009, 02:26 PM
This function convert utf to windows-1251(cp1251)...
This function convert utf to windows-1251(cp1251)...
Yes i know byt with the old work with non english and with new no. :|
you have try to include this on new version?
mad@Max
03-24-2009, 08:11 PM
Version 2.0.4
Previously was a problem that, if after a certain time to begin a search, it will not bring any results. Now the problem is solved (i hope) by using $vbulletin->GPC.
mad@Max
03-24-2009, 08:19 PM
rmxs, i can, but I do not know if this will work for all. But you can do this for yourself:
Replace this
if (function_exists('iconv'))
{
$query = @iconv('UTF-8', $stylevar['charset'], $query);
}else
{
$query = $query;
}
With
function utf8_to_win($string)
{
for ($c = 0; $c < strlen($string); $c++)
{
$i = ord($string[$c]);
if ($i <= 127)
@$out .= $string[$c];
if (@$byte2)
{
$new_c2 = ($c1 & 3) * 64 + ($i & 63);
$new_c1 = ($c1 >> 2) & 5;
$new_i = $new_c1 * 256 + $new_c2;
if ($new_i == 1025)
{
$out_i = 168;
} else
{
if ($new_i == 1105)
{
$out_i = 184;
} else
{
$out_i = $new_i - 848;
}
}
@$out .= chr($out_i);
$byte2 = false;
}
if (($i >> 5) == 6)
{
$c1 = $i;
$byte2 = true;
}
}
return $out;
}
$query = utf8_to_win($query);
Now this version works without any change :)
mad@Max
03-24-2009, 08:57 PM
I'm happy:)
star88
03-25-2009, 07:57 AM
Great ! Now it works like a charm with french accents. Thank you Max :)
mad@Max
03-25-2009, 10:11 AM
In the next version i will try to make the search for individual words.
Hello max :)
You have make good work..
I wont to see from you also somethink like similar thead check..
Check for similar thread before posting a new one (https://vborg.vbsupport.ru/showthread.php?t=201651)
Its not too clean and conflict with many mods.
I think with this mod with some improvments you can tranform it to similar thread check :)
mad@Max
03-25-2009, 06:30 PM
I do not fully understand what you are saying:)
mad@Max
03-25-2009, 08:51 PM
No, thanks:) I already wrote a search for individual words. Wait a new version...
mad@Max
03-25-2009, 09:56 PM
Version 2.1
Finally i wrote search by individual words!
dvbusuario
03-26-2009, 03:05 AM
With Version 1.6 No show results, but yes shows the popup window
96985
And with the new version 2.1 no show anything of the popup window
How can I fix this?
Thank you!
Stoebi
03-26-2009, 06:25 AM
Can't get it to work also. No Popup in IE7/IE8 (navbar or $lsaform) :(
vBulletin 3.8.1pl1 (using Standard-Style without any edits (only navbar ;))).
PHP: 5.2.6
MySQL Version: 5.0.67-community (Charset: UTF-8 Unicode (utf8))
This is the only change i did in template navbar:
<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]" />
<div>
<input type="text" class="bginput" size="25" id="lsa_input" name="query" tabindex="1001" maxlength="$vboptions[lsa_maxsym]" value="$vbphrase[live_search]" <if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))">onfocus="vbmenu_register('lsa_window',1); if(this.value=='$vbphrase[live_search]'){this.value=''}; showHint();" onblur="this.value='$vbphrase[live_search]';" onkeyup="showHint();"<else />onfocus="if(this.value=='$vbphrase[live_search]'){this.value=''};" onblur="this.value='$vbphrase[live_search]';"</if> />
<input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" />
</div>
<div style="margin-top:$stylevar[cellpadding]px">
<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</div>
</div>
</form>With Firefox and Chrome the code in navbar is not working fine, because I've no chance to enter any word.
With $lsaform placed in header or FORUMHOME for example, your hack is working fine, but not with IE7/IE8 at the moment :(
Video: http://ioj.com/v/3pvf5
Regards, Stoebi
mad@Max
03-26-2009, 09:18 AM
dvbusuario, i need your site, for check the issue.
Stoebi, i'm not test live search with standard dropdown search.
Stoebi
03-26-2009, 10:03 AM
It is not needed, because you can check it for yourself ;)
With the Standard-Style and IE7/IE8 your hack is not working:
http://mixplay.ru/forum.php?styleid=1
With this style (Aqua-Soft v4) and IE7/IE8 your hack is fine working:
http://mixplay.ru/forum.php?styleid=4
Hm, but where are the differents?
Edit:
Okay, you have PM. Thanks for yout time :)
Regards, Stoebi
I have just add $lsaform with some html+css for style.
fukdawrld
03-26-2009, 12:46 PM
Mine also still shows no results in the pop up or IE with the new versions. :(
mad@Max
03-26-2009, 03:20 PM
Version 2.1.1
For those who want integrate Live Search into standard search form (drop-down menu), i made this feature via option.
Stoebi
03-26-2009, 04:26 PM
*ggg* mad@Max, live forum is 98% working fine with all styles. But i can't set up any options within the box. :(
$lsaform is not working with IE7/IE8 -> http://mixplay.ru/forum.php?styleid=1
On localhost it is not working with IE7/IE8, Chrome, FF, Opera and the Standard-Style, most of the time I'm using. But with the other styles, I've installed on localhost, hack is fine working. *lol*
It is not important, but do you have an idea, why?
And thank you very much again :)
Please fix the line 481 in product-lsearch_2.1.1 Eng.xml.
Replace </phrases> with
</phrasetype>
</phrases>
Regards,
Stoebi
mad@Max
03-26-2009, 04:51 PM
Reuploaded.
For me, hack fork fine on 4 different style.
mad@Max
03-26-2009, 06:28 PM
Version 2.1.2
Fixed some security issue. And now must work with all languages:)
(for people that upgrade and still dont work REVERT TEMPLATES :P )
relaxiha
03-27-2009, 02:56 AM
hello
does not work in forums.domain.com
and
Warning: preg_replace() [function.preg-replace]: Compilation failed: missing ) at offset 9 in [path]/ajax.php(69) : eval()'d code on line 2341 results for (70-270
mad@Max
03-27-2009, 08:55 AM
For every word?
relaxiha
03-27-2009, 10:58 AM
for sub domains and this : (70-270 search
fukdawrld
03-27-2009, 01:25 PM
If I just use the normal
$lsaform
It works fine...Below is how I have it coded to be in the spot where I'd like it to be. Do you know how I would get the varible about to show correctly in the code below? Seems like the <td> tags are getting it not to work properly for me.
<td class="alt1">
$lsaform
</td>
This is where the code above place it and where I would like it to stay:
https://vborg.vbsupport.ru/external/2009/03/4.png
relaxiha
03-27-2009, 01:35 PM
hello and thanks ..
but button hidden or removed!
itsheinz
03-27-2009, 03:36 PM
which search template should i edit?
mad@Max
03-27-2009, 04:48 PM
fukdawrld, in template navbar before:
<if condition="$show['member']">
<td class="alt2" nowrap="nowrap">
<div class="smallfont">
<strong><phrase 1="$bbuserinfo[username]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase></strong><br />
Add:
<td class="alt1" align="center" nowrap="nowrap">
$lsaform
</td>
fukdawrld
03-27-2009, 05:29 PM
Thanks Max but that didn't change me having to double click for it to bring up the box..Still no luck in IE either. How do I change the "live search" in the box?
itsheinz
03-27-2009, 05:36 PM
which template should il edit?
mad@Max
03-27-2009, 05:50 PM
Version 2.1.3
Added link on latest post in threat, added sort by forum. Code cleaning.
fukdawrld, edit phrase $vbphrase[live_search].
itsheinz, what do you mean?
itsheinz
03-27-2009, 05:56 PM
i already istalled th xml file and what to do next
what do you mean by this:
If you already have opened search field, do following.
and the code that you showed,where can i find
mad@Max
03-27-2009, 06:40 PM
Version 2.1.4
Double click in past:) Read instruction again.
itsheinz, just enable integration option.
Stoebi
03-27-2009, 07:07 PM
Hi
really good work, but there are 2 little problems with the both options menu (Together Words and Search Options), if box open.
Here is a demonstration video:
http://ioj.com/v/zud4t
Regards, Stoebi
powerful_rogue
03-27-2009, 07:50 PM
Just installed this.
On Firefox you have to double click and in IE it doesnt work. Ive carried out the edit shown in post 136
FOR ALL THIS THAT HAVE PROBLEM WITH DOUBLE CLICK ON SEARCH BOX..
Go to Language fount $vbphrase[live_search] (Live Search)Remove it and type single space (no leave it completly empty just 1 space hit)
Like this you remove the text from in the box and you dont need double click
mad@Max
03-27-2009, 08:52 PM
Version 2.1.5
Fixed bug in post #142.
powerful_rogue
03-27-2009, 09:03 PM
FOR ALL THIS THAT HAVE PROBLEM WITH DOUBLE CLICK ON SEARCH BOX..
Go to Language fount $vbphrase[live_search] (Live Search)Remove it and type single space (no leave it completly empty just 1 space hit)
Like this you remove the text from in the box and you dont need double click
Thank you. I read a previous post where you mentioned this. Its a shame really as it looks quite good with the words "Live Search" inside.
powerful_rogue
03-27-2009, 09:03 PM
Version 2.1.5
Fixed bug in post #142.
Any idea why its working in Firefox and not IE7?
mad@Max
03-27-2009, 09:09 PM
I have IE8, and with it worked fine.
powerful_rogue
03-27-2009, 09:11 PM
I have IE8, and with it worked fine.
Strange. No joy at all in IE7, looks like the chap in post 137 is having the same issue
For me works with firefox 3.x IE 7,8 pretty good so far :)
Max its the best and provide fast bug fixes.
Stoebi
03-27-2009, 09:29 PM
mad@Max
Thx a lot for fixing my issue :)
Regards, Stoebi
fukdawrld
03-27-2009, 09:32 PM
Thanks Max..The new version works great in IE.
powerful_rogue
03-28-2009, 08:28 AM
mad@max, do you think you could have a look at my board in IE if I send you the link?
mad@Max
03-28-2009, 08:50 AM
Yes, i could.
Dr. Bantham
03-28-2009, 11:21 AM
It appears that having both the search menu integration and the $lsaform option active at the same time confuses the former and negates the latter. Is there a way to make both options work concurrently?
mad@Max
03-28-2009, 05:32 PM
No, because they use one id "lsa_input".
drsli
03-28-2009, 05:51 PM
Awesome mod! Many thanks. :)
powerful_rogue
03-28-2009, 06:12 PM
Hi Max,
Saw you had a look, any news at all?
mad@Max
03-28-2009, 08:08 PM
powerful_rogue, yes, i think this is conflict with some hacks (whom you have a lot of:))
star88
03-29-2009, 01:22 PM
updated to last version.
now it works on IE 8 and firefox 3.0.8
dvbusuario
03-29-2009, 11:55 PM
dvbusuario, i need your site, for check the issue.
Stoebi, i'm not test live search with standard dropdown search.
http://www.eldestrampe.net
Thank You!
mad@Max
03-30-2009, 12:43 PM
I don't have account.
starplatinum
03-31-2009, 11:22 PM
it search only the threads titles not the post content ?!
am i right ?
mad@Max
03-31-2009, 11:32 PM
Yes, you're right.
mad@Max
04-10-2009, 10:07 AM
Version 2.2
Rewritten piece of main code.
mad@Max
04-12-2009, 07:56 PM
Version 2.2.2
Add function:
* search only the specified length of each word
Finally i wrote this function by js and php at the same cut of words less than you specified in your preferences. That is, if you will, for example, enter "bat of the", then perform a search for "bat the", thus cut short the word "of". This script will "wait" until you enter the floor of the three characters.
RobbieZ
04-12-2009, 11:31 PM
Thanks Max
When it is performing the search your native lang. is displayed while this happens.
How would i change it to English please.
mad@Max
04-13-2009, 12:10 AM
I don't understand:) What problem with lang?
RobbieZ
04-13-2009, 06:22 AM
I mean the word 'Euai' when it searches.
https://vborg.vbsupport.ru/external/2009/04/105.jpg
mad@Max
04-13-2009, 09:55 AM
I think phrase isn't replaced, just uninstall and install again.
AWJunkies
04-15-2009, 08:15 AM
awesome mod thanks.
Nordinho
04-15-2009, 11:50 PM
Hmm..the 3.7 version worked perfectly, the 3.8 version work perfectly in Firefox, but like some others I can't get it to display in IE. Anyone found a fix for that?
mad@Max
04-16-2009, 12:14 AM
Please, show me site where hack isn't work in ie.
smirkley
04-16-2009, 02:03 AM
Glad this mod is being developed even more.
I tried to install and seemed to work properly.
A couple of bugs yet that keep me from installing and keeping live,...
1 - InternetExplorer6 - get a scripting error prompted by the browser in the status bar, I cannot capture the error, but it implies a syntax error on every page. (as a note, I use IE7 at home, but I can only use IE6 at work)
2 - It does not appear that changing the popup width in acp causes the box to change width, stays the same size.( using same IE6 browser of course)
3 - I have vb forum, vb blog, and vb project tools,...
and popup in integrated search shows up under vbprojecttools in search nav... ie,...
Nav Dropdown Search Order:
1 - Search forums
2 - Search project tools
3 - Search Blogs
But when I type in a search word, and the popup shows up inside dropdown, it is in this order,...
Nav Dropdown Search Order:
1 - Search forums
2 - Search project tools
--- Live Search popup box
3 - Search Blogs
I really like this mod and cant wait till it is tweaked just a tad bit more.
Thanks
mad@Max
04-16-2009, 07:57 AM
Oh, fu*kin ie! Ok, i'll look what can i do...
powerful_rogue
04-16-2009, 10:40 AM
Theres hope for me yet!
I did disable a lot of the mods I had installed, but still had no joy getting this to work in IE.
mad@Max
04-16-2009, 01:34 PM
I don't understand, i check latest version on my couple forums with different browsers (incl. ie-6-7-8) and all works.
vietfancy
04-18-2009, 01:08 AM
The latest version isn't working with IE.
Mad@Max. Could you add 1 more feature into it. Search by threadid
mad@Max
04-18-2009, 07:44 AM
Mad@Max. Could you add 1 more feature into it. Search by threadid
What do you mean.
mad@Max
04-22-2009, 11:34 PM
Version 2.2.3
Fixed bug with highlighting into highlight tag:)
cgway.net
04-23-2009, 02:22 AM
not work in vbadvanced search
mad@Max
04-23-2009, 07:27 AM
With which folder placed forum and vba?
voter
04-25-2009, 06:33 PM
??? Is this mean, no compatibility with mysqli
Fatal error: Cannot use object of type mysqli_result as array in ..../public_html/vb/ajax.php(69) : eval()'d code on line 119
This appears when the results must be shown.
mad@Max
04-25-2009, 08:50 PM
Hmm. Try in plugin Live Search AJAX find query_read and replace with query_read_slave.
If it not help try in plugin Live Search AJAX find $vbulletin->db and replace with $db.
TAIFUN_T
04-25-2009, 11:39 PM
very nice, bro! I click Installed ;)
ЗачОт! ))
externalaw.com
04-27-2009, 01:59 AM
<a href="http://www.externalaw.com" target="_blank">www.externalaw.com</a> how can i space it more to the right and make it bigger, like a big huge cute search box
voter
04-27-2009, 07:09 PM
Neither changing query_read into query_read_slave nor replacing all $vbulletin->db with $db gives effect, still
Fatal error: Cannot use object of type mysqli_result as array in ...vb/ajax.php(69) : eval()'d code on line 119
instead of results.But if no results are possible, say I enter some nonsense, it is doing something and simply "No Results" appearing.
voter
04-27-2009, 07:59 PM
I have localized the error.
It is Lines 114 and 115 of Live Search AJAX
$lsuname = $results['username'];
$lsuid = $results['userid'];
I commented it and now the name of thread starter is not shown in search results, but it works.
Seems something or some other plugin conficts with this one and makes immpossible to generate the username and userid.
mad@Max
04-28-2009, 12:30 AM
Oh, you right, this variables not using.
externalaw.com
04-28-2009, 12:46 AM
how can i space it more to the right and make it bigger, like a big huge cute search box
mad@Max
04-28-2009, 12:48 AM
Give me your source code.
mad@Max
04-30-2009, 07:43 PM
Version 2.3.1
Important release:)
Added function of users search.
Added interval between request (set in options). This will reduce the load when searching.
Changed instruction of manual integrate.
Dr. Bantham
05-02-2009, 12:12 AM
About search field:
CSS:
#tb-searchdiv{float:right;padding:8px 5px 0 0;text-align:center;line-height:13px;cursor:default}#tb-searchdiv a{color:#000;font-size:11px;text-decoration:none;cursor:pointer}#tb-searchbox{padding:4px 11px 11px 22px;width:119px;background:url(images/as4/global/toolbar_searchbox.png) no-repeat;text-align:left;height:14px}#tb-searchbox input{border:0;padding:0;width:119px;background:#f ff;color:#000;font:12px/12px 'Lucida Grande',Verdana,sans-serif;height:14px;outline:none;cursor:text}
<div id="tb-searchdiv"><div id="lsa_window">
<div id="tb-searchbox"><input type="text" id="lsa_input" name="query" tabindex="1001" maxlength="$vboptions[lsa_maxsym]" value="$vbphrase[live_search]" onfocus="if(this.value=='$vbphrase[live_search]' || document.getElementById('lsa_window_menu').style.d isplay == 'none'){this.value=''};<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"> showHint();</if>" onblur="if (this.value==''){this.value='$vbphrase[live_search]'}"<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"> onkeyup="showHint();</if>"/></div>
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<if condition="!in_array($bbuserinfo[usergroupid], array($vboptions[lsa_group]))"><script type="text/javascript"> vbmenu_register("lsa_window",1); </script></if></div>
<a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a>
<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]" />
</div>
</form>
Can you please update the graphic searchbox integration for the new version? Thanks!
externalaw.com
05-02-2009, 08:56 AM
never mind
dancue
05-02-2009, 01:27 PM
mad@max,
I don't know what I'm doing wrong, but I'm not getting anywhere with this. I don't understand what I need to edit?
Where do I find this:
<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>
Excuse my ignorance.
mad@Max
05-02-2009, 05:39 PM
I have given this code as an example. Your code should look like this around.
dancue
05-02-2009, 06:12 PM
In what template?
2.3.1 doenst work for me..
I try search and the search doesnt start after 3th letter.
2.2.3 works goooood
mad@Max
05-04-2009, 01:38 PM
You set variable $lsainput?
I dont have search field..
I use this
$lsaform
And i have activate "Search form" From settings.
mad@Max
05-04-2009, 05:15 PM
You are doing something wrong. You can check it (http://mixplay.ru/forum.php?styleid=1).
dancue
05-04-2009, 07:40 PM
In what template?
Someone please answer. Excuse my ignorance.
mad@Max
05-04-2009, 09:22 PM
You'll need to edit template only if you have opened search field. You are have it?
dancue
05-04-2009, 09:23 PM
If I have opened search field? What does that mean?
mad@Max
05-04-2009, 09:32 PM
It's mean that you are have your own search field, placed on visible place.
dancue
05-04-2009, 09:52 PM
Can you take a look at it and tell me what I need to do?
I can pm you the details.
mad@Max
05-04-2009, 10:42 PM
Ok, pm me.
Mike-D
05-09-2009, 03:23 PM
To the Author of this great Addon: Could you please tell me what both Phrasetype Names means...
<phrasetype name="????????" fieldname="global">
<phrasetype name="???????? ?????????" fieldname="vbsettings">
Guess it's some kind of Russian but I have no clue what it means. Thank you :)
Mike-D
05-09-2009, 03:30 PM
2.3.1 doenst work for me..
I try search and the search doesnt start after 3th letter.
2.2.3 works gooooodSame here! The 2.2.3 version is the one what works really great :up: The 2.3.1 does not work. But this is not a problem for me ;) This is a damn useful Addon and should be Standard all the time!
Installed & Nominated for sure :up:
Theater
05-09-2009, 04:07 PM
Hello again,
I was browsing around and looking at Joomla templates when I came across one that had an amazing AJAX search box. I was wondering if anything like it would be possible with this mod here, or is vBulletin's search capabilities/parameters too different?
http://demo.rockettheme.com/may09/
Keep up the great work!
maidos
05-09-2009, 04:16 PM
hope you still consider getting us ability to move the result window since its display over the search input field :(
carcomp
05-09-2009, 07:56 PM
I've been trying to find an excuse to post how I did this Live Search mod...
http://www.quad4forums.com
PM me if you are interested.
powerful_rogue
05-09-2009, 08:17 PM
I've been trying to find an excuse to post how I did this Live Search mod...
http://www.quad4forums.com
PM me if you are interested.
wow, very impressive!
I like that :nod:
mad@Max
05-09-2009, 08:18 PM
carcomp, i know how do this, just for me it not that important:) This is Live Search, implies pop-up window.
Mike-D
05-10-2009, 07:05 AM
To the Author of this great Addon: Could you please tell me what both Phrasetype Names means...
<phrasetype name="????????" fieldname="global">
<phrasetype name="???????? ?????????" fieldname="vbsettings">
Guess it's some kind of Russian but I have no clue what it means. Thank you :)I hate it being a pain in the neck, but I'd like to know what it means :)
mad@Max
05-10-2009, 10:25 AM
This is location name of phrases, it's not matter.
Dr. Bantham
05-10-2009, 12:30 PM
The code has changed and I cannot identify where I can modify the size of the input box and the "Live Search" text within it. A quick pointer to the section of code where this is set would be greatly appreciated.
mad@Max
05-10-2009, 01:10 PM
Size you can set yourself (it not defined), next to the variable $lsainput. "Live Search" look in phrases.
Strike3ForumsMH
05-11-2009, 04:46 PM
This is a great idea, but there are some problems.
1.) It works flawlessly in Firefox (and Google Chrome) but it will not work for me within IE7. I hadn't yet tested Opera or Safari.
2.) $lsainput does have a width that I can't determine either. I have it set within my own search field at 100px, which defines the search form, but there is a clickable search area that is invisible but will bring up the Live Search once it has been "activated."
3.) I don't know if this was covered yet or not as I didn't get a chance to search for it, but it does not work on my vBAdvanced, stating the Ajax.php cannot be found, I imagine this can be solved by calling to an absolute path.
Perhaps these errors were just with me, but for now I will hold off on this as much as I like the idea in the hopes of getting some time to try to resolve the errors (as they very well could be due to my style and setup.)
It does work great with Firefox again though.
mad@Max
05-11-2009, 05:40 PM
1. IE... this is not a browser, this is a big problem for all! I'm test this hack on all available for me browsers, and problems only with IE.
Now i have new version, with new feature - loading results window not happen until you don't click on search field. But this feature not work fully with IE.
2. This reparable:)
3. Hm, will I return to a direct indication of the path.
Hello max..
I conver my db to utf8 and now the searches looks like case sensitivity in multilang..
any suggestion?
mad@Max
05-14-2009, 09:09 PM
Search or highlight?
vietfancy
05-15-2009, 03:09 AM
I've been trying to find an excuse to post how I did this Live Search mod...
http://www.quad4forums.com
PM me if you are interested.
How do you do that bro? may i have a copy? hehe
Search or highlight?
Search.
dancue
06-14-2009, 04:45 AM
Max,
I'm having an issue of placing the pop up window where I want it to be. How do I place it below the navbar?
What do I have to do?
mad@Max
06-14-2009, 05:01 AM
You mean placing of search field?
dancue
06-14-2009, 05:22 PM
yes. I'd like to have it where carcomp has it.
http://www.quad4forums.com
You see how it creates a popup and pushes everything down below it instead of the box floating above everything.
How can I do this?
mad@Max
06-14-2009, 06:45 PM
Something like:
style="position: absolute; top: 100px; right: 50px;"
dancue
06-14-2009, 06:47 PM
Where am I adding that?
And how do I add this:
https://vborg.vbsupport.ru/
mad@Max
06-14-2009, 06:51 PM
<div style="position: absolute; top: 100px; right: 50px;"><input ... /></div>
dancue
06-14-2009, 06:58 PM
That positioned the input box.
What I want is the results box below the navbar instead of a pop up window.
mad@Max
06-14-2009, 06:59 PM
And how do I add this:
http://unifiedchamp.com/ucforum/images/toolbar_searchbox.png
For that you need add this html
<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
#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:#f ff;color:#000;font:12px/12px 'Lucida Grande',Verdana,sans-serif;height:14px;outline:none;cursor:text}
PS from source of my site.
dancue
06-14-2009, 07:05 PM
For that you need add this html
<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
#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:#f ff;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?
dancue
06-14-2009, 07:08 PM
and do I have to replace this:
Живой поиск
with what?
mad@Max
06-14-2009, 07:12 PM
Not exactly. This a free piece of html, you can put it everywhere. This is a source
<!-- 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 -->
dancue
06-14-2009, 07:14 PM
Not exactly. This a free piece of html, you can put it everywhere. This is a source
<!-- 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.
mad@Max
06-14-2009, 07:18 PM
Of course:) You need disable search form.
dancue
06-14-2009, 07:36 PM
Okay. I don't think we are thinking about the same thing here.
I want this box:
http://www.unifiedchamp.com/pictures/picture3.png
To show up here below the navbar:
http://www.unifiedchamp.com/pictures/picture2.png
And I want to keep this here within my header:
http://www.unifiedchamp.com/pictures/picture4.png
mad@Max
06-14-2009, 08:07 PM
In terms of version 2.3.1 is in the template lsa_script to replace everything on the
<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.response Text!==undefined){p.innerHTML=i.responseText}};thi s.lsa_handleFailure=function(i){if(i.responseText! ==undefined){alert(i.responseText)}};this.lsa_call back={success:lsa_handleSuccess,failure:lsa_handle Failure};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>
dancue
06-14-2009, 08:15 PM
In terms of version 2.3.1 is in the template lsa_script to replace everything on the
<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.response Text!==undefined){p.innerHTML=i.responseText}};thi s.lsa_handleFailure=function(i){if(i.responseText! ==undefined){alert(i.responseText)}};this.lsa_call back={success:lsa_handleSuccess,failure:lsa_handle Failure};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>
What do I do with that? Sorry, now you confused me.
dancue
06-16-2009, 11:20 AM
Also, I still have to double click. I noticed on the mixplay site you still had the words within with no need to double click. How can I accomplish the same?
Devanand
06-18-2009, 10:53 AM
I still don't understand how can I make it to look like on demo site , not just regular search .
Devanand
06-22-2009, 03:35 PM
Why doesn't guests see search form?
In Group permission I've allowed them to see it but it doesn't apear.
mad@Max
06-22-2009, 07:39 PM
Now i have v3.0, soon i'll release it.
Wheemer
06-22-2009, 08:25 PM
The instruction are confusing, I've imported it but nothing shows up.
mad@Max
06-22-2009, 08:52 PM
What did you do for this purpose?
Wheemer
06-22-2009, 10:12 PM
I followed the installation instructions:
Installation:
Import product :)
I'm not upgrading so...
Is there something further I need to do to get this working? If so please update the limited install instructions.
mad@Max
06-22-2009, 10:42 PM
Where you connect the search?
ctrlbrk
06-22-2009, 11:00 PM
Now i have v3.0, soon i'll release it.
cool, tagged & waiting!
Mike
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.