Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools
=V.2= vB3 Similar Threads Details »»
=V.2= vB3 Similar Threads
Version: 1.00, by Velocd Velocd is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

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 `threadTYPE MYISAM 

Show Your Support

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

Comments
  #72  
Old 12-24-2002, 11:28 AM
TheComputerGuy's Avatar
TheComputerGuy TheComputerGuy is offline
 
Join Date: Oct 2001
Location: TX
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

TECK, thanks for offering what you did, but it doesn't work properly, I tried to uninstall the hack and my forum jump does not work
  #73  
Old 12-24-2002, 11:53 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I enabled the forumJump just for you. I will take it off tomorrow...
Use tester/test to login onto my board and see that it's working.

View this forum, for example:
http://www.teckwizards.com/forum/for....php?forumid=5
  #74  
Old 12-24-2002, 02:09 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@sparky2: yeah, that is certainly possible, but that would cancel out the purpose of this hack being named as "vB3 Similar Threads," as it is suppose to visually look and function like the vB3 feature over at vBulletin.com. Despite the fact that I use a mySQL function MATCH..AGAINST which is probably not as efficient compared to the method Freddie used, which he explained here, but oh well.... this version works well enough for me.

Feel free to make that request yourself, as it surely isn't difficult to do.
  #75  
Old 12-24-2002, 03:18 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, in VB2 the word table is not indexed... and I think that Freddie used there several LEFT JOIN's which also affect the performance...
  #76  
Old 12-24-2002, 07:56 PM
TheComputerGuy's Avatar
TheComputerGuy TheComputerGuy is offline
 
Join Date: Oct 2001
Location: TX
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

TECK, you da man as usual, I will retry on a clean showthread file. Your recommendation for where to place it...Do i place chunk.txt right above the last line? I believe that is the part I got confused on

Thank you so much for helping me.
  #77  
Old 12-25-2002, 01:01 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by TheComputerGuy
Your recommendation for where to place it...Do i place chunk.txt right above the last line? I believe that is the part I got confused on

Thank you so much for helping me.
Notice the [high]// Velocd's code here...[/high] part? Replace that line with the chunkcode (that makes me think of biscuits, heh)...
  #78  
Old 12-27-2002, 11:18 AM
sparky2 sparky2 is offline
 
Join Date: Jul 2002
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by TECK
Well, in VB2 the word table is not indexed...
Huh???

run this query:
show create table word

and you'll see that both (of the 2) columns are indexed
  #79  
Old 12-27-2002, 05:46 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually it might vary from version sparky2, as both of my columns in the word table are not indexed (running on 2.2.6)

It's not that significant anyway
  #80  
Old 12-29-2002, 06:28 AM
VirtueTech VirtueTech is offline
 
Join Date: Oct 2001
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It appears "freddie" was right that this was not the most optimized way to go about "similar threads".

Code:
Query: SELECT

thread.threadid,thread.lastposter,thread.title,thread.postusername,thread.replycount,thread.

lastpost,thread.postuserid,
			thread.dateline,forum.title AS

ftitle,forum.forumid,forum.parentlist
			FROM thread
			LEFT JOIN forum ON (thread.forumid=forum.forumid)
			WHERE thread.threadid<>256184 AND thread.forumid IN( 192,62,186,65,64,60,187,271,59,61,138,228,127,214,265,67,68,69,70,71,72,73,74,123,142,232,137,227,66,212,145,234,166,125,216,124,215,141,231,139,229,144,233,126,213,131,219,247,129,130,218,146,235,128,217,269,270,140,230,147,236,143,221,135,225,136,226,165,168,167,164,132,220,133,222,134,223,177,178,183,267,13,190,18,162,2,1,12,15,9,4,169,25,188,29,10,19,24,23,33,31,30,53,39,55,56,172,41,42,17,7,27,37,26,16,28,20,32,38,47,179,44,173,303,22,46,45,11,5,51,170,49,50,52,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,149,150,151,152,148,153,154,155,156,157,158,159,160,161,224,174,175,171,180,3,185,264,34,204,21,195,57,304,194,197,198,199,196,200,208,205,201,202,203,268,207,210,211,266,305,273,277,289,278,274,276,275,288,293,292,291,279,286,287,285,298,282,284,290,299,302,301,300,295,297,296 )
			AND MATCH(thread.title) AGAINST ('old stock from closed store-cocker stuff, lots of redz and more')
			AND thread.open<>10
			AND thread.visible=1
			ORDER BY dateline DESC
			LIMIT 4
Time before: 0.39137995243073
Time after:  3.3633810281754
Check out the delay!

Nice try though. I was excited that you had made this hack...too bad I can't use it. Thanks anyway.
  #81  
Old 12-29-2002, 06:40 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah yes, but I could defiantly understand why with your forums VirtueTechy--they're massive

Then again, this version of the hack is more improved from the last, in the major effect that it will compare threads to the current thread viewing until it has gathered whatever you set as "LIMIT", in your case 4. (in contrast to the old version where it would retrieve ALL threads, then compare). Not to mention, your forum must have dozens of threads with similar titles, so this hack shouldn't have a problem finding 4 similar threads and quickly. Then again, each similar thread could be seperated by 300 non-similar threads, thus having to read more.

This hack still proves very useful for the smaller forums, such as mine with 1,938 threads and not the slightest decrease in performance.
Closed Thread


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 04:14 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
  • Page Generation 0.05212 seconds
  • Memory Usage 2,314KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_php
  • (2)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
  • (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