定制 tvalimaa/iframe_cookie_consent 二次开发

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

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

tvalimaa/iframe_cookie_consent

最新稳定版本:1.3.2

Composer 安装命令:

composer require tvalimaa/iframe_cookie_consent

包简介

Adds Ckeditor plugin which converts Youtube iframe embeds to support cookie consent

README 文档

README

Website content loaded in iframes from third party content providers, for example YouTube may set cookies and thereby require a visitor's consent.

https://support.cookiebot.com/hc/en-us/articles/360003790854-Iframe-cookie-consent-with-YouTube-example

https://support.cookiebot.com/hc/en-us/articles/360003812053-Hide-and-show-content-based-on-the-visitor-s-consent

In this module

This module adds Ckeditor plugin which convert Youtube iframe embeds to support cookie consent's. You can choose one of these values: 'preferences', 'statistics', or 'marketing' as data-cookieconsent attribute.

You will find these settings under Content authoring / Iframe cookie consent

/admin/config/content/iframe_cookie_consent

How to use

Go Configuration / Content authoring / Text formats and editors and edit text format which you want to use Iframe cookie consent.

/admin/config/content/formats/

Now under Enabled filters you will see Iframe cookie consent which you just enable

Field support

Youtube video can be embed to content in many way so easiest way to support fields are create or modify field template file.

Here is an example.

<iframe
  {{ attributes }}
  {% if url is not empty %}
    data-cookieblock-src={{ url }}
    data-cookieconsent="marketing"
    class=" cookieconsent-optin-marketing"

    {% if query is not empty %}
      ?{{ query | url_encode }}
    {% endif %}

    {% if fragment is not empty %}
      #{{ fragment }}
    {% endif %}"
  {% endif %}
  >
</iframe>
<div class="cookieconsent-optout-marketing">
   {{ 'Please <a href="javascript:Cookiebot.renew()">accept marketing-cookies</a> to watch this video'|t }}
</div>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2022-09-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固