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)

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:03 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.01194 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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