Banned Items

  • What does it do?

    The jrBanned module allows the admin user to Create, Update and Delete Banned names, words and IP addresses.
  • How to Use

    Enter the value for an item you want to ban.

    IP Address: Enter a valid IP Address or partial IP Address to block all system requests to your system from the IP.
    Profile or User Name: Enter words or partial words that cannot be used in a User Name, Profile Name or Profile URL.
    Forbidden Word: Any word entered as a forbidden word will not be allowed in items created by a User and if used as a search string no results will be returned.

    Then create the new item.
  • screenshot of the banned items in the ACP
  • IP Address

    Every time the core of jamroom loads, it fires an event called 'process_init'.

    'process_init' is fired when the core has initialized. Its at this point when banned ip's are checked.

    If an ip address is found in the banned list, the user will see:
    Quote: You do not have permission to access this server
  • Profile or User Name

    Entering a value here will cause that to be not available as a profile or username.

    Probably a good idea if you have directories you want to designate for an alternative purpose.
  • Forbidden Word

    Adding a word to the banned forbidden words list will make that word be stripped and replaced with a single space. ' '
  • For Developers

    You can use the jrBanned modules features when creating forms by adding in a 'ban_check' => 'word', to the form field creator of your module.

    eg:
        // Action Text
        $_tmp = array(
            'name'      => 'action_text',
            'label'     => "Activity",
            'help'      => "Update your activity post",
            'type'      => 'textarea',
            'ban_check' => 'word',
            'validate'  => 'printable',
            'required'  => true
        );
        jrCore_form_field_create($_tmp);
    

    Will check the text in the activity text form field against the banned word list.
  • You can use the other features by utilizing the jrBanned_is_banned() function.

    Take this example from the jrComments module. It wants to check if the word is in the banned words list for the comment text, but doesn't want to require that the jrBanned module be active for the comments module to work.

    So the jrCore_run_module_function() is used. The jrCore_run_module_function() is a way to say "If the module is active, then run this function."

    Here is the code from the jrComment module that checks to see if the Banned module exists, and if it is //do something

    // Check for banned words..
    if ($ban = jrCore_run_module_function('jrBanned_is_banned', 'word', $_post['comment_text'])) {
        //do something
    }
    
suptube
04 Feb 2016 02:00:39AM @suptube:
I've added a few words to the banned items word list - and tested it but it doesn't seem to work in the areas I would think it would? I can see the 'banned words' on member profiles?

it appears to pick it up if the banned words is used in the title of a blog entry, but if the same word is used in the blog text - it allows it, it's also allowed on profile updates?

any suggestions on what I might be doing wrong ? This one appears quite simple? can't understand why it's not working throughout the site ? thanks in advance.

brian
06 Feb 2016 09:36:20AM @brian:
The Banned Module works via "listeners" - that is on create/update it will scan the incoming text and reject it if it contains banned words. It will not impact EXISTING entries that may already have been created.

Best to post any questions you have to the Support Forum:

https://www.jamroom.net/the-jamroom-network/forum

Thanks!

Share This

Tags