View Full Version : Use thread ratings to hide bad posts
aggiefan
04-25-2007, 01:02 AM
Any ideas out there on how to program a statement that says, "if thread has a rating of x after x number of votes, hide thread?"
This serves as a subtle user moderation hack without the intrusiveness or unappealing looks of the current self-moderated board hacks that are out there...
I have one that closes a thread if the rating dips below a 2. I'll post it tomorrow for you to look at, if you'd like.
aggiefan
07-02-2007, 04:25 PM
i'd be interested in seeing this. Does this take into account how many votes? I wouldn't want one user being able to lock a thread....
RedTyger
07-02-2007, 04:40 PM
Easily done, if you're OK with modifying templates. In the threadbit template, you can use this to alter the appearance of the threadbit (each section dedicated to a thread in a list of threads).
<if condition=" $thread[voteavg] AND $thread[voteavg] < 2">
Your threadbit template for rubbish threads
<else />
The contents of your normal threadbit template
</if>
The 2 is the limit for the thread's average vote, so it'll kick in a 1.99 or less average. Just change the number to what you want.
Okay, here's the hack Andreas setup for me. If, after 5 votes, the rating is below 2 than the thread is closed. Its also set up to reopen if the rating goes about 3, but that requires file edits since people can't normally vote on a closed thread.
I'd start a hack thread, but this was originally coded by Andreas and I'm unable to really support it.
If someone could figure out a way to make a post showing that the thread is closed with this hack, I'd think you were pretty cool.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.