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

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

Category: Add-On Releases - Version: 3.7.x Rating:
Released: 09-02-2008 Last Update: 12-23-2008 Installs: 100
Uses Plugins Template Edits Auto-Templates
Re-useable Code Additional Files  
No support by the author.

This is mod rewrite of that: https://vborg.vbsupport.ru/showthread.php?t=154694

Version 1.6

Continue (v2.0) of this mod is here: https://vborg.vbsupport.ru/showthread.php?t=204517

I'm added few functions:
  • 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

Installation:
Import product

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

Live DEMO: http://mixplay.ru/
Live video: http://ru.youtube.com/watch?v=qDWQ7vz5vts

PS Some function writed by ChangUonDyU

Spanish translation v1.6

If you like this mod - Click Install it

Show Your Support

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

Comments
  #202  
Old 10-23-2008, 08:02 PM
CraiovaOnLine CraiovaOnLine is offline
 
Join Date: Feb 2007
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #203  
Old 10-24-2008, 04:50 AM
iglobal iglobal is offline
 
Join Date: Apr 2006
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gasper View Post
You must change UTF-8 to Latin1
Where should I change that?
Reply With Quote
  #204  
Old 10-24-2008, 06:51 AM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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); 
Reply With Quote
  #205  
Old 10-24-2008, 10:19 AM
b6gm6n's Avatar
b6gm6n b6gm6n is offline
 
Join Date: Aug 2002
Location: UK
Posts: 691
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

more instructions please, not so clear... it's for forms, not for my default search, uninstalled as not needed, thanks
Reply With Quote
  #206  
Old 10-30-2008, 08:02 AM
PoetJA-1975's Avatar
PoetJA-1975 PoetJA-1975 is offline
 
Join Date: Sep 2006
Location: Meh...
Posts: 1,218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #207  
Old 10-30-2008, 07:07 PM
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Location: Argentina
Posts: 667
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 
}
Reply With Quote
  #208  
Old 11-01-2008, 08:32 PM
Quantnet Quantnet is offline
 
Join Date: Nov 2006
Location: NYC
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #209  
Old 11-01-2008, 11:12 PM
PoetJA-1975's Avatar
PoetJA-1975 PoetJA-1975 is offline
 
Join Date: Sep 2006
Location: Meh...
Posts: 1,218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #210  
Old 11-01-2008, 11:14 PM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OMG. Use lasted version of mod also files.
Reply With Quote
  #211  
Old 11-01-2008, 11:49 PM
Quantnet Quantnet is offline
 
Join Date: Nov 2006
Location: NYC
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


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

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

Forum Jump


All times are GMT. The time now is 12:20 AM.


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

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

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