Download the PHP package heimrichhannot/contao-youtube-bundle without Composer
On this page you can find all versions of the php package heimrichhannot/contao-youtube-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download heimrichhannot/contao-youtube-bundle
More information about heimrichhannot/contao-youtube-bundle
Files in heimrichhannot/contao-youtube-bundle
Package contao-youtube-bundle
Short Description Youtube Content Element, with responsive support, preview image, play button and many more.
License LGPL-3.0-or-later
Informations about the package contao-youtube-bundle
YouTube
YouTube-Bundle is not actively maintained anymore, as we developed a successor bundle: Video Bundle.
YouTube bundle aims responsive youtube videos with preview images and better privacy control. It provides support for content elements and news items.
An valid Youtube Data API Key is required for automatic preview image support (enter on in contao system settings or on your root page).
If you upgrade from heimrichhannot/contao-youtube, see the upgrade notices.
Features
- Responsive youtube videos
- 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/'
- ConfigElements for List- and Readerbundle.
- Encore Bundle support
- Privacy mode
- In privacy mode the video is displayed, after the user accepted a privacy advice within a modal prompt
- The user can mark his selection as permanent with a checkbox (state will be saved in a cookie)
Technical instruction
Add to list and reader item templates
For usage with List- and Readerbundle you first need to add the config elements in List- and/or Reader config.
Afterwards you can add youtube to your template. The config elements add a formatted value youtubeVideos
containing an array for each youtube field add by an config element.
Example custom template:
News template
Youtube videos can be added to news templates with ease. Just add the following code (for example: news_full.html5):
Preview images from YouTube
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.
Commands
Migration Command
Developers
Events
Event | Event ID |
---|---|
Event to interact with AlertifyJs 'onshow' event | huh.youtube.event.alertify.onshow |
Event to interact with AlertifyJs 'onfocus' event | huh.youtube.event.alertify.onfocus |
Upgrade notice from heimrichhannot/contao-youtube
- Use
huh:youtube:migration
command to migrated the default template settings in root pages and relatedYoutubeNews database field - Declare an Youtube-API Key in tl_settings or tl_page (otherwise preview image download wont work)
- The modal windows for privacy dialog or modalvideo require additional css, that is not delivered by the bundle. Markup fits Bootstrap modal window css, so you are well-advised to use the css from that framework.
- If you were using custom youtube
.html5
templates, migrate them to.html.twig
templates, if you need help: check the default templates
All versions of contao-youtube-bundle with dependencies
contao/core-bundle Version ^4.9
heimrichhannot/contao-encore-contracts Version ^1.0
heimrichhannot-contao-components/alertifyjs Version 1.11.2
heimrichhannot/contao-request-bundle Version ^1.2
heimrichhannot/contao-utils-bundle Version ^2.60
symfony/service-contracts Version ^1.0 || ^2.0 || ^3.0
twig/twig Version ^1.44.6 || ^2.14 || ^3.0