First off, thanks for this great mod.
Is there a way to check for email tags as well?
I looked at the orginal code:
PHP Code:
// Restrict URLs
if ($vbulletin->userinfo['posts'] < $vbulletin->userinfo['permissions']['postsforurls'] && preg_match('/\[\/url\]/i', $post['message'])){
$errors[] = fetch_error('no_urls_for_you', $vbulletin->userinfo['permissions']['postsforurls']);
And then the mod posted to restrict IMG tags:
PHP Code:
// Restrict URLs
if ($vbulletin->userinfo['posts'] < $vbulletin->userinfo['permissions']['postsforurls'] && preg_match('/(\[\/url\]|[\/img\])/i', $post['message'])){
$errors[] = fetch_error('no_urls_for_you', $vbulletin->userinfo['permissions']['postsforurls']);
}
So I tested this to try to catch email tags instead of img tags:
PHP Code:
// Restrict URLs
if ($vbulletin->userinfo['posts'] < $vbulletin->userinfo['permissions']['postsforurls'] && preg_match('/(\[\/url\]|[\/email\])/i', $post['message'])){
$errors[] = fetch_error('no_urls_for_you', $vbulletin->userinfo['permissions']['postsforurls']);
}
but I get this error:
PHP Code:
Warning: preg_match() [function.preg-match]: Compilation failed: missing terminating ] for character class at offset 22 in /includes/functions_newpost.php(360) : eval()'d code on line 2
Any ideas on this?
Thanks for your help.