承接 dtome/cookie-policy 相关项目开发

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

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

dtome/cookie-policy

Composer 安装命令:

composer require dtome/cookie-policy

包简介

README 文档

README

Daniel Tomé Fernández danieltomefer@gmail.com

Introduction:

This plugin provide us a top/bottom bar with cookie policy and a button to accept it.

Image:

promisechains

Instalation:

To install this module you must follow this steps:

1- In your composer.json you must write:

"require": {
        "dtome/cookie-policy": "dev-master",
    },

and

"autoload": {
      "psr-4":{
        "cookiepolicy\\" : "vendor/dtome/cookie-policy"
      }
    }

2- Then you must run the following command line composer update

Configuration:

1-Enable the module on your application.config.php.

'modules' => array(
        'cookiepolicy',
    ),

2- In your view/layout.phtml paste this code under javascript files call (inside of head tag).

<script>
    $(document).ready(function () {
        var cookieName = 'cookiePolicyMyWeb';
        var message = 'Example of message. ';
        var messageButton = 'Accept';
        var days = 10;
        var moreInfoRoute = 'https://www.google.es';
        var moreInfoText = 'More info..';
        //bottom or top
        var cookieBarStyle = 'bottom';

        $.fn.cookieBar(cookieName, message, messageButton, moreInfoRoute, moreInfoText, cookieBarStyle);

        $("#cookiebar-button").click(function () {
             $.fn.createCookie(days);
        });
    });
</script>

3- You must copy the data files to public folder:

data/cookieJs.js to public/js
data/cookieStyle.css to public/css

4- In your layout.phtml define the javascript file and css file like the following:

->prependStylesheet($this->basePath('css/cookieStyle.css'))

->prependFile($this->basePath('js/cookieJs.js'))

Usage:

On your layout.phtml you must add :

<?php echo $this->cookiePolicy(); ?>

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL
  • 更新时间: 2015-09-14