Version: 1.00, by Velocd
Developer Last Online: Nov 2023
Version: 2.2.x
Rating:
Released: 12-20-2002
Last Update: Never
Installs: 59
No support by the author.
vB3 Similar Threads =Version 2=
by Velocd
This hack, as well all my other vB2 hacks, I no longer provide support for (being I run vB3 and it's too much hassel to debug vB2). When vB3 Release Candidate comes out, by request I might convert some of my hacks.
Update - Version 2.1
View this post for complete information.
Description:
I recoded the old vB3 Similar Threads hack earlier today, realizing a much better and enhanced method of making it work.
Also, I made a new thread for this hack mainly so it would be better known, since the old one had many unsolved issues.
Improvements:
It no longer compares threads via a similarity or priority level, but rather using a MySQL string-comparison function. I experienced no slow downs on any pages, and many of my pages seem to be generating .20 faster (from the old version).
The comparison between threads is even more accurate and efficient, and best of all requires no toggling of a priority setting like the previous version. The threads are now searched via the one and only query, making things faster.
The hack has been tested on 2.2.6 and 2.2.9, and also does not require the use of PHP function trim(), so older versions of PHP should deal no trouble.
The overall appearance of the hack has been enhanced to look more vB3 as well
The MySQL function MATCH..AGAINST requires MySQL version 3.23.23 or later, else the hack will not operate.
Screenshots:
Refer to the .zip, they are located inside.
Upgrading?
If you are upgrading from the old version, just replace the codechunk.txt file in the location of the old chunk, as well replacing the templates.
---------------
Remember, if you use this hack on your forum, please click the install button! ^__^
side note: once installed, the similar-thread box will not show until you start replying to threads or create new ones. I predict this has something to do with the altering of the field title to FULLTEXT
side note 2: if for some reason you are getting an error about FULLTEXT not being functionable on your thread table, you are running a non-MyISAM table type, and thus must be converted. Run this query to do so:
PHP Code:
ALTER TABLE `thread` TYPE = MYISAM
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Lee, is normal. I explained to you where is the prob few posts above.
Get on my board for the fix, if you really really want to use access masks (it will add another query).
I did try what I thought would account for access masks but it didn't work, probablt the code I used was wrong. I'll take a look at TW.com now, thanks for the info TECK
Originally posted by TECK Lee, is normal. I explained to you where is the prob few posts above.
Get on my board for the fix, if you really really want to use access masks (it will add another query).
How is having access masks off on a forum even feasible for most people? I have a admin/mod forum, if I turn access masks off, non admins/mods can view the board.
Originally posted by NTLDR I did try what I thought would account for access masks but it didn't work, probablt the code I used was wrong. I'll take a look at TW.com now, thanks for the info TECK
Heh, I didn't know also. Chen was kind to show me a trick, is pretty complex (at least for me)
Slick hack, but I'd prefer a LINK ~~ rather than assuming each user wants to "view similar threads" every showthread.php page view.
Also, it seems like this hack is a LOT of work just to duplicate functionality that's already built into search.php
(select a subforum // search in titles only )
In showthread.php, you might want (need) to check $searchenabled and $cansearch values
and conditionally null the template if search isn't currently enabled...
but piping it to search.php would take care of:
-- PARENT/sibling title searches
-- permissions
-- runs the title text through BADWORDS
In other words, I'm suggesting that you try this approach:
Create a link to search.php (essentially, a submit button)
& pass post['title'] and forumid as hidden fields
(user sees nothing other than a button, or link, labeled "find similar threads")
Originally posted by sparky2 Slick hack, but I'd prefer a LINK ~~ rather than assuming each user wants to "view similar threads" every showthread.php page view.
Also, it seems like this hack is a LOT of work just to duplicate functionality that's already built into search.php
(select a subforum // search in titles only )
In showthread.php, you might want (need) to check $searchenabled and $cansearch values
and conditionally null the template if search isn't currently enabled...
but piping it to search.php would take care of:
-- PARENT/sibling title searches
-- permissions
-- runs the title text through BADWORDS
In other words, I'm suggesting that you try this approach:
Create a link to search.php (essentially, a submit button)
& pass post['title'] and forumid as hidden fields
(user sees nothing other than a button, or link, labeled "find similar threads")
That sounds interesting. Could you come up with something like that?