vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Add-On Releases - [AJAX] Live Search (https://vborg.vbsupport.ru/showthread.php?t=189970)

CraiovaOnLine 10-23-2008 08:02 PM

super mode
10x mate
just one question ...can i set it up to search just within one forum or just within one category ?
10x again

iglobal 10-24-2008 04:50 AM

Quote:

Originally Posted by Gasper (Post 1648709)
You must change UTF-8 to Latin1 ;)

Where should I change that?

mad@Max 10-24-2008 06:51 AM

CraiovaOnLine, Yes, add after
PHP Code:

". TABLE_PREFIX ."thread.forumid NOT IN (0 $excludelist

this
PHP Code:

". TABLE_PREFIX ."thread.forumid IN (1,2,3,4,5,...) 

iglobal, above
PHP Code:

$query addslashes(trim($_GET['query'])); 

add
PHP Code:

$query iconv('UTF-8'$stylevar['charset'], $query); 


b6gm6n 10-24-2008 10:19 AM

more instructions please, not so clear... it's for forms, not for my default search, uninstalled as not needed, thanks

PoetJA-1975 10-30-2008 08:02 AM

The following is the contents of the vbulletin_live_ajax_search.js file:

Code:

/**
 * Live Search v1.2
 * @author mad@Max
 */
var xmlHttp3
function showHint(word)
{
document.getElementById("search_results").innerHTML = '<p></p><p></p><p align="center" class="smallfont"><img src="images/misc/progress.gif" /> Searching...</p>';
        xmlHttp3=GetXmlHttpObject3()
        if (xmlHttp3==null)
        {
                alert ("Browser does not support HTTP Request")
                return
        }
        var url=hurl+"ajax_search.php"
        url=url+"?query="+word
        xmlHttp3.onreadystatechange=stateChanged3
        xmlHttp3.open("GET",url,true)
        xmlHttp3.send(null)
}

function stateChanged3()
{
        var sSearch = document.getElementById("search_input").value;
        var obj = document.getElementById("search_results");
        var obj2 = document.getElementById("q_search");
        if (sSearch.length>=3){
        if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")
        {
                obj2.style.display = 'block';
                obj.innerHTML=xmlHttp3.responseText;
        }
        } else {
                obj2.style.display = 'none';
                obj.innerHTML = '';
        }
}

function GetXmlHttpObject3()
{
        var objXMLHttp3=null
        if (window.XMLHttpRequest)
        {
                objXMLHttp3=new XMLHttpRequest()
        }
        else if (window.ActiveXObject)
        {
                objXMLHttp3=new ActiveXObject("Microsoft.XMLHTTP")
        }
        return objXMLHttp3
}

As per the instructions - where do you add your forum path in var hurl="" -- I do not see that bit of code in the .js file

Thanx,

Jacquii.

ForumsMods 10-30-2008 07:07 PM

Here:
Code:

/**
 * Live Search v1.2
 * @author mad@Max
 */
var xmlHttp3
function showHint(word)
{
document.getElementById("search_results").innerHTML = '<p></p><p></p><p align="center" class="smallfont"><img src="images/misc/progress.gif" /> Searching...</p>';
    xmlHttp3=GetXmlHttpObject3()
    if (xmlHttp3==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }
    var url=hurl+"ajax_search.php"
    url=url+"?query="+word
    xmlHttp3.onreadystatechange=stateChanged3
    xmlHttp3.open("GET",url,true)
    xmlHttp3.send(null)
}

function stateChanged3()
{
    var sSearch = document.getElementById("search_input").value;
    var obj = document.getElementById("search_results");
    var obj2 = document.getElementById("q_search");
    if (sSearch.length>=3){
    if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")
    {
        obj2.style.display = 'block';
        obj.innerHTML=xmlHttp3.responseText;
    }
    } else {
        obj2.style.display = 'none';
        obj.innerHTML = '';
    }
}

function GetXmlHttpObject3()
{
    var objXMLHttp3=null
    if (window.XMLHttpRequest)
    {
        objXMLHttp3=new XMLHttpRequest()
    }
    else if (window.ActiveXObject)
    {
        objXMLHttp3=new ActiveXObject("Microsoft.XMLHTTP")
    }
    return objXMLHttp3
}


Quantnet 11-01-2008 08:32 PM

it seems that the search function works well under the site.com/forum/ but when you move to a different place like site.com/wiki/ and do a search from there, it will return error.

I tried to search in the top level domain site.com/ and it returns something like this

http://www.site.com/ 67.86.193.xxx /ajax_search.php?query=and www.site.com Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729) 404 Please contact admin if you can not find the content you are looking for.

This should be easy by using relative path instead of absolute path?

PoetJA-1975 11-01-2008 11:12 PM

Hi MAXIM :)

Actually- I have the 1st version installed at http://JPiCForum.info - it works just fine with vBSEO installed - I've installed the current version on http://DiscussWLS.com - and the it does not work with vBSEO installed. Not only that - but I could not find the edit to make it work on the vBadvanced page. You probably need to clarify the instructions in the download folder.

So my question - Can you make the 1st version upload available for download again please?

Thanx,

Jacquii.

mad@Max 11-01-2008 11:14 PM

OMG. Use lasted version of mod also files.

Quantnet 11-01-2008 11:49 PM

you can find ver 1.2 a few page back. Someone posted it there.

PoetJA-1975 11-02-2008 07:35 AM

Thanx ;)

Jacquii.

mad@Max 11-02-2008 11:24 AM

My mod does't have connection with vbseo:)

LordNinja 11-19-2008 02:01 AM

Found the problem with subdirs like /forum

You should replace:

$vboptions[bburl]

with:

$vbulletin->options[bburl]

on line 78 of ajax_search.php

($vboptions[bburl] return only yourdomain.com while the new var return yourdomain.com/forum or whatever is your full bb url)

I also recommend mad@Max put this line (add before 15th line) on clientscript/vbulletin_ajax_live_search.js:

var hurl=""

then people will easier find what to edit

mad@Max 12-13-2008 07:58 PM

Mod is updated.
I grouped the templates and added another template.
LordNinja
Quote:

I also recommend mad@Max put this line (add before 15th line) on clientscript/vbulletin_ajax_live_search.js:

var hurl=""

then people will easier find what to edit
For what? Link of your forum get from vb setting. This link get my variable.

LordNinja 12-15-2008 02:23 AM

mad@Max,

i know it. i was talking about 2 different things.

the first one (bburl) is because $vboptions[bburl] return only the domain, not the full url of the forum, like $vbulletin->options[bburl]. then search works (results are shown on the float panel) but all result links are to "domain.com/showthread.php" instead "domain.com/forum/showthread.php" then you have a 404 when click it.

the second (the recommendation i made you) is just to make the file edit easier for those who have vBAvanced. example:

Code:

        var hurl=""
        var url=hurl+"ajax_search.php"

then people will make you less questions like you read in the first page of this thread :)

nice mod, anyway :)

mad@Max 12-15-2008 07:52 AM

Look, in the main settings vb, while vb installing, you must write path to your main page (like site.com) and to forum (like site.com or site.com/forum), second url get my variable :)
PS if your forum placed in site.com/forum and you set $vbulletin->options[bburl] as site.com, you will get error.

LordNinja 12-16-2008 02:06 AM

Try yourself.

Forum Name: My Site Forums
Forum URL: http://www.mysite.com/forums
Homepage Name: My Site
Homepage URL: http://www.mysite.com

$vbulletin->options[bburl] return http://www.mysite.com/forums
$vboptions[bburl] return http://www.mysite.com

vBulletin 3.7.2

mad@Max 12-20-2008 06:57 PM

So, i rewrite many functions in my mod, but most importantly i got rid of files, now just one product :)
PS Some features i took from Advanced Quick Search - with AJAX by ChangUonDyU .

Quantnet 12-20-2008 10:11 PM

Max, you shouldn't remove the old version files when you update in case people still need the old versions if something breaks.

I'm looking for the old 1.32 version if anyone still have it.

mad@Max 12-20-2008 11:20 PM

Ok, if you need this version, take it. :)

Quantnet 12-21-2008 01:21 AM

thanks max.
Do you know how to get the Thread and Forum on top of your search result?
You can try to do a search at my forum and see it's not like at your forum.

I don't know where do you use lsearch template.

mad@Max 12-21-2008 05:01 PM

Quantnet.org, i advice you to install a new version:)

Quantnet 12-21-2008 10:42 PM

Quote:

Originally Posted by mad@Max (Post 1690471)
Quantnet.org, i advice you to install a new version:)

I did. It's not working, either using the $lsaform or my own search form. It's not returns any errors or anything. just empty box.

mad@Max 12-22-2008 12:03 AM

Quantnet.org, try comment this string in module Live Search AJAX
PHP Code:

// $query = iconv('UTF-8', $stylevar['charset'], $query); 


Quantnet 12-22-2008 12:17 AM

It's a no go. Try both.

Try to adjust the window size, location and it doesn't affect at all.

mad@Max 12-22-2008 07:27 AM

Mb this is some conflict, because on clear forum all worked:)

FiMeTi 12-22-2008 07:25 PM

Hi mad@Max. :)

I still use Version 1.0 and it works just sm00th.
Made a few style changes and did not want to update it. ^^

My question: Since this hack makes querrys for searchs, is it not able to abuse this hack? Freaks might use it all the day... even bots?

Thx ;)

mad@Max 12-22-2008 08:00 PM

Yes, hack makes queries, but not large. In any case, the search can be switched off for guests (handly). In next version i will make option for this:)
PS Now you can limit order for the threads output (optional), thus can reduce the load.

MrZeropage 12-22-2008 08:19 PM

Ok, I installed it and want it to make use of the standard-search-box in the navbar-dropdown.

I get it working/searching, but the popup-window is MUCH too large, the settings do not take real effect...

Maybe I did not integrate it correctly in the template ?


in NAVBAR I did replace
Code:

<input type="text" class="bginput" name="query" size="25" tabindex="1001" />
with
Code:

<input type="text" class="bginput" id="search_input" name="query" size="25" maxlength="$vboptions[lsa_maxsym]" value="$vbphrase[lsa_live_search]" onfocus="if(this.value=='$vbphrase[lsa_live_search]'){this.value=''}; showHint();" onblur="if (this.value==''){this.value='$vbphrase[lsa_live_search]'}" onkeyup="showHint();" tabindex="1001" />
using vB 3.7.4 PL1

mad@Max 12-22-2008 11:46 PM

Not can be:) Window is resizeable and movable in settings. I just check it, if put live search in default vb search field.

MrZeropage 12-23-2008 05:25 AM

Ok, I am looking forward for your hint :)

mad@Max 12-23-2008 07:35 AM

Can you give me screenshot?

MrZeropage 12-23-2008 03:41 PM

sure - see attached ... working fine in Firefox but not in IE7

(sorry language on screenshot is german)

nesta1 12-24-2008 12:40 AM

hi i see 1 problem!
if you installed on domain/forums/ is fine !
but for subdomains not working and waiting !
for example : forums.mydomain.com/ !! waiting but domain.com/forums/ is working and fine!

mad@Max 12-24-2008 05:29 AM

Please give me refer to your sites to study the problem.

MrZeropage 12-24-2008 05:52 AM

@nesta1:
I am not using subdomains, it is domain/board/
or was your posting not refered to my problem ? ;)

@mad@Max:
I will first try something else on a fresh 3.7.4 and then come back to you...

mad@Max 12-24-2008 06:26 AM

MrZeropage, on fresh board mod is worked...

MrZeropage 12-24-2008 07:26 AM

sorry, but I now tried a new fresh test-vBulletin and it does the same (in IE)

mad@Max 12-24-2008 07:33 AM

Oh, you right, f*cking ie :) Soon will fix it.

mad@Max 12-24-2008 07:53 PM

Version 1.6:
fixed bug of pop-up window in ie and
limit the number of displayed results
group permission
search by your own forums
sort results of search


All times are GMT. The time now is 02:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01421 seconds
  • Memory Usage 1,834KB
  • 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
  • (5)bbcode_code_printable
  • (5)bbcode_php_printable
  • (3)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