承接 cleantalk/yii-antispam 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cleantalk/yii-antispam

Composer 安装命令:

composer require cleantalk/yii-antispam

包简介

Anti-spam yii extension by CleanTalk with protection against spam bots and manual spam.

README 文档

README

Build Status

Yii-antispam

Anti-spam by CleanTalk extension with protection against spam bots and manual spam.

No Captcha, no questions, no counting animals, no puzzles, no math.

If you find this project useful, please consider starring ⭐ it on GitHub — it helps us grow and support development!

Requirements

Websites that trust CleanTalk!

CleanTalk Anti-Spam Rating

##Usage

  1. Get access key on https://cleantalk.org/register?platform=yii

  2. Extract content from archive under protected/extensions/yii-antispam

  3. Open your application configuration in protected/config/main.php and modify components section:

// application components
'components'=>array(
    ...
        'cleanTalk'=>array(
            'class'=>'ext.yii-antispam.CleanTalkApi',
            'apiKey'=>'*****',
        ),
    ...
),
  1. Add validator in your model, for example ContactForm
class ContactForm extends CFormModel
{
    public $name;
    public $email;
    public $body;
    ...
    public function rules()
    {
        return array(
            ...
            array('body', 
                    'ext.yii-antispam.CleanTalkValidator', 
                    'check'=>'message', /* Check type message or user */
                    'emailAttribute'=>'email',  
                    'nickNameAttribute'=>'name',
                    /*'on'=>'insert' if ActiveRecord using */),
            ...
        );
    }
    ...
}
  1. In form view add special hidden element
<?php $form=$this->beginWidget('CActiveForm', array(
    ...
    <?php echo Yii::app()->cleanTalk->checkJsHiddenField()?>
    ...
    <?php echo CHtml::submitButton('Submit'); ?>
    ...
<?php $this->endWidget(); ?>

##License GNU General Public License

##Resources

统计信息

  • 总下载量: 1.44k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 16
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 16
  • Watchers: 4
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2014-06-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固