Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Forbid Users from Posting Links or Images if They Have Fewer than 15 Posts Details »»
Forbid Users from Posting Links or Images if They Have Fewer than 15 Posts
Version: 1.01, by amykhar amykhar is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 3.5.0 RC3 Rating:
Released: 09-10-2005 Last Update: 01-10-2006 Installs: 335
Uses Plugins
 
No support by the author.

Just as the title says - if a user has fewer than 15 posts, he will be unable to post a link or an image within a message.

This mod was originally done by Erwin for VB 2.x, and is ported with his kind permission.

It is a product. To install, simply import the xml.

(please note Andreas's fixes below if you have problems with scripts that post automatically)

Amy

Supporters / CoAuthors

Show Your Support

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

Comments
  #162  
Old 10-06-2006, 12:40 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know if this works or not, but this is what I have on one of the forums I am an admin at:

I did this to both postdata_presave and threadfpdata_presave hooklocations.

Code:
global $vbulletin;
		$pagetext =& $this->fetch_field('pagetext', 'post');
		if (($vbulletin->userinfo[posts] < 7) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'[email') or stristr($pagetext,'[EMAIL') or stristr($pagetext,'www.') or stristr($pagetext,'mailto:') or stristr($pagetext,'http://'))) 
    {
     		//eval(standard_error(fetch_error('error_nourlallowed')));
				$this->error('error_nourlallowed');
				$return_value = false;
    }
Reply With Quote
  #163  
Old 10-06-2006, 12:47 PM
mpage mpage is offline
 
Join Date: Aug 2006
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes thats what i have tried above,
but on testing you can still post emails (as one spamer has already found out!)

but I haveny tried the :

or stristr($pagetext,'mailto:')

Ill give it a go!
Reply With Quote
  #164  
Old 10-06-2006, 12:57 PM
mpage mpage is offline
 
Join Date: Aug 2006
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope it doesnt work, people can still pst spam and add attach emails to it, as they have already done on my site!
Reply With Quote
  #165  
Old 10-06-2006, 12:59 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

are you using
Code:
or stristr($pagetext,'[email') or stristr($pagetext,'[EMAIL')
or just
Code:
or stristr($pagetext,'[email')
EDIT: I just noticed a typo in my own code :P
EDIT2: Fixed typo
Reply With Quote
  #166  
Old 10-06-2006, 01:09 PM
mpage mpage is offline
 
Join Date: Aug 2006
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

opps my mistake

you have to add:

or stristr($pagetext,'[email')
or stristr($pagetext,'[EMAIL')
or stristr($pagetext,'[ url')
or stristr($pagetext,'mailto:')
or stristr($pagetext,'@')

to both :
<hookname>postdata_presave</hookname> and <hookname>threadfpdata_presave</hookname>

works a treat now
Reply With Quote
  #167  
Old 11-13-2006, 06:38 PM
HUMMERh3 HUMMERh3 is offline
 
Join Date: Oct 2005
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

err I'm lost on getting the plugin to work with emails...

I add this code:
Quote:

or stristr($pagetext,'[email')
or stristr($pagetext,'[EMAIL')
or stristr($pagetext,'[ url')
or stristr($pagetext,'mailto:')
or stristr($pagetext,'@')

to both :
<hookname>postdata_presave</hookname> and <hookname>threadfpdata_presave</hookname>
to where? Am I suppose to use Erwins for 3.0 ??
Reply With Quote
  #168  
Old 11-13-2006, 10:19 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit Amy's plugin
Reply With Quote
  #169  
Old 11-14-2006, 01:42 PM
syjech syjech is offline
 
Join Date: Aug 2004
Location: Cleveland Ohio
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hope this wont sound stupid. But I am still learning all this. WHere do I upload it to? What directory? Please help
Reply With Quote
  #170  
Old 11-14-2006, 02:44 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't upload it - it is a product. For product installation, go to your admin control panel, Plugin System, Manage Products, Add/Import Product
Reply With Quote
  #171  
Old 11-15-2006, 07:44 PM
HUMMERh3 HUMMERh3 is offline
 
Join Date: Oct 2005
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is no
Quote:
<hookname>postdata_presave</hookname> and <hookname>threadfpdata_presave</hookname>
in amy's plugin.... Here is the entire code below.where do I add the code to includ EMAILS ?
Quote:
or stristr($pagetext,'[email')
or stristr($pagetext,'[EMAIL')
or stristr($pagetext,'[ url')
or stristr($pagetext,'mailto:')
or stristr($pagetext,'@')

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="amykhar_09082005" title="No Links or Images Allowed for People with Fewer t" description="Throws an error message for spammers." version="1.1" active="1">
	<codes>
	</codes>
	<templates>
	</templates>
	<plugins>
		<plugin active="1">
			<title>No Links for People with fewer than 15 posts.</title>
			<hookname>newthread_post_start</hookname>
			<phpcode><![CDATA[$pagetext = $vbulletin->GPC['message'];
if (($vbulletin->userinfo[posts] < 15) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) {
     		eval(standard_error(fetch_error('error_nourlallowed')));
    	}]]></phpcode>
		</plugin>
		<plugin active="1">
			<title>No Links for People with fewer than 15 posts.</title>
			<hookname>newreply_post_start</hookname>
			<phpcode><![CDATA[$pagetext = $vbulletin->GPC['message'];
if (($vbulletin->userinfo[posts] < 15) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) {
     		eval(standard_error(fetch_error('error_nourlallowed')));
    	}]]></phpcode>
		</plugin>
		<plugin active="1">
			<title>No Links for People with fewer than 15 posts.</title>
			<hookname>editpost_update_start</hookname>
			<phpcode><![CDATA[$pagetext = $vbulletin->GPC['message'];
if (($vbulletin->userinfo[posts] < 15) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) {
     		eval(standard_error(fetch_error('error_nourlallowed')));
    	}]]></phpcode>
		</plugin>
	</plugins>
	<phrases>
		<phrasetype name="Front-End Error Messages" fieldname="error">
			<phrase name="error_nourlallowed"><![CDATA[You are only allowed to post URLs to other sites after you have made 15 posts or more. Sorry but this includes Smiley faces as well
			]]></phrase>
		</phrasetype>
	</phrases>
	<options>
	</options>
</product>
Reply With Quote
Reply

Thread Tools

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 03:53 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.04773 seconds
  • Memory Usage 2,304KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_code
  • (3)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
  • (1)pagenav_pagelinkrel
  • (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