***** Редактировать файл - engine/modules/addcomments.php
После
$_SESSION['sec_code_session'] = 0;
Добавить
// Begin: cleantalk.ru
require_once ENGINE_DIR . '/modules/cleantalk/addcomments.php';
// End: cleantalk.ru
Строки
if( $is_logged ) $db->query( "INSERT INTO " . PREFIX . "_comments (post_id, user_id, date, autor, email, text, ip, is_register, approve) values ('$post_id', '$member_id[user_id]', '$time', '$name', '$mail', '$comments', '$_IP', '1', '$where_approve')" );
else $db->query( "INSERT INTO " . PREFIX . "_comments (post_id, date, autor, email, text, ip, is_register, approve) values ('$post_id', '$time', '$name', '$mail', '$comments', '$_IP', '0', '$where_approve')" );
Заменить на
// Begin: cleantalk.ru
require_once ENGINE_DIR . '/modules/cleantalk/ct_functions.php';
list($ct_config, $ct_config_serialized) = ct_get_config($db);
if ($ct_config['ct_enable_mod']) {
if( $is_logged ) $db->query( "INSERT INTO " . PREFIX . "_comments (post_id, user_id, date, autor, email, text, ip, is_register, approve, ct_request_id) values ('$post_id', '$member_id[user_id]', '$time', '$name', '$mail', '$comments', '$_IP', '1', '$where_approve', '$ct_request_id')" );
else $db->query( "INSERT INTO " . PREFIX . "_comments (post_id, date, autor, email, text, ip, is_register, approve, ct_request_id) values ('$post_id', '$time', '$name', '$mail', '$comments', '$_IP', '0', '$where_approve', '$ct_request_id')" );
} else {
if( $is_logged ) $db->query( "INSERT INTO " . PREFIX . "_comments (post_id, user_id, date, autor, email, text, ip, is_register, approve) values ('$post_id', '$member_id[user_id]', '$time', '$name', '$mail', '$comments', '$_IP', '1', '$where_approve')" );
else $db->query( "INSERT INTO " . PREFIX . "_comments (post_id, date, autor, email, text, ip, is_register, approve) values ('$post_id', '$time', '$name', '$mail', '$comments', '$_IP', '0', '$where_approve')" );
}
// End: cleantalk.ru
***** Редактировать файл - engine/modules/register.php
После
$reg_error = check_reg( $name, $email, $password1, $password2, $sec_code, $sec_code_session );
Добавить
// Begin: cleantalk.ru
require_once ENGINE_DIR . '/modules/cleantalk/register.php';
// End: cleantalk.ru
После
if( $doaction == "validating" AND !$stopregistration AND !$_POST['submit_val'] ) {
Добавить
// Begin: cleantalk.ru
require_once ENGINE_DIR . '/modules/cleantalk/register_validating.php';
// End: cleantalk.ru
После
$reg_error = check_reg( $name, $email, $regpassword, $regpassword );
Добавить
// Begin: cleantalk.ru
require_once ENGINE_DIR . '/modules/cleantalk/register.php';
// End: cleantalk.ru
После строки:
Добавить:
Перед строками
$tpl->copy_template .= <<