Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Anti-Flood
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2015-03-27 14:28:53
[size=14px]This is another very useful mod that unfortunately now missing...[/size]

Open backend/config.php
Add:

// Anti-Flood Settings
$site_config['floodsize']  = 1000;  // Maximum size of messages, forumposts, comments
$site_config['floodlimit'] = 10;    // Amount of sources before to be considered flood
$site_config['floodtime']  = 10;    // Time between messages, forumposts, comments
Open comments.php

After:

    if (!$body)
        show_error_msg(T_("ERROR"), T_("YOU_DID_NOT_ENTER_ANYTHING"), 1);
Add:

    //===| Anti-Flood
    if ( strlen($body) > $site_config['floodsize'] )
        show_error_msg("Error", "Your comment is too big, only $site_config['floodsize'] characters are allowed.", 1);

    $res = SQL_Query_exec("SELECT COUNT(*) FROM `comments` WHERE user = $CURUSER[id] AND added > '" . get_date_time(gmtime() - ($site_config['floodtime'] * 60)) . "'");
    $row = mysql_fetch_row($res);
    if ($row[0] > $site_config['floodlimit'])
        show_error_msg("Error", "You are only prohibited $site_config[floodlimit] comments in $site_config[floodtime] minutes.", 1);
    //===| End
Open forums.php
Replace:

    //Insert the new post
    $added = "'" . get_date_time() . "'";
    $body = sqlesc($body);
With:

    //===| Anti-Flood
    if ( strlen($body) > $site_config['floodsize'] )
        show_error_msg("Error", "Your post is too big, only $site_config['floodsize'] characters are allowed.", 1);
    //===| End

    //Insert the new post
    $added = "'" . get_date_time() . "'";
    $body = sqlesc($body);

    //===| Anti-Flood
    $res = SQL_Query_exec("SELECT COUNT(*) FROM `forum_posts` WHERE userid = $CURUSER[id] AND added > '" . get_date_time(gmtime() - ($site_config['floodtime'] * 60)) . "'");
    $row = mysql_fetch_row($res);
    if ($row[0] > $site_config['floodlimit'])
        show_error_msg("Error", "You are only prohibited $site_config[floodlimit] forumposts in $site_config[floodtime] minutes.", 1);
    //===| End
Open mailbox.php
After:

        $status = (@$_POST['send'] ? 'yes' : 'no');
Add:


    //===| Anti-Flood
    if ( strlen($msg) > $site_config['floodsize'] )
        show_error_msg("Error", "Your message is too big, only $site_config['floodsize'] characters are allowed.", 1);

    $res = SQL_Query_exec("SELECT COUNT(*) FROM `messages` WHERE sender = $CURUSER[id] AND added > '" . get_date_time(gmtime() - ($site_config['floodtime'] * 60)) . "'");
    $row = mysql_fetch_row($res);
    if ($row[0] > $site_config['floodlimit'])
        show_error_msg("Error", "You are only prohibited $site_config[floodlimit] messages in $site_config[floodtime] minutes.", 1);
    //===| End
Unknown User
2015-03-30 09:56:54
thx Big
Unknown User
2015-03-30 11:58:23
Thanks bigmax useful mod
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728