The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[YUI] Live Search Details »» | |||||||||||||||||||||||||||||||||
Features:
Known Issues Double click in search field - still not fixed. Installation: Upload all files from folder upload to forum folder. Import product. Upgrade Uninstall the old version, delete files (if you has use it) and install new version. If you already have opened search field, do following. Search field look like this: HTML Code:
<form action="search.php?do=process" method="post"> <input type="hidden" name="do" value="process" /> <input type="hidden" name="quicksearch" value="1" /> <input type="hidden" name="childforums" value="1" /> <input type="hidden" name="exactname" value="1" /> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> <input type="text" class="bginput" name="query" size="25" tabindex="1001" /> <input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /> </form> HTML Code:
<div id="lsa_window">
HTML Code:
</div>
For this in tag <input type="text" /> add id="lsa_input" As a result, you should get some of this code: HTML Code:
<form action="search.php?do=process" method="post"> <div id="lsa_window"> <input type="hidden" name="do" value="process" /> <input type="hidden" name="quicksearch" value="1" /> <input type="hidden" name="childforums" value="1" /> <input type="hidden" name="exactname" value="1" /> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> <input type="text" id="lsa_input" class="bginput" name="query" size="25" tabindex="1001" /> <input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /> </div> </form> 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 Download Now
Screenshots
Show Your Support
|
Comments |
#102
|
|||
|
|||
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. |
#103
|
|||
|
|||
Yes max must fix this error (old version was ok )
|
#104
|
||||
|
||||
With which the old version of hack it work?
|
#105
|
|||
|
|||
You mean its intended to have to click outside the box to pull up results?
|
#106
|
|||
|
|||
Works with version 1.3
with ajax_search.php here is the content of this file Code:
<?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 think here is the tip... function utf8_to_win($string){ for ($c=0;$c<strlen($string);$c++){ $i=ord($string[$c]); ............................. |
#107
|
||||
|
||||
This function convert utf to windows-1251(cp1251)...
|
#108
|
|||
|
|||
Yes i know byt with the old work with non english and with new no. :|
you have try to include this on new version? |
#109
|
||||
|
||||
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. |
#110
|
||||
|
||||
rmxs, i can, but I do not know if this will work for all. But you can do this for yourself:
Replace this PHP Code:
PHP Code:
|
#111
|
|||
|
|||
Now this version works without any change
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|