vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Post count incrementer/decrementer? (https://vborg.vbsupport.ru/showthread.php?t=41521)

trilOByte 07-25-2002 05:05 PM

Post count incrementer/decrementer?
 
I know there are tons of ways to penalise spammers, but to some extent they are all a little severe. I was looking at Kiers post count decrementer, which reduces a persons post count when they are placed into a certain user group - this still seems a little severe to me, but it has possibilities.

It only takes one or two members in a post whoring contest to start annoying a lot of people.

What I would like to request, is something similar to kiers post cound decrementer here, but worked into a time limiter. We currently have our posting time limit set at 60 seconds, and are considering increasing it to 90 seconds in an attempt to combat the spammers. I would love a feature that allows posts to increment as normal if the posts are made more than 90 seconds apart, but the post count decrements if the posts are made less than 90 seconds apart. That way, the postser gets to think about how important his post is over his post count and gets to choose. Neat huh?

Xenon 07-25-2002 07:17 PM

not tested but i think it should do what ya want:

in newreply.php find:
PHP Code:

          $DB_site->query("UPDATE user SET
          "
.iif ($foruminfo[countposts],"posts=posts+1,","")."
          
$dotitle"."lastpost='".time()."' WHERE userid='$bbuserinfo[userid]'"); 

replace it with:
PHP Code:

if((time()-$bbuserinfo[lastpost])<=90) {
$DB_site->query("UPDATE user SET
          posts=posts-1, lastpost='"
.time()."' WHERE userid='$bbuserinfo[userid]'");
} else {          
$DB_site->query("UPDATE user SET
          "
.iif ($foruminfo[countposts],"posts=posts+1,","")."
          
$dotitle"."lastpost='".time()."' WHERE userid='$bbuserinfo[userid]'");



trilOByte 07-25-2002 08:19 PM

Thanks, but got a parse error....

Parse error: parse error, unexpected $ in **********/forum/newreply.php on line 527

Maybe it's because I only did the newreply part - what do I have to do with the mod exemption code?

Thanks ;)

Xenon 07-25-2002 10:19 PM

ups what have i posted *gg*

have edited it, try again no it should work ;)

if not you should tell me which line was the error producing line ;)

trilOByte 07-25-2002 10:25 PM

Failed again, here's the error...

Parse error: parse error, unexpected ':' in /home/thegenom/public_html/forum/newreply.php on line 340

trilOByte 07-25-2002 10:26 PM

hang on, ignore that, I goofed with the last upload, trying again.....

trilOByte 07-25-2002 10:30 PM

Woot! It works ;) Thankyou very much indeed. Do you know how to exempt admins/mods, or better yet, make it specific to a particular user group?

Man this is superb, you should release this as a hack.

Thank you very much again, my users are going to love this and I do already.

Xenon 07-25-2002 10:39 PM

you're welcome ;)

replace
PHP Code:

if((time()-$bbuserinfo[lastpost])<=90) { 

with
PHP Code:

if((time()-$bbuserinfo[lastpost])<=90 and $bbuserinfo[usergroupid]==xx) { 

change the xx to usergroupid you want to have this decrementer ;)

trilOByte 07-25-2002 10:43 PM

Hmmm, OK this is strange, it seems to take 2 posts to come into effect. The first rapid reply leaves the post count the same, the second starts to reduce it. The next slow reply leaves the post count the same, the next increments as normal - any idea why?

Basically, it seems to take 2 posts to change the direction of the count. Once the direction has changed, then the cont proceeds in single increments (or decrements).

Xenon 07-25-2002 10:46 PM

it's a built in feature in vb if you post a post very fast after your last and title/message are the same, then it just updates the old one ...

trilOByte 07-25-2002 10:46 PM

Quote:

Originally posted by Xenon

change the xx to usergroupid you want to have this decrementer ;)

Thank you very, very much indeed. :) :) :)

trilOByte 07-25-2002 10:51 PM

Quote:

Originally posted by Xenon
it's a built in feature in vb if you post a post very fast after your last and title/message are the same, then it just updates the old one ...
Ahhh, man you are an oracle. I was just posting "test" over and over and just watching the post count.

Thanks again :bows:

Xenon 07-25-2002 10:56 PM

that's my job *gg*

you're welcome

/me goes to bed now


All times are GMT. The time now is 02:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02317 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete