View Full Version : Prevent threads from rising to the top
This hack has been developed and tested on VB 2.2.9.
This hack was actually requested by the moderators in my forum.
This hack gives you the ability to prevent a thread from going back up to the top of your forum. It simply does it by disabling the updates to the lastpost field. It is an addon to the Admin Options in the bototm of a thread. This is an alternative to locking a thread where it allows the users to post new replies but the thread keeps on sinking to the bottom and to the subsequent pages. It is just another way to kill a thread. :)
I have also created an animated GIF icon that replaces the thread icon.
The threads affected by this hack are referred to as slippery threads because they slip to the bottom of the forum. ;)
Files that are affected by this hack:
- forumdisplay.php
- newreply.php
- postings.php
Templates that are affected by this hack:
- showthread_adminoptions
Tables affected by this hack:
- thread
New files:
- drop.gif
Davey
02-14-2003, 07:42 PM
Nice to see you're giving more options for the administrators :D.
Well done and I'll surely be using this.
I'll tell you how it goes.
Dave.
amykhar
02-14-2003, 08:08 PM
The problem with this hack is that my members would immediately report a bug. Then, when told that their thread has been intentionally sunk, they would start screaming bloody murder. I prefer to just get my talkative moderators to bury bad threads the old fashioned way :D
Davey
02-14-2003, 09:51 PM
This is good for locked topics though and it works like a beaut so far.
Well done man! Keep up the excellent work.
Only trouble is the image.
Looks a bit tacky and it doesn't suit my black background :(.
Is it possible to change it?
Dave.
Thank you for your kind words. :)
You can replace the image with any 15x15 icon.
Davey
02-14-2003, 10:00 PM
Yeah but I'm horrible with graphics.
An image with an envelope with an arrow pointing down would work IMO.
Ex: Use the locked thread image and replace the lock with an arrow pointing down.
I don't understand Photoshop so I cannot acheive this, or I would.
*Cries*.
Dave.
PS: No problem. Since I installed this on my board:
/me clicks install now.
I like this hack, really keep up the good work.
I'll report back here if I find any sneaky little bugs that need squashing.
PS: Oh and by the way, you might wanna redo this so that it uses the 'hot' topic and the 'new' topic and the topic with the circle (you participated in) rather than just a simple one time only image. Maybe you could release this in the next version?
And also have it so you can set the Slippery prefix customized in the ACP?
Dave.
Link14716
02-14-2003, 10:02 PM
Good idea, but wouldn't the forumdisplay.php edit work better like this?
if($thread[slippery] == 1) {
$thread[icon]='<img src="images/drop.gif" border="0" alt="">';
$thread[typeprefix] = "Slippery: $thread[typeprefix]";
}
Or am I missing something? :)
Is also great for vbHome (lite) forum. :)
Davey
02-14-2003, 11:09 PM
Okay I've decided for my use I don't want the image (as it would interfere with the thread closed image).
How do I get rid of the image and just keep the prefix?
Dave.
Originally posted by Davey
Okay I've decided for my use I don't want the image (as it would interfere with the thread closed image).
How do I get rid of the image and just keep the prefix?
Dave.
Thank you again for your kind words. :)
If you want to get rid or the icon, just remove the following line:
$thread[icon]='<img src="images/drop.gif" border="0" alt="">';
Koutaru
02-15-2003, 03:46 AM
Can I chose which forums I don't want to be bumped? or is it all the forums?
Originally posted by Koutaru
Can I chose which forums I don't want to be bumped? or is it all the forums?
It is in all forums.
Koutaru
02-15-2003, 04:59 AM
Thanks for such a quick reply :)
I was just wondering because I'm creating an advertising forum and I don't want the ads being bumped (kind of like webhostingtalk)
but I still want debates/etc being bumped if they're popular
Nice hack btw
Davey
02-15-2003, 12:29 PM
Thanks for the reply & the help Zzed!
:D:).
Dave.
Boofo
02-16-2003, 10:53 PM
Great job, Zzed! ;)
Mark Hewitt
02-17-2003, 09:47 AM
This may well be useful for posting in a thread which is about to be locked. i.e. Many times I would like to post a reason for the thread being locked. However I don't want to draw further attention to the locked thread by bringing it to the top of the list (unless there is already a hack for this?)
Sanni
02-26-2003, 05:57 AM
sounds great :)
i'm actually looking for something simular............ basically something to prevent users from resurrecting really old threads. Is there any way that this hack can determine when the last postdate was and automagically turn it into a slippery thread so users cant resurrect it back to the top of the forum?
doesn't work :(
i have the same version 2.2.9
but the code in newreply.php is :
if ($visible) {
if ($threadinfo[replycount]%10==0) {
$replies=$DB_site->query_first("SELECT COUNT(*)-1 AS replies FROM post WHERE threadid='$threadid'");
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
i replaced it with your code:
if ($visible) {
if ($threadinfo[replycount]%10==0) {
$replies=$DB_site->query_first("SELECT COUNT(*)-1 AS replies FROM post WHERE threadid='$threadid'");
if($thread[slippery]) {
$DB_site->query("UPDATE thread SET replycount='$replies[replies]',lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
} else {
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
}
} else {
if($thread[slippery]) {
$DB_site->query("UPDATE thread SET replycount=replycount+1,lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
} else {
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount=replycount+1,lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
}
}
}
but now i get a blank page when i submit i new reply
any help?
WildBill
03-12-2003, 03:49 AM
I have this same need, is there something else that will let you tag a forum to behave in the slippery fashion and others not?
Originally posted by Koutaru
Thanks for such a quick reply :)
I was just wondering because I'm creating an advertising forum and I don't want the ads being bumped (kind of like webhostingtalk)
but I still want debates/etc being bumped if they're popular
Nice hack btw
Derek
03-13-2003, 02:13 AM
This hack wasn't meant to act on all the forums. It was meant for you to be able to place a particular thread on a slippery slope. Keep in mind, those of you that want to make this go forumwide, it will require more coding to do that.
incarnus
05-05-2003, 08:39 AM
Hi Zed, Elmer told me about this hack and I decided it was really cool and we had to have it on our little site. Only thing I changed was if($thread[slippery] == 1) {
$thread[icon]='<img src="images/drop.gif" border="0" alt="">';
$thread[movedprefix] = "$thread[movedprefix] Slippery: ";
} to if($thread[slippery] == 1 and $bbuserinfo[usergroupid] == 6) {
$thread[icon]='<img src="images/drop.gif" border="0" alt="">';
$thread[movedprefix] = "$thread[movedprefix] Slippery: ";
} so that only admins can see that the tread is slippery. I must say, you have some evil hacks. I love em!
Thanks, Chris (still stuck in an LT1 ;) )
incarnus, Thank you for your kind words. https://vborg.vbsupport.ru/
Elmer speaks very highly of you. So I am quite honored that you replied to one of my hacks. :)
incarnus
05-06-2003, 08:08 PM
My pleasure! Thank you for your awesome hacks. Woe to anyone who misbehaves at LS1.com, LOL!
So when are we gonna get you back in an F-body? :p
JustAskJulie
03-31-2004, 11:52 PM
Is it possible to do this without replacing the icon? The only time I would really use this is on some of the game type threads that people start. I currently have a word association thread that is running at about 1500 posts and won't die. I don't really want to lock it because the users enjoy it but I think if it fell and wasn't at the top of the page constantly they'd forget about it.
Julie, You can just omit the code where I assign the thread a new icon. ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.