vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - Live Search 1.0 (AJAX) (https://vborg.vbsupport.ru/showthread.php?t=154694)

rainyleaves 08-09-2007 10:36 AM

I got Another error.
Quote:

MySQL Error : Unknown column 'thread.forumid' in 'where clause'
Error Number : 1054
Then, I hard coded my table prefix...

Quote:

$results = $db->query_read("SELECT * FROM ". TABLE_PREFIX ."thread WHERE `title` LIKE '%$query%' AND `thread`.`forumid` NOT IN (0 $excludelist)");
---------->
$results = $db->query_read("SELECT * FROM ". TABLE_PREFIX ."thread WHERE `title` LIKE '%$query%' AND ". TABLE_PREFIX ."thread . forumid NOT IN (0 $excludelist)");
Now works fine.... :)

BTW, Awesome mod !!!!
Thanks, Coderphp :)

coderphp 08-09-2007 10:41 AM

Quote:

Originally Posted by rainyleaves (Post 1313479)
I got Another error.

Then, I hard coded my table prefix...


Now works fine.... :)

BTW, Awesome mod !!!!
Thanks, Coderphp :)

thanx ..

please click install if u like it :)

rainyleaves 08-09-2007 10:53 AM

Just Installed and MOTM :)

Crazy Serb 08-09-2007 11:27 AM

you do realize that this script behaves differently on Firefox and IE browsers... on Firefox it displays the results div either far left or far right on the page (NOT beside the search box), while on IE it does display it right beside the search box but it comes up with some JavaScript error (check your status bar).

Any way to make this work on FF the same way it does on IE?

StrifeX 08-09-2007 11:42 AM

Quote:

Originally Posted by rainyleaves (Post 1313479)
I got Another error.

Then, I hard coded my table prefix...


Now works fine.... :)

BTW, Awesome mod !!!!
Thanks, Coderphp :)

Wow, thanks for the solution to my problem :)

Btw coderphp, i downloaded the new version of your mod and i had the same problem, you might want to add rainyleaves' code into your php file... And you might also want to update the version of your hack to like 1.01 :p.

Also, how do i get the text to show "Searching..." instead of "???? ???????.." while searching?

Magnumutz 08-09-2007 12:55 PM

This is awesome... Thanks.
*Installed*

Regs 08-09-2007 01:00 PM

Someone asked earlier about queries... does this not query the server on every key press?

It's a very good idea but not too sure it is friendly for a large, busy site?

Cheers,

~Regs.

Magnumutz 08-09-2007 01:06 PM

There's only 1 (ONE) query: https://vborg.vbsupport.ru/showpost....5&postcount=16

Regs 08-09-2007 01:41 PM

Yes, I read that. But my question remains - is this one query on every keystroke?

Brew 08-09-2007 02:15 PM

In FireFox the mod looks great but it's a bit different in IE. The box comes up too small in IE.

EDIT:
I forgot to mention that the below pics were taken after adding the code for the div statement from another reply; overflow:auto; height:200px but the layout is the same with or without the change.

Examples below..The first image is FF the second is IE..

Brew 08-09-2007 02:18 PM

Quote:

Originally Posted by Regs (Post 1313647)
Yes, I read that. But my question remains - is this one query on every keystroke?

Seeing as how the script grabs info from the server in order to insert the links I would say it's safe to assume that each keystroke causes one query.

coderphp 08-09-2007 04:12 PM

Quote:

Originally Posted by valdet (Post 1313551)
When i type in the search field, this error pops out in search results table..



Any ideas.. as I would install this on my live site in a snap...

Thanks.

it seems u have a problem in the file "ajax_search.php"
Please try to upload the file again... and tell me if the problem presists

Quote:

Originally Posted by Magnumutz (Post 1313601)
This is awesome... Thanks.
*Installed*

thanx :)

Quote:

Originally Posted by Regs (Post 1313604)
Someone asked earlier about queries... does this not query the server on every key press?

It's a very good idea but not too sure it is friendly for a large, busy site?

Cheers,

~Regs.

Yes ti do one query every keypress
again i tested on medium forum (mine) and it didnt show any problems till now
i didnt test on large forums
if it appear to be a problem on large forums we could add a time limit then :) but i dont like to do so now cause it no longer be LIVE SEARCH

Quote:

Originally Posted by Regs (Post 1313647)
Yes, I read that. But my question remains - is this one query on every keystroke?

yes as mentioned on every key stroke

Quote:

Originally Posted by Brew (Post 1313673)
In FireFox the mod looks great but it's a bit different in IE. The box comes up too small in IE.

EDIT:
I forgot to mention that the below pics were taken after adding the code for the div statement from another reply; overflow:auto; height:200px but the layout is the same with or without the change.

Examples below..The first image is FF the second is IE..

what versions do u use of browsers? i tested it on the browsers mentioned in the first post and it is working good :)

coderphp 08-09-2007 04:14 PM

Quote:

Originally Posted by StrifeX (Post 1313534)
Wow, thanks for the solution to my problem :)

Btw coderphp, i downloaded the new version of your mod and i had the same problem, you might want to add rainyleaves' code into your php file... And you might also want to update the version of your hack to like 1.01 :p.

Also, how do i get the text to show "Searching..." instead of "???? ???????.." while searching?

table prefix already added
also template edit updated.. please install the updated ones

coderphp 08-09-2007 04:17 PM

Quote:

Originally Posted by Brew (Post 1313673)
In FireFox the mod looks great but it's a bit different in IE. The box comes up too small in IE.

EDIT:
I forgot to mention that the below pics were taken after adding the code for the div statement from another reply; overflow:auto; height:200px but the layout is the same with or without the change.

Examples below..The first image is FF the second is IE..

i think that is because u combine the mod to the DHTML search menu
infact i didnt test it in the DHTML menu but only in the header portion of the page, outside the DHTML menu

Brew 08-09-2007 04:51 PM

Quote:

Originally Posted by coderphp (Post 1313783)
i think that is because u combine the mod to the DHTML search menu
infact i didnt test it in the DHTML menu but only in the header portion of the page, outside the DHTML menu

I really don't know much about DHTML and AJAX.

I wonder if there is something to add to either the DHTML or this mod to make it work correctly in IE within the stock search dropdown.

BTW, My Internet Explorer version is 7.0.5730.11

Quantnet 08-09-2007 05:06 PM

Very nice mod. Installed.

In my search, there is a radio button to select Post or Thread, can you modify the code so it can search post as supposed to search Thread by default now.

You can look at the site on my signature to see my search box

Quantnet 08-09-2007 05:17 PM

not sure if this is a bug

On FF, the search result displayed on the ajax box is left aligned while in Opera 9.22, it's right aligned

Also, i have a wiki on my site at www.quantnet.org/wiki but the search box is no longer working there. The default select radio button is disappear on the wiki site. Thread is selected by default on the forum site but as soon as i go to my wiki site, the select disappear so i can't search anymore

Quantnet 08-09-2007 05:30 PM

Here is the code of the search box that i have in my navbar template

Code:

<!-- search -->
                <if condition="$show['searchbuttons']">
        <td align="right" nowrap="nowrap" valign="top">
                <if condition="$show['member']">
                        <form action="search.php?do=process" method="post">
        <else />
                        <form action="search.php$session[sessionurl_q]" method="post">
        </if>
        <table cellpadding="0" cellspacing="0" border="0">
                        <tr>
                                <td style="font-size:10px" title="nohilite">




                                        <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]" />


Live search <input type="text" name="query" size="25" class="header_search_field" onkeyup="showHint(this.value)" />
</form>
<div id="search_results" class="smallfont" style="position:absolute; border: 2px solid orange; color:blue; background-color: white; width: 300px; padding: 8px; display:none;overflow:auto; height:200px">
<div align="left"><a href="#" onClick="overlayclose('search_results'); return false">x</a></div>
</div>

                                       
                                </td>
        <td nowrap="nowrap" id="navbar_search" class="smallfont">&nbsp;<a href="search.php$session[sessionurl_q]">Options</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>
                        </tr>
                        <tr>
                                <td colspan="2" style="font-size:10px" title="nohilite" nowrap="nowrap">
                                Show:        <label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />threads</label>
                                       
                                        <label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />posts</label>
                                </td>
                        </tr>
                        </table>
                        </form>
        <!-- / search -->


Quantnet 08-09-2007 05:34 PM

Found another error:

I have this error when i search while I'm on the home page (i have vbAdvanced as homepage)

http://www.mysite.com/ 68.198.xxx.xxx /ajax_search.php?query=ds www.mysite.com Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 404 Please contact admin@xxx.org if you can not find the content you are looking for.

coderphp 08-09-2007 05:43 PM

Quote:

Originally Posted by Brew (Post 1313803)
I really don't know much about DHTML and AJAX.

I wonder if there is something to add to either the DHTML or this mod to make it work correctly in IE within the stock search dropdown.

BTW, My Internet Explorer version is 7.0.5730.11

again the problem is the width of DHTML drop down menu is fixed
so u should better install this mod directly in the header portion of the page
or any place outside the drop down menu

Brew 08-09-2007 05:46 PM

I'm sorry but I have to uninstall this mod, as much as I want to use it.

I just don't have anywhere to put a custom search box on the site. The default location of the box in the navbar is the only place I can use this, but it does not work there with Internet Explorer.

If anyone can make it work in the standard search box (the DHTML dropdown search form) please post here ?

Thanks!

coderphp 08-09-2007 05:49 PM

Quote:

Originally Posted by Quantnet.org (Post 1313814)
Very nice mod. Installed.

In my search, there is a radio button to select Post or Thread, can you modify the code so it can search post as supposed to search Thread by default now.

You can look at the site on my signature to see my search box

searching posts will have a high load on server
so i dont think it will be good to do that using Live Search

Quote:

Originally Posted by Quantnet.org (Post 1313818)
not sure if this is a bug

On FF, the search result displayed on the ajax box is left aligned while in Opera 9.22, it's right aligned

Also, i have a wiki on my site at www.quantnet.org/wiki but the search box is no longer working there. The default select radio button is disappear on the wiki site. Thread is selected by default on the forum site but as soon as i go to my wiki site, the select disappear so i can't search anymore

please re-install the template modification as i think u did something wrong with it
the alignment is adjusted automatically according to ur forums alignment

Quote:

Originally Posted by Quantnet.org (Post 1313826)
Found another error:

I have this error when i search while I'm on the home page (i have vbAdvanced as homepage)

http://www.mysite.com/ 68.198.xxx.xxx /ajax_search.php?query=ds www.mysite.com Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 404 Please contact admin@xxx.org if you can not find the content you are looking for.

this is not an error
the Mod is supposed to work only on forum's pages
not tested on VBAdvanced or any other Mod

thanx :)

TheBlackPoet 08-09-2007 06:42 PM

I added an opacity to this cool hack... i also added it to a customed table... so notice the <td></td> tag....

if you want to lighten or darken the opacity... (transparency)

make the change here
<div id="search_results" class="smallfont" style="position:absolute; border: 5px solid #999999; color:white; filter:alpha(opacity=85); background-color: gray; width: 300px; padding: 8px; display:none">

coderphp 08-09-2007 08:22 PM

Quote:

Originally Posted by TheBlackPoet (Post 1313871)
I added an opacity to this cool hack... i also added it to a customed table... so notice the <td></td> tag....

if you want to lighten or darken the opacity... (transparency)

make the change here
<div id="search_results" class="smallfont" style="position:absolute; border: 5px solid #999999; color:white; filter:alpha(opacity=85); background-color: gray; width: 300px; padding: 8px; display:none">

Excellent Malik !!

I put ur version to my forum :)

i also added:
Code:

-moz-opacity:.85;opacity:.85;
for the code to work on Firefox 2

Deepdog009 08-09-2007 09:08 PM

Quote:

Originally Posted by TheBlackPoet (Post 1313871)
I added an opacity to this cool hack... i also added it to a customed table... so notice the <td></td> tag....

if you want to lighten or darken the opacity... (transparency)

make the change here
<div id="search_results" class="smallfont" style="position:absolute; border: 5px solid #999999; color:white; filter:alpha(opacity=85); background-color: gray; width: 300px; padding: 8px; display:none">


Didn't think I needed this, but now I do...

Great work
***********
coderphp
TheBlackPoet

Quantnet 08-09-2007 10:11 PM

Quote:

Originally Posted by coderphp (Post 1313837)
this is not an error
the Mod is supposed to work only on forum's pages
not tested on VBAdvanced or any other Mod
thanx :)

I see.

Do you think it will be a next feature :D

Lot of people use vbAdvanced so it would make sense to have the same search side-wide

StrifeX 08-10-2007 12:29 AM

Suggestion: Make it say "No results found" when there is no search text or if nothing is found.

Corrections: This messes up my Shoutbox (by Inferno technologies), and my style chooser (anyone else having this problem?)

Edit: Pretty much anything on my site that uses AJAX doesn't work :( Any ideas?

rainyleaves 08-10-2007 01:14 AM

Quote:

Originally Posted by coderphp (Post 1313837)
this is not an error
the Mod is supposed to work only on forum's pages
not tested on VBAdvanced or any other Mod

thanx :)

You need Edit code if you wanna to use with CMPS.
* /forums/ or /forum/ , It's mean forum root name.
You just change /forums/ to your site's forum root name.


===========================================

1. ajax_search.php-------------
Quote:

echo "<a href=\"showthread.php?t=".$result['threadid']."\">" . $result['title'] . "</a><br />";

--->

echo "<a href=\"/forums/showthread.php?t=".$result['threadid']."\">" . $result['title'] . "</a><br />";

2. "headinclude" template--------------

Quote:

var url="ajax_search.php"
url=url+"?query="+word
xmlHttp3.onreadystatechange=stateChanged3
xmlHttp3.open("GET",url,true)
xmlHttp3.send(null)

---->

var url="/forums/ajax_search.php"
url=url+"?query="+word
xmlHttp3.onreadystatechange=stateChanged3
xmlHttp3.open("GET",url,true)
xmlHttp3.send(null)

3. "header" template-----------------

Quote:

<form action="search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />

--->

<form action="/forums/search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
Good luck :)

rjmjr69 08-10-2007 03:34 AM

Whats the benefits of using this over any other search? One query for each key stroke seems excessive no?

Brew 08-10-2007 03:56 AM

Quote:

Originally Posted by rjmjr69 (Post 1314148)
Whats the benefits of using this over any other search? One query for each key stroke seems excessive no?

I don't think it's excessive.

How many queries does your site currently have to load up the search screens? All together I would bet that there would be less with this system.

I think most people would find a thread they like in the first five to ten characters. That would probably be about even without having this but this is much easier.

One thing he could add to this would be a limit on key strokes option in the admin area. That would keep someone from causing too many queries.

FReeSTER 08-10-2007 04:26 AM

Quote:

Originally Posted by coderphp (Post 1313395)
of course it is working

Can you help me out getting this right.... I love this Mod eventhough is not working property in my site... What you think is the problem for the data base error Im getting?


Any help will be much appreciate it..

TY

Gunshot 08-10-2007 04:31 AM

hmmmm

I have a major problem with this hack as it stands

When I login as a registered member and do a search it shows thread titles for private forums. This could be somewhat embarrassing

It won't allow you to view the thread, but some titles are enough to get you in trouble..
..if you know what I mean

StrifeX 08-10-2007 05:00 AM

Quote:

Originally Posted by El Intocable (Post 1314165)
Can you help me out getting this right.... I love this Mod eventhough is not working property in my site... What you think is the problem for the data base error Im getting?


Any help will be much appreciate it..

TY

https://vborg.vbsupport.ru/showpost....9&postcount=41

Magnumutz 08-10-2007 05:23 AM

Too bad it only searches Thread titles...

rjmjr69 08-10-2007 06:53 AM

Quote:

Originally Posted by Brew (Post 1314155)
I don't think it's excessive.

How many queries does your site currently have to load up the search screens? All together I would bet that there would be less with this system.

I think most people would find a thread they like in the first five to ten characters. That would probably be about even without having this but this is much easier.

One thing he could add to this would be a limit on key strokes option in the admin area. That would keep someone from causing too many queries.


Ah I see what your saying now. Well with the description of the hack you have up does it no justice. So basically as soon as you type a character it starts searching from the character Pretty neat. I'll wait for the bugs to be worked out.

rainyleaves 08-10-2007 01:51 PM

Can I excluding specify forum for search result?

coderphp 08-10-2007 03:11 PM

Quote:

Originally Posted by rjmjr69 (Post 1314148)
Whats the benefits of using this over any other search? One query for each key stroke seems excessive no?

ordinary search needs 10+ queries to be done
this needs only 1 query..
so i think it is not excessive at all

Quote:

Originally Posted by El Intocable (Post 1314165)
Can you help me out getting this right.... I love this Mod eventhough is not working property in my site... What you think is the problem for the data base error Im getting?


Any help will be much appreciate it..

TY

Please re-download and re-install the Mod

Quote:

Originally Posted by Gunshot (Post 1314167)
hmmmm

I have a major problem with this hack as it stands

When I login as a registered member and do a search it shows thread titles for private forums. This could be somewhat embarrassing

It won't allow you to view the thread, but some titles are enough to get you in trouble..
..if you know what I mean

No it is not showing thread titles unless user can see it
the Mod is using the same user validation functions as the original search module do

Quote:

Originally Posted by Magnumutz (Post 1314190)
Too bad it only searches Thread titles...

again searching posts will cause too much load on the mysql server
and i dont like to do so

Quote:

Originally Posted by rainyleaves (Post 1314451)
Can I excluding specify forum for search result?

of course u can
edit the file ajax_search.php
find
PHP Code:

(0 $excludelist

replace with

PHP Code:

(0$forumnum1$forumnum2 $excludelist

Regards for all :)

Quantnet 08-10-2007 03:16 PM

why you put progress.gif under/images/

You should have put it under some folder like /misc/ and updated the code accordingly.

rainyleaves 08-10-2007 03:27 PM

Quote:

Originally Posted by coderphp (Post 1314490)
of course u can
edit the file ajax_search.php
find
PHP Code:

(0 $excludelist

replace with

PHP Code:

(0$forumnum1$forumnum2 $excludelist

Regards for all :)

Great!!!

I edited like this.
Quote:

(0, 34, 57 $excludelist)
Works charm~ :)
Thanks!!

grazianno 08-10-2007 05:01 PM

nice nice mod thx man ;)


All times are GMT. The time now is 01:34 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.01773 seconds
  • Memory Usage 1,883KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (35)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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