定制 heimrichhannot/contao-youtube 二次开发

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

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

heimrichhannot/contao-youtube

最新稳定版本:1.5.1

Composer 安装命令:

composer require heimrichhannot/contao-youtube

包简介

Youtube Content Element, with responsive support, preview image, play button and many more.

README 文档

README

YouTube is a contao module to provide responsive youtube videos with preview images and better privacy control. It provides support for content elements and news items.

Technical instruction

Youtube videos can be added to news templates with ease. Just add the following code (for example: news_full.html5):

<?php if ($this->addYouTube): ?>
	<?= $this->youtubeVideo; ?>
<?php endif; ?>

To use preview images from youtube, you have to generate an API key (https://developers.google.com/youtube/v3/getting-started) and place it in the contao settings.

Features

  • Responsive youtube videos (requires jQuery)
  • Preview image for youtube videos
    • If no custom image is given, the preview image will be loaded from youtube and saved under 'files/media/youtube/'
  • Privacy mode (requires jQuery)
    • In privacy mode the video is displayed, after the user accepted a privacy advice within a modal prompt (requires bootstrap 3 modal window support)
    • The user can mark his selection as permanent with a checkbox (state will be saved in a cookie)

alt privacy modal

Content elements

Name Description
ContentYoutube The default core youtube content element with additional features.

Fields

tl_module:

Name Description
youtube_template Select a youtube template within your news module.
autoplay Start the video on page view, only for reader modules.

tl_page:[root pages only]

Name Description
youtube_template Select a youtube template within your root page.
youtubePrivacy Enable youtube privacy mode for all elements on pages within this root page.
youtubePrivacyTemplate Select a youtube privacy template within your root page.

Hooks

Name Arguments Description
parseArticles $objTemplate, $arrItem, $objModule Add youtube to news templates.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2015-01-08