View Full Version : Prevent Threads with Certain Titles
givememyleg
10-05-2016, 08:52 AM
Hello,
I have vb4.2.2 installed and after some updates, most of our spam is under control. We require captcha and do not allow urls for users with under 3 posts and that prevents a lot of spam bots.
However, the bots are getting around this by pasting the url in the thread title like this:
Title: http://theirdumbspamsite.com/some-page/
Post: garbage spam
Is there anyway to block new threads, or queue them for moderation, if they contain "http://" or something similar in the thread title? No normal users use "http://" in the thread titles, 100% of the time it's spam.
Thanks
MarkFL
10-05-2016, 04:37 PM
Create a plugin hooked at "newpost_process" with the following Plugin PHP Code:
$title = strtolower($post['title']);
if (strpos($title, 'http://'))
{
$post['message'] = '';
$minchar = intval($vbulletin->options['postminchars']) <= 0 ? 1 : intval($vbulletin->options['postminchars']);
require_once(DIR . '/includes/functions_misc.php');
$errors[] = construct_phrase(fetch_phrase('tooshort', 'error'), $minchar);
}
What this does is if "http://" is embedded in the thread title, the content of the post will be erased, and the user will be told their post is too short. :)
--------------- Added 1475698223 at 1475698223 ---------------
A more complete solution can be found here:
Block Censored Words in Posts by BOP5 VB4 (https://vborg.vbsupport.ru/showthread.php?t=255546)
This product will allow you to check post titles/content for additionally censored words/strings. You can specifiy which forums in which it is active too. :)
givememyleg
10-11-2016, 01:23 PM
Create a plugin hooked at "newpost_process" with the following Plugin PHP Code:
$title = strtolower($post['title']);
if (strpos($title, 'http://'))
{
$post['message'] = '';
$minchar = intval($vbulletin->options['postminchars']) <= 0 ? 1 : intval($vbulletin->options['postminchars']);
require_once(DIR . '/includes/functions_misc.php');
$errors[] = construct_phrase(fetch_phrase('tooshort', 'error'), $minchar);
}
What this does is if "http://" is embedded in the thread title, the content of the post will be erased, and the user will be told their post is too short. :)
--------------- Added 1475698223 at 1475698223 ---------------
A more complete solution can be found here:
Block Censored Words in Posts by BOP5 VB4 (https://vborg.vbsupport.ru/showthread.php?t=255546)
This product will allow you to check post titles/content for additionally censored words/strings. You can specifiy which forums in which it is active too. :)
thanks for your reply, but i've never created a plugin so your post is a bit over my head.
i tried the BOP5 plugin, but it censors both thread titles and posts since it uses the vB built in censorship list, and therefore doesn't work to just censor titles.
Stratis
10-11-2016, 01:29 PM
<a href="http://www.vbulletin.com/docs/html/add_plugin" target="_blank">http://www.vbulletin.com/docs/html/add_plugin</a>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.