bad-words-filter The component for replacement bad words on ***

  1. Requirements
  2. Usage
  3. Installation

The component for replacement bad words on ***. It's intended for forms, which can be can be filled by users. Base is complete for russian words especially, but you can complete personal base of words in BadWords.php.

Requirements

Yii 1.1.x

Usage

1) In model rules()

"surname" and "name" - it's the names of properties in your model.

array('surname, name', 'filter', 'filter'=>array("BadWords", "replacement")),

2) Like a method

$name = Yii::app()->badWords->replacement($name);

Installation

1) Copy this file in /protected/components/

2) Add this component in /protected/config/main.php

'components'=>array(
        .........
        'badWords' => array(
            'class' => 'badWords'
        )
        .........
     ),
6 0
7
830
Yii Version: 1.1
License: BSD-2-Clause
Category: Security
Developed by: ardem ardem
Created: Sep 8, 2011
Updated: 14 years ago

Downloads

show all

Related Extensions