This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Removing Ban System
#1

can you remove banning completely. I use a private network and do not need to ban.
Reply
#2

Hi,

There isn't a setting to turn it off.

You will have to open comments/includes/functions/processor.php, find the cmtx_ban function (line 1187), and comment out the code within it, like this:

PHP Code:
<?php 
function cmtx_ban ($reason) { //ban user
/*
global $mysql_table_prefix, $settings, $ip_address, $is_admin; //globalise variables

if (!$is_admin) { //if not administrator

//insert user's IP address into 'banned' database table
mysql_query("INSERT INTO `".$mysql_table_prefix."banned` (ip_address, reason, dated) VALUES ('$ip_address', '$reason', NOW())");

@setcookie("Commentics-Ban", "Banned", 60*60*24*$settings->banning_cookie_days + time(), '/'); //set banning-cookie
//time calculation: seconds * minutes * hours * days + current time

cmtx_notify_admin_new_ban($ip_address, $reason); //notify admin of new ban

die(CMTX_BAN_MESSAGE_BANNED_NOW); //end scripting and output message to user explaining they are now banned

}
*/
} //end of ban function

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by rid
18-Jan-2019, 06:51 PM
Last Post by Steven
10-Sep-2012, 03:39 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)