Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
Ban User from Specific BBCodes / Stop URL Spamming Details »»
Ban User from Specific BBCodes / Stop URL Spamming
Version: 1.00, by Michael Morris Michael Morris is offline
Developer Last Online: Jun 2009 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 07-25-2004 Last Update: Never Installs: 8
 
No support by the author.

Let's face it - some users are jerks when it comes to posting. They'll use 30 point fonts for the whole darn post or colors that are hard to read and when you ask them to please stop it, you get a cornball response equivalenting to a two-year-old's "I don't wanna, you can't make me!!"

Actually, with this hack you can.

As hacks go, this is one of the simplest that you may ever install but it has a lot of potential flexiability. Instead of holding hands and telling you to replace X with Y at each step, I'm going to tell you how to modify this hack to suit your needs depending on what you want. I promise to do my best at keeping the instructions clear even to those with no coding experience.

This hack can also be used in combination with vbulletin's inbuilt promotions feature to stop new users from using certain bbcodes - most prominently the URL code that spammers are prone to abuse.

This hack was tested on RC4 and gold (3.0.0)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-26-2004, 01:16 PM
Datenpapst Datenpapst is offline
 
Join Date: Mar 2004
Location: Vienna
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Michael_Morris
Let's face it - some users are jerks when it comes to posting. They'll use 30 point fonts for the whole darn post or colors that are hard to read and when you ask them to please stop it, you get a cornball response equivalenting to a two-year-old's "I don't wanna, you can't make me!!"

Actually, with this hack you can.

As hacks go, this is one of the simplest that you may ever install but it has a lot of potential flexiability. Instead of holding hands and telling you to replace X with Y at each step, I'm going to tell you how to modify this hack to suit your needs depending on what you want. I promise to do my best at keeping the instructions clear even to those with no coding experience.

This hack can also be used in combination with vbulletin's inbuilt promotions feature to stop new users from using certain bbcodes - most prominently the URL code that spammers are prone to abuse.

This hack was tested on RC4 and gold (3.0.0)
hmm turning it off by usergroup is nothing for me. Because creating a new group for some jerks?
Reply With Quote
  #3  
Old 07-27-2004, 12:42 PM
Johnny's Avatar
Johnny Johnny is offline
 
Join Date: Jun 2002
Posts: 290
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it seeems like a really cool hack that i wouldnt expected to be released, but this might come handy for me. thx
Reply With Quote
  #4  
Old 09-04-2004, 04:42 AM
Keyser S?ze's Avatar
Keyser S?ze Keyser S?ze is offline
 
Join Date: Apr 2002
Location: USA
Posts: 690
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yea, a definition of each would be great, like where the ilactic is, or bold

i got this one guy and hes for the most part fine, but he uses ilactic in every post, annoys me, id love to turn that off for him

thanks

-edit-

anyway to make it so they cant use ANY caps?
Reply With Quote
  #5  
Old 10-15-2004, 01:02 AM
Computer Mutt's Avatar
Computer Mutt Computer Mutt is offline
 
Join Date: Oct 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whoo. Nice. I'll be using this a lot. Some... lots of people really ask for it.

Reply With Quote
  #6  
Old 11-05-2004, 09:00 AM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Me!
Only one problem I have. Could you please tell me where the img code is located? It doesn't seem to have it listed by itself. I tried disabling each code one-by-one to test (via admin panel) and I have just had no luck.

Thank you
Image Code can't be turned off this simply... But I think there's a way. Try this (Note I haven't tested this)...

Create a usergroup to ban from images and note the #

In /includes/functions_bbcodeparse.php search for this code:

PHP Code:
// ###################### Start bbcodeparse #######################
function parse_bbcode($bbcode$forumid 0$allowsmilie 1$isimgcheck 0$parsedtext ''$parsedhasimages 0$iswysiwyg 0)
{
    
// $parsedtext contains text that has already been turned into HTML and just needs images checking
    // $parsedhasimages specifies if the text has images in that need parsing

    
global $vboptions$parsed_postcache
Replace the last line (global $vboptions, $parsed_postcache with

PHP Code:
global $vboptions$parsed_postchace$bbuserinfo
Directly underneath add this code:

PHP Code:
$bannedfromimg 
X is the usergroup id you want banned from img code.

Search for this code

PHP Code:
    switch($forumid)
    {
        
// parse private message
        
case 'privatemessage':
            
$dohtml $vboptions['privallowhtml'];
            
$dobbcode $vboptions['privallowbbcode'];
            
$dobbimagecode $vboptions['privallowbbimagecode'];
            
$dosmilies $vboptions['privallowsmilies'];
            break;

        
// parse user note
        
case 'usernote':
            
$dohtml $vboptions['unallowhtml'];
            
$dobbcode $vboptions['unallowvbcode'];
            
$dobbimagecode $vboptions['unallowimg'];
            
$dosmilies $vboptions['unallowsmilies'];
            break;

        
// parse non-forum item
        
case 'nonforum':
            
$dohtml $vboptions['allowhtml'];
            
$dobbcode $vboptions['allowbbcode'];
            
$dobbimagecode $vboptions['allowbbimagecode'];
            
$dosmilies $vboptions['allowsmilies'];
            if (
$allowsmilie != 1)
            {
                
$dosmilies $allowsmilie;
            }
            break;

        case 
'announcement':
            global 
$post;
            
$dohtml $post['allowhtml'];
            if (
$dohtml)
            {
                
$donl2br 0;
            }
            
$dobbcode $post['allowbbcode'];
            
$dobbimagecode $post['allowbbcode'];
            
$dosmilies $allowsmilie;
            break;

        
// parse forum item
        
default:
            
$forum fetch_foruminfo($forumid);
            
$dohtml $forum['allowhtml'];
            
$dobbimagecode $forum['allowimages'];
            
$dosmilies $forum['allowsmilies'];
            if (
$allowsmilie != 1)
            {
                
$dosmilies $allowsmilie;
            }
            
$dobbcode $forum['allowbbcode'];
            break;
    } 
Replace with

PHP Code:

    
switch($forumid)
    {
        
// parse private message
        
case 'privatemessage':
            
$dohtml $vboptions['privallowhtml'];
            
$dobbcode $vboptions['privallowbbcode'];
            if (!
is_member_of($bbuserinfo$bannedfromimg))
            {
            
$dobbimagecode $vboptions['privallowbbimagecode'];
            }
            
$dosmilies $vboptions['privallowsmilies'];
            break;

        
// parse user note
        
case 'usernote':
            
$dohtml $vboptions['unallowhtml'];
            
$dobbcode $vboptions['unallowvbcode'];
            if (!
is_member_of($bbuserinfo$bannedfromimg))
            {
            
$dobbimagecode $vboptions['unallowimg'];
            }
            
$dosmilies $vboptions['unallowsmilies'];
            break;

        
// parse non-forum item
        
case 'nonforum':
            
$dohtml $vboptions['allowhtml'];
            
$dobbcode $vboptions['allowbbcode'];
            if (!
is_member_of($bbuserinfo$bannedfromimg))
            {
            
$dobbimagecode $vboptions['allowbbimagecode'];
            }
            
$dosmilies $vboptions['allowsmilies'];
            if (
$allowsmilie != 1)
            {
                
$dosmilies $allowsmilie;
            }
            break;

        case 
'announcement':
            global 
$post;
            
$dohtml $post['allowhtml'];
            if (
$dohtml)
            {
                
$donl2br 0;
            }
            
$dobbcode $post['allowbbcode'];
            
$dobbimagecode $post['allowbbcode'];
            
$dosmilies $allowsmilie;
            break;

        
// parse forum item
        
default:
            
$forum fetch_foruminfo($forumid);
            
$dohtml $forum['allowhtml'];
            if (!
is_member_of($bbuserinfo$bannedfromimg))
            {
            
$dobbimagecode $forum['allowimages'];
            }
            
$dosmilies $forum['allowsmilies'];
            if (
$allowsmilie != 1)
            {
                
$dosmilies $allowsmilie;
            }
            
$dobbcode $forum['allowbbcode'];
            break;
    } 
Backup your /includes/functions_bbcodeparse.php file before applying these changes as they are untested. They don't involve any queries so they can't cause any long term harm to your boards. Let me know if they work (they should unless I've missed something causing a parse error.
Reply With Quote
  #7  
Old 05-08-2005, 11:20 PM
Jenta Jenta is offline
 
Join Date: Dec 2004
Posts: 377
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i installed this but unless im misunderstanding something it only stops them from viewing bbcode
i ran a test account posted some bbcode. it didnt display for me under the test account
logged in normally and the bb code was parsed
Reply With Quote
  #8  
Old 07-04-2005, 04:21 PM
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Location: California
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone update this for 3.0.7

It appears from the last couple of posts there are problems.

I dont want to disable bbcodes all together.

I just want a couple of user groups to not be able to post links in certain forums
Reply With Quote
  #9  
Old 08-07-2005, 11:19 PM
YabbaDabba YabbaDabba is offline
 
Join Date: May 2004
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vB 3.0.7

This would be brilliant of it would allow me to prevent a certain group from using certain BB codes. Most specifically, I would like to prevent new forum members from using the [url] and [img] tags.

Is this going to be updated?

TIA,
Reply With Quote
  #10  
Old 08-09-2005, 07:34 PM
LEAD_WEIGHT LEAD_WEIGHT is offline
 
Join Date: Feb 2005
Location: Canada
Posts: 369
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well this would be great if I can use it for SWF. I would like it only the Admin. to be the only one to control this.
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 07:20 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.04919 seconds
  • Memory Usage 2,346KB
  • Queries Executed 24 (?)
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
  • (5)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete