The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Mysql 4 Search hack Details »» | |||||||||||||||||||||||||
MySQL 4 Search hack for Vbulletin 2.x.x - version 1.2 beta
Author: PineappleClock (pineappleclock@clockcrew.cc) aim: Janitor61 ------------------------------------- Overview The MySQL 4 search hack modifies the search functionality in Vbulletin to take advantage of the new SQL functions available in MySQL 4. Synopsis This hack allows MySQL to index the posts and threads in your BBS instead of requiring vbulletin to do it. This hack, when installed, will change the BBS in the following ways:
File Listing install.txt -- the installation howto simplesearch.txt -- a block of code that replaces a block of code in search.php searchtemplate.txt -- a vbulletin template used for drawing the search form. Requirements MySQL 4.0.1 or newer - required vbulletin 2.x.x - required (i've only tested it on 2.3.0 though) How to check your MySQL version: execute the following query: Code:
SELECT @@global.version Notes The installation instructions assumes that you have access to database management software, like phpMyAdmin. If you can't edit your database directly, I can make a php script that will modify your database if there's enough demand. The Vbulletin team aren't going to put in support for MySQL 4 until version 3.1 - so this hack should be obsolete by then. If you'd like to see the modified search engine, go here: http://www.clockcrew.cc/bbs/search.php I was originally going to distribute the whole modified search.php file, but after reading the rules, im only distributing the modified part. Please let me know if you spot any bugs, etc. I've tested this, but there still are probably bugs i need to work out. update [Apr 17]: added instructions on uninstalling good luck! Show Your Support
|
Comments |
#52
|
||||
|
||||
Good idea papoo. I was trying to figure out a way to make sure the " marks didn't appear in the url, but your method seems to work just fine.
|
#53
|
|||
|
|||
Papoo is the king of ereg_replace :laugh:
Very nice hack ! Thanks so much... :banana: |
#54
|
|||
|
|||
The ereg_replace method above doesn't work for me, and if it did I'd be kind of leary of it since it's basically taking a step backward and really not solving the problem. (no offense to Papoo)
I've been comparing the original vBulletin search.php and the changes Traekwon made, seeing if I can figure out what the problem is for some of us. From what I can see it involves problems with quotes (") and extra plus signs (+) being inserted in queries, even single word queries... it's like the search thinks there is more than one word no matter what. Of particular interest is the urldecode() lines that Traekwon seems to have removed... if I add it back for the masterquery (ie $masterquery = urldecode($masterquery); I can sort of get it working better, but not perfect. Where did Traekwon drop off the face of the planet to, anyway. |
#55
|
|||
|
|||
this worked for me:
Code:
$search[querystring]=urlencode($search[querystring]); Code:
$search[querystring]=ereg_replace('[%2B|+]','',$search[querystring]); |
#56
|
|||
|
|||
This seriously sounds like a great hack.
But Im unable to test at your site (http://www.clockcrew.cc/bbs/search.php) as I keep getting this : Code:
There seems to have been a slight problem with the clockcrew bbs database. Please try again by pressing the refresh button in your browser. An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists. We apologise for any inconvenience. |
#57
|
|||
|
|||
Welp, I'm afraid I must uninstall this hack.
The lack of search terms being parsed right in the results (for highlighting) is just too annoying, and the only fixes I and others like me have been able to come up with are ereg_replace workarounds. It's like taking 2 steps forward and one step back... What a shame... |
#58
|
||||
|
||||
I've stopped using the highlight term feature for over 1 year now since I have static URLs. So it's not a big loss.
|
#59
|
|||
|
|||
Hello...
I have an interest in using this hack for AVS Forum and TiVo Community Forum for the sites are large and past the point that the normal can be run without hurting the system. In the site that the author lists as a test to see it in action...I find that "search for exact phrase:" does not seem to work at all and only returns that nothing is found. Not even if you try one one. So..anyone know anything about this or has anyone seen the author of the hack posting anything, or updates, about this hack? Thanks |
#60
|
||||
|
||||
That feature works for me - I am able to find exact phrases - note that this hack automatically stops you from finding words that are too common automatically.
|
#61
|
|||
|
|||
Pondering...so if you search for a phrase that has a word that is too common in it, then it will return nothing.
Also... I think people are finding this search faster because of the limit statements in the search statements. Has anyone tried removing them all together? My guess is it would slow down again. I have had to add limit statements to all of my searches and give the user an option to search with the number of returns, with the default being the lowest number of returns. The issue though when they look for more than one word. It will find the first set (say 500) and then look for the second word in only that 500 found. Gets worse with more that 2 words as you may guess. In any case, we have found it is not the search itself, but the large number of returns that can sometime happen and TMP files need to be made for this. During that time, tables are locked and this the major slowdown on busy sites. We just went MySQL ver 4 on new server and are currently going to be testing. I only hope MySQL 4 is much better in this reguard. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|