vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Times Posted Limiter (https://vborg.vbsupport.ru/showthread.php?t=65190)

InsaneContender 05-16-2004 05:15 PM

Times Posted Limiter
 
I'm looking for a hack that can limit how many posts are posted in a forum for x ammount of hours or such,

Like, we have a semi-spam board. Actually, it is the talkerbot forum :) where people can just chat with him. But, sense post counts aren't enabled in it, people have started to spam it.

So I am looking for something that would regulate how many posts a user can post in that forum. Such as only say 30 posts in that forum a day.

Do you follow?

InsaneContender 05-16-2004 07:04 PM

bump

Xenon 05-16-2004 07:06 PM

there's no need to bump a thread within 24h

InsaneContender 05-16-2004 08:40 PM

Sorry. Won't happen again!

Xenon 05-17-2004 04:18 PM

hmm, it's not a fine way, but should work:

open newreply.php and find:

PHP Code:

// ### CHECK IF ALLOWED TO POST ###
if (!$threadinfo['visible'] OR $threadinfo['isdeleted'])
{
    
$idname $vbphrase['thread'];
    eval(
print_standard_error('invalidid'));


and below add:
PHP Code:

// ### CHECK IF THIS IS A SPAM FORUM AND JUST ALLOW XX POSTS PER DAY ###
if ($threadinfo['forumid'] == XX)
{
    
$posts $DB_site->query_first("
        SELECT COUNT(postid) AS spamposts
        FROM " 
TABLE_PREFIX "post AS post
        INNER JOIN " 
TABLE_PREFIX "thread AS thread USING(threadid)
        WHERE post.dateline > " 
. (TIMENOW 24 3600) . "
            AND thread.forumid = XX
    "
);
    if (
$posts['spamposts'] > 30)
    {
        eval(
print_standard_error('toomuchspam'));
    }


now all you have to to is to create a new errorphrase called toomuchspam :)

Xenon 05-17-2004 07:55 PM

you're welcome

InsaneContender 05-17-2004 10:08 PM

Nice. Could you just tell me what I need to edit please?

Thanks!

Xenon 05-18-2004 11:48 AM

@ tenbucks: yes you can.

be sure to remove it in the query as well ;)

@InsideContender, well, i did already, all you have to change is the XX into the specific forumid.

InsaneContender 05-20-2004 03:20 AM

Ok, got it. Wish this could be set in the admin CP. But this works!

Merjawy 08-14-2004 03:01 AM

Thanks Xenon, love the mod .. but this only works on replying but not new thread !!!

how can I limit new threads please?

thnx


All times are GMT. The time now is 01:37 AM.

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.01000 seconds
  • Memory Usage 1,734KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete