WebPurifyPlugin - 1.0
Powerful profanity filter for symfony
You are currently browsing
the website for symfony 1
Uses the WebPurify service to check for profanity
This plugin wraps the WebPurify web service in a symfony validator so it is easy to prevent profanity from being entered into a site.
The initial release provides one validator: WebPurifyProfanityValidator, but we may implement the other methods in the future.
|Mark Stralka||lead||moc.liamg <<ta>> aklartsm|
Copyright (c) 2010 Mark Stralka
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WebPurify provides a cost-effective real-time profanity filtering service.
This plugin provides sfWebPurifyProfanityValidator, which rejects a value if it contains profanity.
Future versions may implement the other methods available from WebPurify
Purchase an API key from WebPurify. You can signup for a test license by entering localhost for the IP address.
Add the following to your app.yml file:
all: webpurify: api_key: YOUR API KEY HERE
To use it in your forms, combine it with the existing validator for a given field by using sfValidatorAnd:
$this->validatorSchema['name'] = new sfValidatorAnd(array( $this->validatorSchema['name'] , new WebPurifyProfanityValidator() ));
You could also invoke the LiveCheck method without the validator by doing this:
$command = new WebPurifyLiveCheckCommand(sfConfig::get('app_webpurify_api_key'), 'Text to check for profanity'); $isClean = $command->isClean(); //returns TRUE or FALSE
We developed and released this plugin, but we are not affiliated with WebPurify so do not contact us for WP support issues.