heimrichhannot / contao-youtube
Youtube Content Element, with responsive support, preview image, play button and many more.
Installs: 2 079
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 7
Forks: 0
Open Issues: 1
Type:contao-module
Requires
- php: ~5.4 || ~7.0
- contao-community-alliance/composer-plugin: ~2.4 || ~3.0
- contao/core-bundle: ^3.5.1 || ~4.1
- heimrichhannot/contao-haste_plus: ~1.1
- heimrichhannot/contao-tagsinput: ^2.1.13
- dev-master
- 1.5.1
- 1.5.0
- 1.4.11
- 1.4.10
- 1.4.9
- 1.4.8
- 1.4.7
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.17
- 1.3.16
- 1.3.15
- 1.3.14
- 1.3.13
- 1.3.12
- 1.3.11
- 1.3.10
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2019-10-29 08:56:20 UTC
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)
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. |