![]() |
=V.2= vB3 Similar Threads
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:
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:
|
Nice....i dont hack my board any more though....
|
In the install file for this hack, you said to do this:
Code:
c. Modify the values "$limit" and "$type" to your preference. |
Also, I replied to a thread, but no Similar thread box showed up. Will it only show "New" threads that are similar, or will it pick up the old ones once the threads are created or replied to?
EDIT: I got it working. I had to put the code under "Show Threads" instead of "Show Posts", like you have in your install file. :) Is there a way to get the last poster to list also? |
Thanks for making a better hack!!
|
Thanks:)
Satan |
With your hack, you will display all private forum threads, if they match the text. You need to use perms for this in order to make it efficient.
I install it, but heavily modified based on forum perms. ;) Here it is the code I used: Code:
$similarthreads = ''; BTW, thanks for a great hack! |
phpmyadmin said:
The used table type doesn't support FULLTEXT indexes Why? |
nice hack - I won't be installing it though.
|
Heh, thanks for providing that Teck, I had figured another way to do it but a bit tacky and lazy on my part ;)
PHP Code:
|
Alright, the .zip has been updated with version 2.1.
Updated: + Added permission check, with thanks going to Teck for supplying the code. ;) + Enhanced "last poster" information, requested by Boofo + Updated screenshot To upgrade from V2: Just update the template1.txt and the codechunk.txt over the previous code. |
Quote:
|
[high]* TECK clicked Install :p :D
[/high] Btw, the perms will add 2 queries, for a total of 3. But is better then editing every time the showthread.php, once you change the perm settings. |
Quote:
mysql v3.23.54 |
What about your vBulletin version? This hack has been tested on 2.2.6 and 2.2.9, thus suggesting it should work for 2.2.7 and 2.2.8 as well. If there are issues with older versions, I'll need to modify the vB database info of this hack.
|
Quote:
Code:
<?php Once uploaded, load it through your browser and let me know if you get any errors. If you do, post them here... |
Velocd, is working on 2.2.8 for sure. :)
|
Quote:
|
Forget about phpmyadmin, do what I asked you... please.
|
Quote:
The used table type doesn't support FULLTEXT indexes Same error... Maybe I must check my thread table. |
Hmm, it looks like your table is not set as MyISAM? Only the MyISAM table type supports FULLTEXT indexes...
Are you sure about the MySQL ver? |
I installed the hack and it seems to work fine on my forum except one thing. My forum jump stopped working! See for yourself, http://forums.zforcenetwork.com/show...0111#post10111
|
Heh, is my perms that kill it... I will post a fix... I don't use forumJump because it saves me 2 queries. :p
|
Quote:
|
Velocd, I'll let you have fun. :)
Look at the function makeforumjump(). Guys, just disable the forumJump it will save you 2 queries all over the board... who use it anyway to navigate? Nobody. |
Quote:
|
Quote:
My thread table is ISAM. Thanks. |
I've disabled my forumjump for the time eing. :bunny:
|
I was at first pondering if there was a way to combine the forum permissions in forum jump function with that of this hack, but then after reading your post Teck it dawned on me that I never do use the forum jump..and it is quite useless.. :p (another 2 queries saved.. ^_^)
If you wanna solve your problem still Xianx, place the code in codechunk.txt under makeforumjump(), and that should do it. |
Just unset $iforumcache and $ipermcache, that should do it... if you really want to have both sets of queries... But I find it useless, IMO. Just kill the forumJump. :)
|
xware, back up your database just incase of any freak errors occur, and then run this query to convert to MyISAM:
PHP Code:
|
Quote:
Works well now. Thank you! |
Quote:
I've changed: PHP Code:
PHP Code:
[high]* NTLDR clicks install :D[/high] |
The line you changed was already in the version I downloaded last night. Is there another version out?
When I put the code in the old spot (from the first version) it also worked without having to update anything. I could never get it to work under the "Show Posts" area, only under the "Show Threads" area. Could that have something to do with it? |
It's not suppose to go under the "Show Posts" area, this hack is meant to show when viewing a thread, therefore it goes in the "show threads" area. Check the new version and its more clear in the instructions now.
In the original version I did have your suggestion NTLDR, but for some reason took it out upgrading. It has been re-added. ;) |
I couldn't find the line in the "Show Threads" section (it was only in the "Show Posts" section for me) to add the codechunk to so I added it ABOVE this piece of code (like you had in your release of the first version):
Code:
if ($noshutdownfunc) { Also, I do not have a "$discluded" variable to set at all in the codechunk file. |
Ok, another problem. I lost the forums listing in the forumjump now. When you view a thread, they are no longer there. They are there when viewing a forum, though. Any idea on how to fix this?
|
For some reason, this version doesn't work as good as the last one ... I get all sorts of thread title matches that don't have any simularities!
What thread titles is this version trying to read? Cause it aint reading them right! [revert to original in a hurry!] |
Rolodex, try putting the chunkcode above this line and see if that helps. It fixed my forumjump problem and the threads are only showing similar threads if they really ARE similar. Let me know if it works for you.
Code:
eval("dooutput(\"".gettemplate("showthread")."\");"); |
It's much more accurate for me, not to mention the pages load way faster ^________^
Boofo, refer to the 2nd page about your problem with the forum jump, that issue was already brought up. |
All times are GMT. The time now is 06:04 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|