Version: 1.00, by TECK
Developer Last Online: Nov 2023
Version: 2.2.x
Rating:
Released: 04-26-2002
Last Update: Never
Installs: 19
No support by the author.
This hack will add the latest thread in index.php and forumdisplay.php files, above the date and time of each forum latest post.
[HIGH]There is no need to alter any table and also, it adds only one query.[/HIGH]
ESTIMATED INSTALL TIME: 2 minutes
TESTED IN VERSION: 2.2.5
[HIGH]NOTE:[/HIGH] As a thank you for using my hack, please click on the [HIGH]INSTALL[/HIGH] button. You will receive updates in your email, whenever I add new features to it and it will let me evaluate better the quality of my hacks.
Also post a reply with your comments. Your oppinion is important to me.
[high]UPDATE[/high]
After the evaluation made by FireFly and PPN, we all came to the conclusion that this hack is reliable ONLY if it's used on medium or small boards. Busy boards SHOULD install PPN's hack.
I requested to have this hack removed from the database, but I guess FireFly is right. The code is still good and it will bring your board to it's knees only if you have alot of forums and ALOT of members browsing to them.
To download the latest version of this hack, click below:
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
still waiting for PPN's test...
if it doesnt hold well... i tried at least.. and we still have his version available, right?
at least i learned something new about it.
Originally posted by nakkid i try it.. it didn't work well on wooolF's live board, but it did ok on my local one.
so you recommend me to keep the query like this?
Code:
$forums=$DB_site->query('SELECT forum.*, thread.title AS threadtitle FROM forum LEFT JOIN thread ON (thread.forumid=forum.forumid AND thread.lastpost=(forum.lastpost-forum.daysprune)) WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder');
let me know please.
No, remove the illogical code. (the part I was talkin about...)
ok..
illogical.. hehe you made me smile, because i said earlier that i went with the logic.
so what should i do... leave it like that? :
Code:
$forums=$DB_site->query('SELECT forum.*, thread.title AS threadtitle FROM forum LEFT JOIN thread ON (thread.forumid=forum.forumid AND thread.lastpost=forum.lastpost) WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder');
it will not show any threads posted yesterday. i tried that first.
Of course it will show threads from yesterday. And if your board is not very busy, the chances two posts would be posted at the very same second are very low, so you can also drop the thread.forumid=forum.forumid part our of the query.
ic... is wierd. i swear i thought the same way. but when wooolF tried the code it didnt work. you think if would be related to some other hacks he installed?
anyway.. i will update the file with the final query listed above. thanks for the help.
btw, do you plan adding it here? vB.org have alot of posts and traffic. probably a good place to see if the query keep everything tight...
It wasn't too bad on my local computer seemed to go fine, but when i put it on my live board with 16 browsing the load time went up and server load jumped from 0.46 to 1.63
ok. thanks PPN. what about your hack?
not that i try to compare. but i'm sure you test it. what are the results for yours? after all, i dont mind at all installing yours on my new board. let me know please.
His hack just adds another field to the forum table, which is already selected so the overload is nil. And since the forum table isn't big (unless you have thousands of forums), another field doesn't matter.