PDA

View Full Version : vB3 Similar Threads


Velocd
08-16-2002, 10:00 PM
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:

Displays everything that the vB3 similar threads does.
Also gives a description of the thread, only if you have the thread-description hack installed. (source: here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=38916&highlight=thread+descriptions))


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/showthread.php?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:

if ($noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";
}

if ($bbuserinfo[cookieuser]) {
vbsetcookie("bbthreadview[$threadid]",time(),0);
}


Above it place:

//////////////////////////////////////////////////
// vBulletin3 Similar Threads "clone" by Velocd //
//////////////////////////////////////////////////

//////////////////////////// CONFIGURE ////////////////////////////////
$description_option = 0; //1 = on, 0 = off. (use only if you have THREAD descriptions installed)
if($description_option){ $desc = ",description"; }
$limit = 4; //Set the limit to the maximum amount of results to display
$priority = 60; //KEY: [less accurate, more results <0 --- 25 ---- 50 ---- 75 --- 100> more accurate, less results]
$previewcharacters = 150; //Amount of characters shown in the preview
///////////////////////////////////////////////////////////////////////

$rthreads=$DB_site->query("SELECT threadid,title,postusername,replycount,lastpost,po stuserid,dateline$desc
FROM thread
WHERE forumid='$thread[forumid]'
ORDER BY dateline");

$validtitle = trim(strtolower($thread[title])," \t.");
$count = 0;

while ($rthread = $DB_site->fetch_array($rthreads)) {
$validthread = trim(strtolower($rthread[title])," \t.");

similar_text($validtitle, $validthread, &$similarity);

if($similarity > $priority){
$similar[title] = $rthread[title];
$similar[threadid] = $rthread[threadid];
$similar[postusername] = $rthread[postusername];
$similar[postuserid] = $rthread[postuserid];
$similar[replycount] = $rthread[replycount];
$similar[date] = vbdate($dateformat,$rthread[lastpost]);
$similar[description] = $rthread[description];


if (strlen($similar[description]) > 150) {
$similar[description] = substr($similar[description], 0, $previewcharacters) . "..."; } else {
$similar[description] = $similar[description];
}

if($similar[threadid] != $thread[threadid] && $count < $limit){
$count++;
eval("\$similarthreadbits .= \"".gettemplate("showthread_similarthreadbits")."\";"); }
}
}

if($count != 0){
eval("\$similarthreads .= \"".gettemplate("showthread_similarthreads")."\";"); }

////////////////////////////
// End Similar Threads /////
////////////////////////////


Now look at this block of code from above:

//////////////////////////// CONFIGURE ////////////////////////////////
$description_option = 0; //1 = on, 0 = off. (use only if you have THREAD descriptions installed)
if($description_option){ $desc = ",description"; }
$limit = 4; //Set the limit to the maximum amount of results to display
$priority = 60; //KEY: [less accurate, more results <0 --- 25 ---- 50 ---- 75 --- 100> more accurate, less results]
$previewcharacters = 150; //Amount of characters shown in the preview
///////////////////////////////////////////////////////////////////////


As detailed, those variables change how this hack works. The main thing you need to notice is $priority, which at default is set at 60, which I've found on my forums to be good. As said in the KEY in comments, a higher priority will get you more accurate similar threads, but less results. Ofcourse, a high priority is ideal for a large forum. Lower priority vice versa.


#2. Create a new template called
showthread_similarthreads, and place inside:

<table cellpadding="{_tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{_tablebordercolor}" {_tableouterextra} width="{_contenttablewidth}" align="center">
<tr><td>
<table cellpadding="4" cellspacing="{_tableinnerborderwidth}" border="0" {_tableinnerextra} width="100%">
<tr>
<td bgcolor="{_tableheadbgcolor}" width="{_tablewidth}" colspan="4" align="center">
<normalfont color="{_tableheadtextcolor}">
<b>Similar Threads</b></normalfont></td>
</tr>
<tr align="center" bgcolor="{_categorybackcolor}" background="https://vborg.vbsupport.ru/images/catagory_backing.gif">
<td align="center" nowrap><span><smallfont><b>Thread</b></smallfont></span></td>
<td nowrap><span><b><smallfont>Thread Starter</smallfont></b></span></td>
<td nowrap><span><smallfont><b>Replies</b></smallfont></span></td>
<td nowrap><span><smallfont><b>Last Post</b></smallfont></span></td>
</tr>
$similarthreadbits
</table>
</td></tr></table>
<br>


In the code above, take out all the underscores (ie. _) out of the replacement variables, such as {_tablewidth}, or else they will not work.

#3. Create a new template called showthread_similarthreadbits, and place inside:

<tr align="center">
<td width="60%" align="left" bgcolor="{_firstaltcolor}"><normalfont>
<a href="showthread.php?s=$session[sessionhash]&forumid=$thread[forumid]&threadid=$similar[threadid]"
title="$similar[description]">$similar[title]
</a></normalfont></td>
<td width="20%" bgcolor="{_secondaltcolor}" nowrap="nowrap"><normalfont>
<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$similar[postuserid]">$similar[postusername]
</a></normalfont></td>
<td bgcolor="{_firstaltcolor}"><normalfont>$similar[replycount]</normalfont></td>
<td bgcolor="{_secondaltcolor}" width="20%"><normalfont>$similar[date]</normalfont>
</td>
</tr>


In the code above, take out all the underscores (ie. _) out of the replacement variables, such as {_secondaltcolor}, or else the colors wont show.

#4. In the template showthread, find:

<!-- thread options links -->
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#0A293E" align="center"><tr><td>


On the line above it place:

$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 ;)

DrkFusion
08-16-2002, 11:01 PM
;) nice work man.

Drk

Velocd
08-16-2002, 11:05 PM
Here is that screenshot mentioned (attached)

Hope you all enjoy :cool:

DrkFusion
08-16-2002, 11:26 PM
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

Velocd
08-16-2002, 11:31 PM
Nobody can access your local host :D
But anyways, glad you enjoy ^_^

DrkFusion
08-16-2002, 11:58 PM
How does this work?
Does it do a search on the words used in the subject line?

pattox2k1
08-17-2002, 12:07 AM
#4. In showthread.php, find:

code:
<!-- thread options links -->
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#0A293E" align="center"><tr><td>




On the line above it place:

code:
$similarthreads


that aint in the showthread.php file......do you mean the template? cause i put it in the template and it dosent show anything......

Velocd
08-17-2002, 12:11 AM
How does this work?
Does it do a search on the words used in the subject line?

No, it uses a function called similar_text, which calculates the similarity between two strings.


similar_text($validtitle, $validthread, &$similarity);


Once it finds the similarity, I compare it to the user-defined priority level of similarity between threads.

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. ;)

that aint in the showthread.php file......do you mean the template? cause i put it in the template and it dosent show anything......

:rolleyes: why, yes! that is what I mean :p
*goes to fix*

ULTIMATESSJ
08-17-2002, 12:16 AM
heh i seenthis hack commign, when i seen the vB3 beta, nice work Velocd, you are definately getting a lot better at this stuff

[D]Vincent
08-17-2002, 01:32 AM
Nice hack, I probably won't install it though lol

joeboo
08-17-2002, 01:51 AM
very nice velocd, i will install this one :)

lordofgun
08-17-2002, 03:40 AM
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

Velocd
08-17-2002, 03:46 AM
hmm, that is an odd error.

Try replacing:

$validtitle = trim(strtolower($thread[title])," \t.");
$count = 0;

while ($rthread = $DB_site->fetch_array($rthreads)) {
$validthread = trim(strtolower($rthread[title])," \t.");


With:

$validtitle = trim($thread[title]," \t.");
$validtitle = strtolower($validtitle);
$count = 0;

while ($rthread = $DB_site->fetch_array($rthreads)) {
$validthread = trim($rthread[title]," \t.");
$validthread = strtolower($validthread);


My guess is you are using possibly an older version of PHP maybe, and it's not functional with more than one parameter..(something like that)..:P

MrLister
08-17-2002, 04:40 AM
Great job!!

xware
08-17-2002, 05:59 AM
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?

Boofo
08-17-2002, 07:01 AM
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!

Floris
08-17-2002, 09:25 AM
Please put the code etc in a .txt file, so unlicenced members can't view it?

Tim Wheatley
08-17-2002, 10:05 AM
I'm concerned this would slow things a lot on my forums, can anyone provide more info on whether it's slowed their forums?

Neo
08-17-2002, 11:31 AM
It will.

Tim Wheatley
08-17-2002, 12:03 PM
Thanks Neo. :)

Kars10
08-17-2002, 02:22 PM
Thanx VeloCD!!
This Feature rules. install was very easy on 2.2.5, and works like a charm
/me klicks installed!!

xug
08-17-2002, 02:32 PM
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?

kenny@ecn
08-17-2002, 03:06 PM
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

kenny@ecn
08-17-2002, 03:09 PM
hmmmm... Now I get:


Parse error: parse error in /home/virtual/site57/fst/var/www/html/showthread.php on line 96

kenny@ecn
08-17-2002, 03:09 PM
Here is my showthread.php BTW:

<Do not post entire files. -Mike>

kenny@ecn
08-17-2002, 03:47 PM
Now I get :

Fatal error: Call to a member function on a non-object in /home/virtual/site57/fst/var/www/html/showthread.php on line 91

Gamingforce
08-17-2002, 03:52 PM
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. :)

Velocd
08-17-2002, 05:21 PM
Originally posted by xware
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?
Originally posted by Gamingforce
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. :)

Yea, I know the only problem is the performance issue for larger forums. Since this hack does check all threads within that particular forum. I'm going to look into the hack, to possible see if there is a fix for this. I wonder what vB3 does :rolleyes:

Originally posted by xiphoid
Please put the code etc in a .txt file, so unlicenced members can't view it?

Unlicensed members can't even view the "full releases" forum anyway, so it shouldn't matter too much. I usually only put things in text files if the hack is very long.

Originally posted by xug
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?

Depending if you have a small forum or not will determine how many results you get from similar threads. Ofcourse if you set the priority level to very low, like 20, more results will show, although they might not be all that related to the thread.

I'm not too sure what you mean by refreshing and the hack disappearing...maybe you accidentally set the priority level to very high.


Originally posted by kenny@ecn
hmmmm... Now I get:
Fatal error: Call to a member function on a non-object in /home/virtual/site57/fst/var/www/html/showthread.php on line 91



Uninstall the hack, and reinstall it again carefully. I'm not sure what your error is because I'm sure our files are different. If you are getting a parse error, you may have not copied my code exactly, or may have modified it and dropped something out.

;)

kenny@ecn
08-17-2002, 05:46 PM
Uninstall the hack, and reinstall it again carefully. I'm not sure what your error is because I'm sure our files are different. If you are getting a parse error, you may have not copied my code exactly, or may have modified it and dropped something out.

;)



I did do this, and I still have no idea... help me!!! Any ideas?

kenny@ecn
08-17-2002, 06:25 PM
Alright, found a backup showthread.php... Starting ALL over again :) (Will keep you updated about whether it works or not...)

kenny@ecn
08-17-2002, 06:32 PM
I tried to install it but it didnt work!!!!


Parse error: parse error in /home/virtual/site57/fst/var/www/html/showthread.php on line 277

Would you like to try?

DemiNeo0101
08-17-2002, 07:22 PM
Originally posted by DrkFusion
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

hey a kiddie porn website.... I mean errr NM ^^

MalaK_3araby
08-17-2002, 09:50 PM
Velocd

Good Job Indeed
Installs easy ... Works with 2.2.5 .. Works with foriegn language.

Thanks.

* installs *

nuno
08-17-2002, 09:56 PM
Originally posted by kenny@ecn
Here is my showthread.php BTW:
yadda yadda


It's against the license agreement to post full vB .php files :eek:

Freddie Bingham
08-17-2002, 10:56 PM
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?

Velocd
08-18-2002, 03:05 AM
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! ^_^'

proxyMX
08-18-2002, 04:39 AM
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

Attrox
08-18-2002, 02:50 PM
Very cool, though I think I will just wait for vB3 to be released...

CJi
08-18-2002, 03:49 PM
I got parse errors T_VARIABLE dodas. Uninstalled it before I could get an exact copy of the text, sorry. Nice idea. :(

Velocd
08-18-2002, 06:18 PM
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

The Realist
08-18-2002, 08:06 PM
Were are the pages for this hack generated and is there a way to test it works?

Installed but so far no errors?

Regards,

Brian

newsguy
08-19-2002, 09:15 PM
Thank you for this hack!

Installed nicely.

The relevance of the similar threads, though, is not all that great, even with tweaking the $priority variable.

But it's still a nice feature.

memobug
08-20-2002, 04:01 AM
step #2:

<tr align="center" bgcolor="#336D95" background="https://vborg.vbsupport.ru/images/catagory_backing.gif">

Other than the "catagory" typo is there a recommended image? or just zap it?

Regards,

Matt

Velocd
08-20-2002, 05:08 AM
<tr align="center" bgcolor="{_categorybackcolor}"> ,without the space ofcourse.

I'm actually not sure what you're talking about, but give that a try (very late..sleepy..must get sleep O_O)

Darth Cow
08-23-2002, 08:00 AM
You might want to only select threads from, say, the last month to help aliviate the performance issue.

memobug
08-24-2002, 06:08 AM
Minor bug -

1) The similar threads search occasionally pulls up the title of a post that was Moved (with redirect) to another forum.

The result is that if you click on one of those, you'll get a screen with header and message title but no body, and the forum thinks it's an empty poll or something.

2) Looks like this:

http://forum.bonsaitalk.com/showthread.php?s=&forumid=14&threadid=1634

3) I'm thinking it would be possible to fix this because the forum's internal search never returns redirected posts, so there must be a flag or prefix or something to identify them.

4) If you don't know what's going on, it is a little bewildering, but it did give me the idea for a new hack:

SHOW/PURGE REDIRECTS!

I having to jump through hoops to purge a redirect. You have to move it back to the original forum, then move it forward. If there were a hack to display or purge redirects older than XX days, it would be very cool!

Regards,

Matt

Craigr
09-15-2002, 02:15 PM
Originally posted by Velocd
hmm, that is an odd error.

Try replacing:

$validtitle = trim(strtolower($thread[title])," \t.");
$count = 0;

while ($rthread = $DB_site->fetch_array($rthreads)) {
$validthread = trim(strtolower($rthread[title])," \t.");


With:

$validtitle = trim($thread[title]," \t.");
$validtitle = strtolower($validtitle);
$count = 0;

while ($rthread = $DB_site->fetch_array($rthreads)) {
$validthread = trim($rthread[title]," \t.");
$validthread = strtolower($validthread);


My guess is you are using possibly an older version of PHP maybe, and it's not functional with more than one parameter..(something like that)..:P

I had the same problem on my board:
Warning: Wrong parameter count for trim() in showthread.php on line ???

I tried replacing this, but it still doesn't work.

Any ideas? I have the store hack added too.

Thanks
Craig

Velocd
09-16-2002, 06:45 PM
I'm guessing maybe you're on an older PHP version maybe, and it's not updated for the correct parameters..

Anyway, try replacing:


$validtitle = trim(strtolower($thread[title])," \t.");
$count = 0;

while ($rthread = $DB_site->fetch_array($rthreads)) {
$validthread = trim(strtolower($rthread[title])," \t.");


With just:


$validtitle = trim($thread[title]);
$validtitle = strtolower($validtitle);
$count = 0;

while ($rthread = $DB_site->fetch_array($rthreads)) {
$validthread = trim($rthread[title]);
$validthread = strtolower($validthread);

Craigr
09-17-2002, 01:50 PM
I did that, but got the same error.

Craig

speedway
09-20-2002, 06:06 AM
It seems that the additional parameter for the "trim" function was introduced in PHP 4.1 - so for those of us under that this hack will not work.

From php.net

trim
(PHP 3, PHP 4 )

trim -- Strip whitespace from the beginning and end of a string
Description
string trim ( string str [, string charlist])


Note: The optional charlist parameter was added in PHP 4.1.0




Velocd - you should edit your original thread to reflect this requirement - so people do not try to install this if they do not meet the PHP requirement.

LangTuDaTinh
09-21-2002, 05:03 AM
great...thanks

Craigr
09-21-2002, 05:16 PM
Originally posted by speedway
It seems that the additional parameter for the "trim" function was introduced in PHP 4.1 - so for those of us under that this hack will not work.

From php.net


Boo hoo. My host is running php version 4.0.6. :(

Does this mean when vb3 comes out, similar threads still won't work?

Craig

Dan Flynn
09-23-2002, 03:50 AM
Sweet, He I found this in a the thread. Were is the I install button for this. You deserve criedit for this for sure. Very Nice.

One Question? How can I change the black color font to white?

Thanks

Crazy Pete
12-03-2002, 05:19 PM
Well I'm having a problem even with the first step in this hack. The code you say to find in showthread.php, I don't have. I'm running v.2.2.9. What my showthread.php file for that section looks like is:

if ($noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";
}

if ($bbuserinfo[cookieuser]) {
set_bbarraycookie('threadview', $threadid, time());
}


I've tried adding the code you have above this (as the noshutdownfunc is similar), but that gave me a parse error on line 80, which is:
if($description_option){_$desc_=_",description";_}

Even commenting out the description lines did nothing but cause more parse errors. I'm sure I've installed this correctly, but being that the code bits are different, what might I have to change? This looks like a really cool hack that I'd definitely like to try out, so any help would be much appreciated. Thanks!

Erwin
12-03-2002, 07:51 PM
FWIW, this hack is working great for me on 2.2.9 - but I installed it from 2.2.8 and upgraded.

ptm
12-18-2002, 10:48 PM
Hello,

I installed it like the instructions said. I noticed that the instructions weren't exactly correct at the part where it says "if ($noshutdownfunc)..." but I thought I might still work if others said it works for them. So I installed it, and I'm getting 2 errors you can see at http://forums.pdaperformance.com/showthread.php?threadid=84

I'm don't know anything about PHP (though I do know C and C++) so I don't know what this means...

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of similar_text(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/pdacom/public_html/forums/showthread.php on line 281

Warning: Cannot add header information - headers already sent by (output started at /home/pdacom/public_html/forums/showthread.php:281) in /home/pdacom/public_html/forums/admin/functions.php on line 1573

(end of errors) PHP 4.2.3 and mySQL 3.23.53a is installed.

This hack looks like something I really need, so I would like to get it up and running as soon as possible. Any help would be greatly appreciated. :)

Thank you,
Parker

ptm
12-18-2002, 10:56 PM
Oh, let me mention I'm running VBulletin 2.2.9.

ptm
12-19-2002, 12:20 AM
Please help! :)

Bison
12-19-2002, 02:47 PM
Tested this on my test board, and I cant get it to show up ...

NTLDR
12-19-2002, 02:52 PM
Threads only appear if there similar. Create a thread called Test 1 and one called Test 2, look at one of them and it should work.

Bison
12-19-2002, 03:15 PM
BINGO!

I forgot to add the $similarthreads above the <!-- Template Options ---> in the showthread template!

Thanks!

ptm
12-19-2002, 04:12 PM
Would you please explain what you did to make it work? I'm getting all kinds of errors.

ptm
12-19-2002, 04:54 PM
Hello,

I installed it like the instructions said. I noticed that the instructions weren't exactly correct at the part where it says "if ($noshutdownfunc)..." but I thought I might still work if others said it works for them. So I installed it, and I'm getting 2 errors you can see at http://forums.pdaperformance.com/sh...php?threadid=84

I'm don't know anything about PHP (though I do know C and C++) so I don't know what this means...

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of similar_text(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/pdacom/public_html/forums/showthread.php on line 281

Warning: Cannot add header information - headers already sent by (output started at /home/pdacom/public_html/forums/showthread.php:281) in /home/pdacom/public_html/forums/admin/functions.php on line 1573

(end of errors) PHP 4.2.3 and mySQL 3.23.53a is installed.

This hack looks like something I really need, so I would like to get it up and running as soon as possible. Any help would be greatly appreciated.

I'm assuming this hack doesn't work with PHP 4.2?

Thank you,
Parker

Bison
12-20-2002, 05:21 AM
let's take a peek at your showthread.php (Send [PM] it to me) ...

Velocd
12-20-2002, 04:31 PM
It shouldn't be an issue of your PHP or MySQL version, as I am running PHP 4.2.3 and mySQL 3.23.54 and it works fine.

I have heard of issues with this on vBulletin 2.2.9, which is what you are running, so there could be some conflicts there. I do not have 2.2.9 installed, except on my localhost, so I will install this hack there and get back to you a.s.a.p

Thanks for contacting me via PM also ptm, as it's the best way for those needing help with one of my hacks to get my attention, in addition to replying to the thread. ;)

ptm
12-20-2002, 04:33 PM
Velocd,

Thank you for your time and help. :) Next time when I install another modification I will be sure to PM the author.

- Parker

Boofo
12-20-2002, 04:44 PM
Velocd, don't bother setting it up on 2.2.9. I am running that version and this works fine for me. I installed it a few days ago. :)

ptm
12-20-2002, 04:53 PM
Well it's not working on mine. :eek:

Boofo, would you PM me your showthread.php so I can try it on my server to see if I still get errors?

NTLDR
12-20-2002, 05:56 PM
Its working fine on my rather hacked 2.2.9 too with out a problem. Perhaps another hack you've got installed is conflicting with it?

ptm
12-20-2002, 06:09 PM
Nope, not a chance. :) Haven't installed 1 hack.

Bison
12-20-2002, 09:51 PM
@ptm .... check your pm's

ptm
12-20-2002, 10:02 PM
Just sent you a reply. :)

Velocd
12-20-2002, 11:24 PM
A new version of this hack is out, and support for this one will no longer be available. This new version seriously runs so much smoother and faster on my forums, so I highly recommend upgrading.

https://vborg.vbsupport.ru/showthread.php?s=&threadid=46860

ptm
12-22-2002, 02:32 AM
Wow- thanks! :D Will let you know if I get it working. :)

maestrosdelweb
02-13-2003, 12:55 AM
What's the difference between this hack and this other:?

https://vborg.vbsupport.ru/showthread.php?s=&threadid=46860

Erwin
02-13-2003, 04:10 AM
Originally posted by maestrosdelweb
What's the difference between this hack and this other:?

https://vborg.vbsupport.ru/showthread.php?s=&threadid=46860

This hack is version 1, the other is version 2 - use version 2.

Trekkie
02-16-2003, 05:42 PM
cool hack, thx

Mike11212
03-07-2003, 04:35 AM
I don't know if this was asked but how can i prevent some forums from being displayed in the similar thread

ethics
03-07-2003, 01:59 PM
That's already done. Create a test user, set him up as a regular registered user, log in as him and you will see that those forums that are set for privacy, are excluded. Meanwhile, if you are a mod or an admin, similar thread that are private will show.

Mike11212
03-07-2003, 08:44 PM
I have logged out and staff area news which is hidden from everyone i was able to see in the similar thread

Ayatollah
04-11-2003, 09:06 PM
How did you get your quick Reply like that?

hpisavagecom
05-01-2003, 01:06 AM
I installed and I get this error message:

Parse error: parse error, unexpected ')' in /home/savage/public_html/forum/showthread.php on line 329

Line 329:

$validtitle = $thread[title])," \t.");

any suggesstions?