- 🇮🇩Indonesia gausarts
Looks like fixed there :)
Feel free to re-open if anything to add at Blazy.
Thanks. Automatically closed - issue fixed for 2 weeks with no activity.
Sorry to disturb here and not finding a solution myself yet, but I think I need help.
We're running into the following issue in cookies_video (submodule of https://www.drupal.org/project/cookies/ → ): #3322867: Blazy videos not blocked properly (src vs. data-src) →
When using Cookies in combination with blazy, the Video source is not successfully blocked if no consent is given.
What's needed is a reliable way to have all iframe src's blocked (via data-src) until consent is given.
I tried the following hooks:
/**
* Alters Blazy individual item output to support a custom lightbox.
*
* @param array $build
* The renderable array of image/ video iframe being modified.
* @param array $settings
* The available array of settings.
*
* @ingroup blazy_api
*/
function hook_blazy_alter(array &$build, array $settings = []) {
if (!empty($settings['media_switch']) && $settings['media_switch'] == 'photoswipe') {
$build['#pre_render'][] = 'my_module_pre_render';
}
}
/**
* Alters Blazy outputs entirely to support a custom (quasy-)lightbox.
*
* In a case of ElevateZoom Plus, it adds a prefix large image preview before
* the Blazy Grid elements by adding an extra #theme_wrappers via #pre_render
* element.
*
* @param array $build
* The renderable array of the entire Blazy output being modified.
* @param array $settings
* The available array of settings.
*
* @ingroup blazy_api
*/
function hook_blazy_build_alter(array &$build, array $settings = []) {
// Since 2.6, non-configurable settings are mostly grouped under `blazies`.
// For pre 2.6, please use $settings['NAME'] directly.
$blazies = $settings['blazies'];
// All (quasi-)lightboxes are put directly under $blazies for being unique.
// This also allows a quasi-lightbox like ElevateZoomPlus inject its optionset
// as its value: elevatezoomplus: responsive, etc.
if ($blazies->get('colorbox') || $blazies->get('zooming')) {
$build['#pre_render'][] = 'my_module_pre_render_build';
}
}
but that doesn't seem to be the correct approach. Now I'm trying to add a further prerender function to the 'blazy' theme render array, but I'm also not sure, if that's the best and most safe way.
As all EU countries and further states / countries are affected by GDPR topic and cookie / third party blocking, I'd like to ask the blazy maintainers for help here.
Thanks a lot in advance!
Fixed
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Looks like fixed there :)
Feel free to re-open if anything to add at Blazy.
Thanks.
Automatically closed - issue fixed for 2 weeks with no activity.