![]() |
vB3 Similar Threads
vB3 Similar Threads for 2.2.x
Clone version | 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. Install time: 6 minutes File edits: 1 (showthread.php) Template edits: 1 (showthread) New templates: 2 (showthread_similarthreads, showthread_similarthreadbits) What is it? Basically this hack will check for other similar thread titles within the forum of the thread you are viewing, then it will display the most similar threads, based on a similar-priority setting you choose, at the bottom of that thread. Why did I make it? This hack instantly drew my attention when I first saw it at the Jupiter vB3 forums. I figured it couldn't be that bad to make, and why wait when it's such a simple feature to integrate as a standalone hack? So, I opened up my TextPad and started coding. ;) Personally, I HIGHLY doubt the method and coding I used in my hack is at all similar to the one at Jupiter vB3, but it seems to work just as fine. Even on my small forum the results on some threads look good, while for a large forum such as vB.org the results would look 3x as better. Features:
Bugs? Depending on the priority level you pick, some threads that you are "dead sure" to have a similar result might not show. You might have to toggle the priority level at first, to get it set just right. Other than this, it's fairly clean. See a demo at this thread, scroll to bottom: http://beta.vbulletin.com/vb3/showth...p?threadid=990 Screenshots? Demo's? See the next post for a screenshot. Want a demo? Visit the similar thread feature at the Jupiter vB3 forums :p ------------- Installation ------------- #1. In showthread.php, find: PHP Code:
PHP Code:
PHP Code:
#2. Create a new template called showthread_similarthreads, and place inside: Code:
<table cellpadding="{_tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{_tablebordercolor}" {_tableouterextra} width="{_contenttablewidth}" align="center"> #3. Create a new template called showthread_similarthreadbits, and place inside: Code:
<tr align="center"> #4. In the template showthread, find: Code:
<!-- thread options links --> Code:
$similarthreads ------------- End ------------- That's it! Pretty easy and quick to install, which is the nicest part about it. :) If you use this hack remember, please click install! Without it, you might have had to wait till vB3 ;) |
;) nice work man.
Drk |
Here is that screenshot mentioned (attached)
Hope you all enjoy :cool: |
This is amazing, works like a charm :)
Too bad I can't show off my board :'( If anyone can access http://localhost, feel free to check out my board ;) Drk |
Nobody can access your local host :D
But anyways, glad you enjoy ^_^ |
How does this work?
Does it do a search on the words used in the subject line? |
Quote:
|
Quote:
PHP Code:
I tried using another similar function called levenshtein, which is suppose to have better performance (in speed I guess), but it didn't exactly work, or not as well as similar_text does. At first I did think about putting it through a search, and grabbing the top four or so results, but this is much easier, and only requires one query. ;) Quote:
*goes to fix* |
heh i seenthis hack commign, when i seen the vB3 beta, nice work Velocd, you are definately getting a lot better at this stuff
|
Nice hack, I probably won't install it though lol
|
very nice velocd, i will install this one :)
|
I'm getting the following error:
Warning: Wrong parameter count for trim() in /usr/local/psa/home/vhosts/billsfanzone.com/httpdocs/showthread.php on line 274 |
hmm, that is an odd error.
Try replacing: PHP Code:
PHP Code:
|
Great job!!
|
Good hack.
But a problem is this hack use a whole thread table sql ....slowly. I have 10000+ threads in thread table. Before installed this hack ,my showthread page generated in 0.06433198 seconds ,after installed it this same Page generated in 1.26433198 seconds . Would there be a better way to do this? |
Velocd, you have finally outdone yourself with this hack. Excellent work! I just have a couple of questions...how many queries does this add to the page? Will it add 4 or whatever you have set as the limit? And is 4 a good limit? And lastly, what does previewcharacters actually do? Thanks for the great hack!
/me clicks install! |
Please put the code etc in a .txt file, so unlicenced members can't view it?
|
I'm concerned this would slow things a lot on my forums, can anyone provide more info on whether it's slowed their forums?
|
It will.
|
Thanks Neo. :)
|
Thanx VeloCD!!
This Feature rules. install was very easy on 2.2.5, and works like a charm /me klicks installed!! |
I have this hack installed and have seen it workings only once, I did refresh my browser and looked at another thread and this new hacks doesn't show up anymore.
Very strange. Please does somebody knows what happen or what I did wrong? |
Alright, I screwed up big time somewhere along the lines when I installed this... When I try to view a thread now- its shows this:
<see next post> Yeah, I don't know what to do... Where did I go wrong? How can I fix this? Can someone help me!?!? Thanks... -Kenny |
hmmmm... Now I get:
Quote:
|
Here is my showthread.php BTW:
<Do not post entire files. -Mike> |
Now I get :
Quote:
|
Good to see you releasing more hacks Velocd ;). I won't release this mainly because of the performance hit it generates on our board of a bit more than 850k posts. Great job! I never knew there even was a similar_text(); function LOL. :)
|
Quote:
Quote:
Quote:
Quote:
I'm not too sure what you mean by refreshing and the hack disappearing...maybe you accidentally set the priority level to very high. Quote:
;) |
Quote:
I did do this, and I still have no idea... help me!!! Any ideas? |
Alright, found a backup showthread.php... Starting ALL over again :) (Will keep you updated about whether it works or not...)
|
I tried to install it but it didnt work!!!!
Quote:
|
Quote:
|
Velocd
Good Job Indeed Installs easy ... Works with 2.2.5 .. Works with foriegn language. Thanks. * installs * |
Quote:
|
vb3 stores a list of similar threads along with each thread. This list is generated when the post is made/edited. Scanning the entire thread table on every view of showthread and then running checks on every thread is not the best way to go about this. The list is built from scanning the word table, NOT the thread table. Remember the word table is indexed so we can search for words efficiently. vB3 also only uses the title of the thread to determine something's value as being similar.
The function that searches for posts from search.php is reused for generating this search. Enough information? |
I knew vB3 would have a much improved method, naturally :p
And yes, that was more than enough info ;) Unless you want to give me instructions on how to do all that you just said...just kidding! ^_^' |
if you have a rollerball mouse, go to the first page of this post and bounce back and forward, its fun :) ps i got too many errors with this, uninstalled it
|
Very cool, though I think I will just wait for vB3 to be released...
|
I got parse errors T_VARIABLE dodas. Uninstalled it before I could get an exact copy of the text, sorry. Nice idea. :(
|
This hack shouldn't generate too many errors, being as small and simple that it is. Those of you who are recieving them can only be installing the hack incorrectly. (installed correctly, you should get no parse errors/T_Variable warnings) Ofcourse the hack has performance issues for the larger forums (I have a smaller forum, and my pages still generate at .3 seconds).
Anyway, I'm going to see what I can do to fix it.. :p |
All times are GMT. The time now is 04:48 PM. |
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:
|