inter forum

Веб приложения => SMF 2 => FAQ => Тема начата: inter 🐵 от 27 Декабрь 2012, 12:31:58

Название: Борьба со спамом
Отправлено: inter 🐵 от 27 Декабрь 2012, 12:31:58
Чтоб спам-боты не могли вам отравить жизнь своим присутствием - советую вот эти 3 суперских мода:

1. Avatar Verification
Страница мода (http://custom.simplemachines.org/mods/index.php?mod=2182)
Оф. форум (http://www.simplemachines.org/community/index.php?topic=343185.0)

2. reCAPTCHA for SMF
Страница мода (http://custom.simplemachines.org/mods/index.php?mod=1044)
Оф. форум (http://www.simplemachines.org/community/index.php?topic=213535.0)

или

Anti Spam: KeyCAPTCHA
Страница мода (http://custom.simplemachines.org/mods/index.php?mod=2839)
Оф. форум (http://www.simplemachines.org/community/index.php?topic=413168.0)
Название: Re: Борьба со спамом
Отправлено: inter 🐵 от 27 Декабрь 2012, 16:15:37
Запрет внешних ссылок для гостей:

Post.php

Найти:


// If we came from WYSIWYG then turn it back into BBC regardless.
if (!empty($_REQUEST['message_mode']) && isset($_REQUEST['message']))
{
require_once($sourcedir . '/Subs-Editor.php');

$_REQUEST['message'] = html_to_bbc($_REQUEST['message']);

// We need to unhtml it now as it gets done shortly.
$_REQUEST['message'] = un_htmlspecialchars($_REQUEST['message']);

// We need this for everything else.
$_POST['message'] = $_REQUEST['message'];
}


Добавить:

	if (isset($_POST['message']) && $user_info['is_guest'] && preg_match('~http:\/\/~siu', $_POST['message']))
{
$txt['error_external_links'] = 'Вам запрещено оставлять ссылки.';
$context['post_error']['external_links'] = 'external_links';
return POST();
}
Название: Re: Борьба со спамом
Отправлено: inter 🐵 от 12 Февраль 2013, 17:05:03
Если поставите reCAPTCHA - мои правки для версии 0.9.8a:

Find: Subs-Editor.php


if (!$resp->is_valid)
fatal_lang_error('error_wrong_verification_code', false);
}
else
fatal_lang_error('error_wrong_verification_code', false);


Replace:


if (!$resp->is_valid)
{
$verification_errors[] = 'wrong_verification_code';
//fatal_lang_error('error_wrong_verification_code', false);
}
}
else
{
$verification_errors[] = 'wrong_verification_code';
//fatal_lang_error('error_wrong_verification_code', false);
}