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
    }
    

Tags