Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Allow URLs in posts only after a minimum number of posts (to reduce spam) Details »»
Allow URLs in posts only after a minimum number of posts (to reduce spam)
Version: 1.00, by Xoligy Xoligy is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.6.4 Rating:
Released: 12-11-2006 Last Update: 01-28-2007 Installs: 128
DB Changes Uses Plugins
Additional Files  
No support by the author.

With the recent increase in CAPTCHA-beating bots spamming their URLs, I have a feeling this mod will be very useful. Inspired by this vBulletin 2 plug-in.

To install, first upload "bitfield_restricturls.xml" to "includes/xml", and then just install restricturls.xml via the product manager in the AdminCP. The plug-in should automatically rebuild the bitfields cache - as long as you upload "bitfield_restricturls.xml" first.

The amount of posts required is configurable in the usergroup manager, simply look for the group of settings with the header "Restrict URLs". The default is set to 5, however most bots tend to only make one or two spam posts at the most.

For obvious reasons, moderators and admins don't have this restriction, but if you want to add it, you can remove the group id from "bitfield_restricturls.xml".

If people find this useful, I may also update this to make an option so the posts containing URLs are set to be moderated rather than just completely restricted.

Enjoy

Update (13th Dec): Added code to rebuild bitfields, just re-install the .xml file. Also fixed a major bug. If you already have this installed... re-install it!

Note: This works by detecting the [url] tag and so it relies on vBulletin BBCode enabled and vBulletin to automatically parse URLs in to BBCode. If you have either of these disabled it will not work.


You're free to do what you like with this code, although credit is appreciated, it's not required.

Brought to you by eXaltic - vBulletin skins.

Update: If you're looking for a more advanced version of this, I recommend this or this. Because of these, this plug-in will no longer be updated unless needed. I recommend you use either of the first 2 if you're looking for more control.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #62  
Old 06-29-2007, 06:08 PM
SpanishHarlem SpanishHarlem is offline
 
Join Date: Feb 2005
Location: Ontario, Canada
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It doesn't help when they make other posts just to be able to put the url in.
Reply With Quote
  #63  
Old 08-05-2007, 08:34 AM
hobsdv hobsdv is offline
 
Join Date: May 2006
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very handy mod to have i set the limit on mine to 20 posts
Reply With Quote
  #64  
Old 09-05-2007, 12:39 PM
nMIK-3 nMIK-3 is offline
 
Join Date: Dec 2004
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thats what I needed.

THanks
Reply With Quote
  #65  
Old 09-07-2007, 01:08 AM
pitzerwm pitzerwm is offline
 
Join Date: Aug 2007
Location: WA state
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm new or retarded, where do I set this: automatically parse URLs in to BBCode
Reply With Quote
  #66  
Old 09-08-2007, 02:53 AM
cpvr cpvr is offline
 
Join Date: Jul 2007
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Distance View Post
Nice but i have an advanced version of this installed
Where?
Reply With Quote
  #67  
Old 09-28-2007, 03:22 AM
JamesAB JamesAB is offline
 
Join Date: Dec 2003
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Warningpreg_match() [function.preg-match]: Compilation failedmissing 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.
Reply With Quote
  #68  
Old 09-28-2007, 04:16 AM
JamesAB JamesAB is offline
 
Join Date: Dec 2003
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nevermind. I found the missing \ character.

It works as:
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']);

Reply With Quote
  #69  
Old 10-30-2007, 12:40 AM
David Bott David Bott is offline
 
Join Date: Dec 2001
Posts: 215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello...

We use this and it is great. Looking for the same thing but with the PM's as well a spammers are now using that as a way to not only spam, but also SPOOF. Yes, we just had our site spoofed to collect user login info. (IE, a link to a page that looks like us but displays the You are not Logged in...and gives the boxes. This link was offered via PM from a member with zero posts. Thus the need.

Thank you.
Reply With Quote
  #70  
Old 11-27-2007, 01:41 PM
Shaheen's Avatar
Shaheen Shaheen is offline
 
Join Date: Nov 2006
Location: Melbourne
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this works with 3.6.8 ??? any one tested ???
Advance thanks
Reply With Quote
  #71  
Old 11-30-2007, 12:08 PM
Calash's Avatar
Calash Calash is offline
 
Join Date: Jun 2006
Location: East Coast, USA
Posts: 297
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by David Bott View Post
Hello...

We use this and it is great. Looking for the same thing but with the PM's as well a spammers are now using that as a way to not only spam, but also SPOOF. Yes, we just had our site spoofed to collect user login info. (IE, a link to a page that looks like us but displays the You are not Logged in...and gives the boxes. This link was offered via PM from a member with zero posts. Thus the need.

Thank you.
I was able to get this to work with PM's as well by making a new plugin

Hook rivate_insertpm_process

Code:
// Restrict URLs
if ($vbulletin->userinfo['posts'] < $vbulletin->userinfo['permissions']['postsforurls'] && preg_match('/\[\/url\]/i', $pm['message'])){
	$errors[] = fetch_error('no_urls_for_you', $vbulletin->userinfo['permissions']['postsforurls']);
}
Just did a quick test and it works great for stopping URLs in PM messages.


The mod works fine on my 3.6.8 system.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:40 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05961 seconds
  • Memory Usage 2,335KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (5)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete