The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
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
Developer Last Online: Nov 2013
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
|
Comments |
#162
|
||||
|
||||
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; } |
#163
|
|||
|
|||
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! |
#164
|
|||
|
|||
nope it doesnt work, people can still pst spam and add attach emails to it, as they have already done on my site!
|
#165
|
||||
|
||||
are you using
Code:
or stristr($pagetext,'[email') or stristr($pagetext,'[EMAIL') Code:
or stristr($pagetext,'[email') EDIT2: Fixed typo |
#166
|
|||
|
|||
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 |
#167
|
|||
|
|||
err I'm lost on getting the plugin to work with emails...
I add this code: Quote:
|
#168
|
||||
|
||||
Edit Amy's plugin
|
#169
|
|||
|
|||
I hope this wont sound stupid. But I am still learning all this. WHere do I upload it to? What directory? Please help
|
#170
|
||||
|
||||
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
|
#171
|
|||
|
|||
There is no
Quote:
Quote:
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> |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|