***** Редактировать файл - engine/modules/addcomments.php
Строки
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
Строки
// Begin: cleantalk.ru
require_once ENGINE_DIR . '/modules/cleantalk/cleantalk.php';
if ($Ct->isAllowUser($email, $name) === false) {
$ct_fill_field = true;
$reg_error .= $Ct->comment;
$ct_time = time() + ($config['date_adjust'] * 60);
$ct_log_extras = 'Username: '.$name.', email: '.$email.'. '.$Ct->comment;
$ct_if_exists_log = $db->super_query('show tables like "' . USERPREFIX . '_admin_logs"');
if (!empty($ct_if_exists_log)) {
$db->query( "INSERT INTO " . USERPREFIX . "_admin_logs (name, date, ip, action, extras) values ('', '{$ct_time}', '".$db->safesql( $_SERVER['REMOTE_ADDR'] )."', '0', '".$db->safesql($ct_log_extras)."')" );
}
}
// End: cleantalk.ru
Заменить на
// Begin: cleantalk.ru
include ENGINE_DIR . '/modules/cleantalk/register.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
Строки
// Begin: cleantalk.ru
if (isset($ct_fill_field)) {
$tpl->copy_template .= '';
}
// End: cleantalk.ru
// Begin: cleantalk.ru
$tpl->copy_template .= "
";
$_SESSION['ct_submit_register_time'] = time();
// End: cleantalk.ru
Заменить на
// Begin: cleantalk.ru
require_once ENGINE_DIR . '/modules/cleantalk/ct_functions.php';
$ct_lang = get_ct_lang();
list($ct_config, $ct_config_serialized) = ct_get_config($db);
if ($ct_config['ct_enable_mod']) {
$ct_partner_id = (int)$ct_config['ct_partner_id'];
if ($ct_config['ct_show_partner_link'] == 1 && !empty($ct_partner_id)) {
$tpl->copy_template .= '
'.sprintf($ct_lang['ct_partner_link'], $ct_partner_id).'
';
}
if (isset($ct_fill_field)) {
$tpl->copy_template .= '';
}
$ct_check_value = ct_generation_check_key();
$_SESSION['ct_check_key'] = $ct_check_value;
$tpl->copy_template .= "
";
$_SESSION['ct_submit_register_time'] = time();
}
// End: cleantalk.ru
Строки
$db->query( "INSERT INTO " . USERPREFIX . "_users (name, password, email, reg_date, lastdate, user_group, info, signature, favorites, xfields, logged_ip) VALUES ('$name', '$regpassword', '$email', '$add_time', '$add_time', '" . $config['reg_group'] . "', '', '', '', '', '" . $_IP . "')" );
На
// 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']) {
$db->query( "INSERT INTO " . USERPREFIX . "_users (name, password, email, reg_date, lastdate, user_group, info, signature, favorites, xfields, logged_ip, ct_request_id) VALUES ('$name', '$regpassword', '$email', '$add_time', '$add_time', '" . $config['reg_group'] . "', '', '', '', '', '" . $_IP . "', '".$ct_request_id."')" );
} else {
$db->query( "INSERT INTO " . USERPREFIX . "_users (name, password, email, reg_date, lastdate, user_group, info, signature, favorites, xfields, logged_ip) VALUES ('$name', '$regpassword', '$email', '$add_time', '$add_time', '" . $config['reg_group'] . "', '', '', '', '', '" . $_IP . "')" );
}
// End: cleantalk.ru
***** Редактировать файл - engine/modules/show.full.php
Строки
// Begin: cleantalk.ru
$tpl->copy_template = "