vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Forbid Users from Posting Links or Images if They Have Fewer than 15 Posts (https://vborg.vbsupport.ru/showthread.php?t=96018)

dethfire 02-13-2006 03:52 AM

can you add no PM to this too?

amykhar 02-13-2006 09:44 AM

You could, but I'm not going to because I don't need that feature.

Code Monkey 02-14-2006 02:04 AM

Quote:

Originally Posted by bondjetta
Has anyone else noticed that this hack causes the Article Bot hack to stop running? Any ideas why? My article bot has 130+ posts so it's not a post count issue...thanks :)

You are absolutely correct, it does seem to shut down articlebot.

bondjetta 02-14-2006 01:00 PM

Quote:

Originally Posted by JumpD
You are absolutely correct, it does seem to shut down articlebot.

any hope of finding a fix? ;) I love this feature (trolls, porn spammers, etc) but i also love articlebot! :D

amykhar 02-14-2006 01:11 PM

I don't use articlebot. It's going to be up to a user who uses both of these mods to find a fix.

bondjetta 02-14-2006 01:13 PM

Quote:

Originally Posted by amykhar
I don't use articlebot. It's going to be up to a user who uses both of these mods to find a fix.

i know, you already said that, hence why i quoted Jump D :)

amykhar 02-14-2006 01:18 PM

Quote:

Originally Posted by bondjetta
i know, you already said that, hence why i quoted Jump D :)

oops. Sorry :)

bondjetta 02-14-2006 01:19 PM

Quote:

Originally Posted by amykhar
oops. Sorry :)

no problem! I know it's not worth trying to figure out if you aren't using AB...and i'm patient so I'll wait till either it figures itself out or someone else gets fed up ;) lol

Code Monkey 02-14-2006 01:20 PM

Quote:

Originally Posted by bondjetta
any hope of finding a fix? ;) I love this feature (trolls, porn spammers, etc) but i also love articlebot! :D

It could be because articlebot does not use sessions and cookies. But you should probably discuss it over there. We don't want to Hijack amykhar's thread. ;)

Code Monkey 02-16-2006 03:09 AM

******************HACK*******************

If you are using my Articlebot hack you will need to implement this hack to amykhar's so that the two can coexist. You should probably implement it if you want to ensure it will not interfere with any automated posting script.

Simply change the plugins so they are wraped in this if clause that checks if the post/thread is being made by human or bot.

replace the code in the plugins with:

PHP Code:

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_nourlallowed')));
        
$this->error('error_nourlallowed');
        
$return_value false;
    }


Enjoy

Jump

bondjetta 02-16-2006 12:30 PM

Quote:

Originally Posted by JumpD
******************HACK*******************

If you are using my Articlebot hack you will need to implement this hack to amykhar's so that the two can coexist. You should probably implement it if you want to ensure it will not interfere with any automated posting script.

Simply change the plugins so they are wraped in this if clause that checks if the post/thread is being made by human or bot.

replace the code in the plugins with:

PHP Code:

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_nourlallowed')));
        
$this->error('error_nourlallowed');
        
$return_value false;
    }


Enjoy

Jump

Thank you Jump!!! :D

Bulent Tekcan 02-21-2006 09:37 PM

Future release maybe inline address bypass :) Because message says

You are only allowed to post URLs to other sites after you have made 15 posts or more.

But not accept normal forum address :)

Thanks

Pink-Lotus 02-27-2006 02:39 PM

Thanks a lot Amy x]

kira 03-04-2006 10:52 PM

Many many thanks for the incredibly useful product. Ah, think of the trouble I'd've saved if I'd only had this over the past seven years of my site ... !

bluecat 03-07-2006 03:46 AM

Anyone know if this works in 3.5.4? Thanks.

dethfire 03-07-2006 03:47 AM

Quote:

Originally Posted by bluecat
Anyone know if this works in 3.5.4? Thanks.

yes it works just fine

Turbosport 03-07-2006 04:01 PM

This stops smilies from working as well, can this be fixed ?

Megareus Rex 03-08-2006 07:49 PM

I don't think this has been addressed...

For my site, when a member with less than 15 posts tries to log on, instead of the "you've logged on" page, they get the "users with too few posts cant post links" page. They still log on successfully, but it doesn't redirect them, and could cause confusion.

EDIT: Hmmm, apparently, it only happened once, with an admin-created account. Odd.

nathanrich 03-13-2006 07:21 AM

Quick question, and a newbie one at that. Can I modify this to require a minimum amount of User Reputation instead of a minimum number of posts? What would I need to change to do this? Thanks.

Todd123 03-21-2006 02:07 AM

Nice. Just what I was looking for. Clicks install :D.

Andreas 03-23-2006 12:21 PM

@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;



the Sandman 03-23-2006 06:53 PM

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;




amykhar 03-23-2006 07:21 PM

sandman, the parameter for fetch_userinfo is $userid.

Andreas 03-24-2006 12:50 AM

I knew I would mess up something ^.^
Though, it was just the missing userid as amy already pointed to - edited the post.

the Sandman 03-24-2006 01:20 AM

Thanks!

Bulent Tekcan 03-24-2006 06:29 AM

Title is ......Fewer than 15 Posts but here is (($userinfo['posts'] < 2) It must be 15 I think :)

Darat 03-24-2006 08:47 AM

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?

pipin 03-24-2006 09:18 AM

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.

aeroguy 03-27-2006 06:43 PM

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://')))
{

HUMMERh3 03-27-2006 07:04 PM

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!!!

amykhar 03-27-2006 07:05 PM

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.

SiteTutorInc 03-29-2006 05:46 PM

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.

amykhar 03-29-2006 07:01 PM

sitetutor, you need to use mods in the 3.0 section NOT the 3.5 section

TitanJeff 03-30-2006 12:16 AM

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.

HUMMERh3 03-30-2006 09:00 PM

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>

amykhar 03-30-2006 09:24 PM

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.

blacklancer 03-31-2006 05:50 PM

can i modify this so that i can block certain user groups from posting pics regardless of their post count??

amykhar 03-31-2006 05:54 PM

Yes. you could.

blacklancer 03-31-2006 05:58 PM

man that was fast! haha....would i just add a conditional in front of it with the usergroupid??

TitanJeff 04-06-2006 12:04 PM

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.


All times are GMT. The time now is 06:55 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01658 seconds
  • Memory Usage 1,868KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete