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
  #112  
Old 03-27-2006, 07:05 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #113  
Old 03-29-2006, 05:46 PM
SiteTutorInc's Avatar
SiteTutorInc SiteTutorInc is offline
 
Join Date: Feb 2006
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #114  
Old 03-29-2006, 07:01 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sitetutor, you need to use mods in the 3.0 section NOT the 3.5 section
Reply With Quote
  #115  
Old 03-30-2006, 12:16 AM
TitanJeff's Avatar
TitanJeff TitanJeff is offline
 
Join Date: Jul 2002
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #116  
Old 03-30-2006, 09:00 PM
HUMMERh3 HUMMERh3 is offline
 
Join Date: Oct 2005
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #117  
Old 03-30-2006, 09:24 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #118  
Old 03-31-2006, 05:50 PM
blacklancer's Avatar
blacklancer blacklancer is offline
 
Join Date: Jan 2006
Location: so cal
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can i modify this so that i can block certain user groups from posting pics regardless of their post count??
Reply With Quote
  #119  
Old 03-31-2006, 05:54 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes. you could.
Reply With Quote
  #120  
Old 03-31-2006, 05:58 PM
blacklancer's Avatar
blacklancer blacklancer is offline
 
Join Date: Jan 2006
Location: so cal
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

man that was fast! haha....would i just add a conditional in front of it with the usergroupid??
Reply With Quote
  #121  
Old 04-06-2006, 12:04 PM
TitanJeff's Avatar
TitanJeff TitanJeff is offline
 
Join Date: Jul 2002
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 06:42 AM.


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.04917 seconds
  • Memory Usage 2,300KB
  • 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
  • (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
  • (2)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