定制 moosylvania/silverstripe-age-gate 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

moosylvania/silverstripe-age-gate

Composer 安装命令:

composer require moosylvania/silverstripe-age-gate

包简介

Age Gate module for SilverStripe.

README 文档

README

Simple Age Gate module for SilverStripe, ensures that users entering site are 21+.

Requirements

  • SilverStripe 4.0.0+, for 3.x checkout 3.x branch

Installation & Documentation

  1. Clone Repository to your SilverStripe Project or -

     composer require moosylvania/silverstripe-age-gate
    
  2. This will add a route /age-gate to your project and all users will be presented with a yes/no button to validate of age. If you would like the user to type in their date of birth you can set the config option of 'askForAge'

     Moosylvania\AgeGate\Controllers\AgeGateController:
       askForAge: true
    

    To set the format of the dates you can change the config values 'dateFormat' (for the form intro text) and 'dateFieldFormat' for the actual SilverStripe Date Field.

     Moosylvania\AgeGate\Controllers\AgeGateController:
       dateFormat: 'm/d/Y'
       dateFieldFormat: 'MM/dd/yyyy'
    
  3. You can set up where you want a user redirected to if they select 'No' (not of age) by adding the following config value to your site -

     Moosylvania\AgeGate\Controllers\AgeGateController:
       notOfAgeRedirect: 'https://moosylvania.com'
    
  4. You can also setup how old someone needs to be to enter your site (default is 21 by editing the setting)

Moosylvania\AgeGate\Controllers\AgeGateController: yearsOld: 21

  1. Run a dev/build?flush=1 and your site will now be agegated.

统计信息

  • 总下载量: 104
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-06-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固