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 |
#112
|
||||
|
||||
the whole $vbulletin->forum[forumid] bit is your problem. First, you need to see if the forumid is in scope for the plugin. If it is, you're probably supposed to be checking $foriuminfo[forumid] or $forum[forumid] , leave off the vbulletin part.
|
#113
|
||||
|
||||
Ok, I am showing my complete ignorance...but I would rather do it right than screw it up.
1) where in the cp panel to I upload the xml file to? (styles/templates?) 2) I am running 3.0.7...will it work on this version. Thanks for your assistance. |
#114
|
||||
|
||||
sitetutor, you need to use mods in the 3.0 section NOT the 3.5 section
|
#115
|
||||
|
||||
This code worked perfectly for me until I added ArticleBot. I then was told to change this code to:
if(!SKIP_SESSIONCREATE) { global $vbulletin; $pagetext =& $this->fetch_field('pagetext', 'post'); 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_nourlallowe d'))); $this->error('error_nourlallowed'); $return_value = false; } } Now it's not working. I can't seem to figure out the problem. Any suggestions? Thanks. |
#116
|
|||
|
|||
Okay so the XML code is below... what would I do to change to so that the user would be able to post images such as smiley faces?? Anyone know
<?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 20 posts.</title> <hookname>newthread_post_start</hookname> <phpcode><![CDATA[$pagetext = $vbulletin->GPC['message']; if (($vbulletin->userinfo[posts] < 20) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) { eval(standard_error(fetch_error('error_nourlallowe d'))); }]]></phpcode> </plugin> <plugin active="1"> <title>No Links for People with fewer than 20 posts.</title> <hookname>newreply_post_start</hookname> <phpcode><![CDATA[$pagetext = $vbulletin->GPC['message']; if (($vbulletin->userinfo[posts] < 20) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) { eval(standard_error(fetch_error('error_nourlallowe d'))); }]]></phpcode> </plugin> <plugin active="1"> <title>No Links for People with fewer than 20 posts.</title> <hookname>editpost_update_start</hookname> <phpcode><![CDATA[$pagetext = $vbulletin->GPC['message']; if (($vbulletin->userinfo[posts] < 20) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) { eval(standard_error(fetch_error('error_nourlallowe d'))); }]]></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 20 posts or more.]]></phrase> </phrasetype> </phrases> <options> </options> </product> |
#117
|
||||
|
||||
It's not blocking smilies for new users on my site. At least not from my experience. It would stop them from posting remote smilies, but it doesn't seem to impact the local ones.
|
#118
|
||||
|
||||
can i modify this so that i can block certain user groups from posting pics regardless of their post count??
|
#119
|
||||
|
||||
Yes. you could.
|
#120
|
||||
|
||||
man that was fast! haha....would i just add a conditional in front of it with the usergroupid??
|
#121
|
||||
|
||||
Trying to make one more appeal here since I enjoyed this hack.
This code worked perfectly for me until I added ArticleBot. I then was told to change this code to: if(!SKIP_SESSIONCREATE) { global $vbulletin; $pagetext =& $this->fetch_field('pagetext', 'post'); 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_nourlallowe d'))); $this->error('error_nourlallowed'); $return_value = false; } } Now it's not working. I can't seem to figure out the problem. Any suggestions (besides dumping AB)? Thanks. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|