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

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
  #102  
Old 03-23-2006, 12:21 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@amykhar
This Hack has a serious bug which causes issues with other Hacks that automatically create threads (and are using others users for this):
You check the posts for the viewing user, instead of checking the posts for the user that makes the post.

Corrected Plugins:
postdata_presave
PHP Code:
// get useriinfo for this post
$userid =& $this->fetch_field('userid');
$userinfo fetch_userinfo($userid);
$pagetext =& $this->fetch_field('pagetext''post');

if ((
$userinfo['posts'] < 15) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) 
{
    
$this->error('error_nourlallowed');
    
$return_value false;

threadfpdata_presave
PHP Code:
// get useriinfo for this post
$userid =& $this->fetch_field('postuserid');
$userinfo fetch_userinfo($userid);
$pagetext =& $this->fetch_field('pagetext''post');
if ((
$userinfo['posts'] < 15) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) 
{
    
$this->error('error_nourlallowed');
    
$return_value false;

Reply With Quote
  #103  
Old 03-23-2006, 06:53 PM
the Sandman's Avatar
the Sandman the Sandman is offline
 
Join Date: Aug 2003
Location: Tampa, FL
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This causes an error on my board for anyone replying to a thread:

Warning: Missing argument 1 for fetch_userinfo() in /includes/functions.php on line 998

Quote:
Originally Posted by Andreas
@amykhar
This Hack has a serious bug which causes issues with other Hacks that automatically create threads (and are using others users for this):
You check the posts for the viewing user, instead of checking the posts for the user that makes the post.

Corrected Plugins:
postdata_presave
PHP Code:
// get useriinfo for this post
$userid =& $this->fetch_field('userid');
$userinfo fetch_userinfo();
$pagetext =& $this->fetch_field('pagetext''post');

if ((
$userinfo['posts'] < 2) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) 
{
    
$this->error('error_nourlallowed');
    
$return_value false;

threadfpdata_presave
PHP Code:
// get useriinfo for this post
$userid =& $this->fetch_field('postuserid');
$userinfo fetch_userinfo($userid);
$pagetext =& $this->fetch_field('pagetext''post');
if ((
$userinfo['posts'] < 2) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) 
{
    
$this->error('error_nourlallowed');
    
$return_value false;

Reply With Quote
  #104  
Old 03-23-2006, 07:21 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sandman, the parameter for fetch_userinfo is $userid.
Reply With Quote
  #105  
Old 03-24-2006, 12:50 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I knew I would mess up something ^.^
Though, it was just the missing userid as amy already pointed to - edited the post.
Reply With Quote
  #106  
Old 03-24-2006, 01:20 AM
the Sandman's Avatar
the Sandman the Sandman is offline
 
Join Date: Aug 2003
Location: Tampa, FL
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
Reply With Quote
  #107  
Old 03-24-2006, 06:29 AM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Title is ......Fewer than 15 Posts but here is (($userinfo['posts'] < 2) It must be 15 I think
Reply With Quote
  #108  
Old 03-24-2006, 08:47 AM
Darat Darat is offline
 
Join Date: Aug 2004
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Andreas
@amykhar
This Hack has a serious bug which causes issues with other Hacks that automatically create threads (and are using others users for this):
You check the posts for the viewing user, instead of checking the posts for the user that makes the post.

Corrected Plugins:
postdata_presave

threeadfpdata_presave
I'm probably being completely stupid - but what do I edit to fix the bug?
Reply With Quote
  #109  
Old 03-24-2006, 09:18 AM
pipin's Avatar
pipin pipin is offline
 
Join Date: Jan 2005
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bulent Tekcan
Title is ......Fewer than 15 Posts but here is (($userinfo['posts'] < 2) It must be 15 I think
probably he adjusted it for is own needs, i lowered it at our forum to 5.
Reply With Quote
  #110  
Old 03-27-2006, 06:43 PM
aeroguy aeroguy is offline
 
Join Date: Nov 2005
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mod is great However, amykhar is there a way to disable it for certain forums. For example this would conflict with the Reported Posts mod since members with less then 15 posts would not be able to report posts.
I tried the following but it didnt work.

if (($vbulletin->userinfo[posts] < 15) and ($vbulletin->forum[forumid]!=X) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://')))
{
Reply With Quote
  #111  
Old 03-27-2006, 07:04 PM
HUMMERh3 HUMMERh3 is offline
 
Join Date: Oct 2005
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to let the users who has less than 15 posts be able to post Smiley faces? Right now if a user types in a message and uses a smiley faces it doesn't let them post. Frankly I don't mind the smiley faces...? Anyone know how to change this?

Thanks!!!
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 05:13 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.08578 seconds
  • Memory Usage 2,338KB
  • 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_php
  • (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