The Arcive of vBulletin Modifications Site. |
|
Anti-spam post decrementer Details »»
|
|||||||||||||||||||||||||
This is a bit of a silly hack, but a few of my moderators wanted it, so I thought I'd share it with you people.
What it does is when a user posts, the system checks against a list of user IDs, and if the user is in that list, their post count goes down by one, rather than going up by one post. Very silly I know, but anyway... 1) run the following query: Code:
INSERT INTO setting (settinggroupid, title, varname, description, displayorder) VALUES (6, 'Users with inverse post counters', 'decrementusers', 'Users in this list will have their post count decremented when they post. Separate user IDs with a comma', 100) Code:
function incrementposts($userid) {
static $decrementusers;
if (!is_array($decrementusers)) {
$decrementusers = explode(',', $GLOBALS['decrementusers']);
}
if (in_array($userid, $decrementusers)) {
return 'posts=posts-1,';
} else {
return 'posts=posts+1,';
}
}
Code:
".iif ($foruminfo[countposts],"posts=posts+1,","")." Code:
".iif ($foruminfo[countposts], incrementposts($bbuserinfo['userid']), '')." Have fun :classic: Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Odd little hack, but it is nice to have fun with your members every now and then
.- SaintDog |
|
#3
|
|||
|
|||
|
i smell a late april 1st
, love the hack ^_^
|
|
#4
|
||||
|
||||
|
not a particulaly useful hack, but fun to screw around with :-P
|
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
||||
|
||||
|
rolf this is great, Im going to install it to bug all my troll members! hahaha, awesome
|
|
#7
|
||||
|
||||
|
LOL, nice one Kier.
|
|
#8
|
||||
|
||||
|
Looks very funny hehehe
|
|
#9
|
||||
|
||||
|
What if a user gets down to 0? Will it start counting -1, -2 and so on? Or will it stop at 1?
|
|
#10
|
||||
|
||||
|
Quote:
[sql]ALTER TABLE user CHANGE posts posts SMALLINT DEFAULT 0 NOT NULL;[/sql] |
![]() |
|
|