-
AuthorPosts
-
October 6, 2019 at 4:02 pm #1145468
Is there a shortcode to check if a status is set or if a status is not set and you can then display a text?
Example:
I have a Slider on my side in which also videos are loaded. Now I would like that if “Embed” is not yet allowed, a message indicating that “Embed” is not yet allowed. Preferably also directly with the shortcode (av_privacy_video_embeds), so that the visitors can set the permission directly.
This is because the video slider only stays black (does not load) and the visitors are not given any information that the video is not being loaded because they did not accept the cookie.
That would be a pity. If there is a shortcode that can be used to check if an av_privacy_XY is active or not active, then you can always output a text that a certain function does not work because the rights were not given. So, much like a no-script command. If the script was not loaded, you can also show there an alternative text. That would be very informative, especially with the full-screen sliders. Overall, it would be good if you gradually ensure that there is always the possibility to display an alternative text, if certain DSGVO function can not be displayed due to lack of rights.
That would help.October 9, 2019 at 11:35 am #1146472Hey senfdazu,
Thank you for the inquiry.
The option is not available by default, but you can do the following steps to render a notification box inside the slider when the users have not accepted the cookies, yet.
Add this script in the functions.php file to append a custom box inside the slider on load.
add_action('wp_footer', function() { ?> <script> (function($) { function getCookie(name) { var value = "; " + document.cookie; var parts = value.split("; " + name + "="); if (parts.length == 2) return parts.pop().split(";").shift(); } var accepted = getCookie('aviaCookieConsent'); if(!accepted) { $('<div class="av-video-privacy-notice"><p>Accept Cookies First</p></div>').appendTo('.av-video-slide'); } })(jQuery); </script> <?php });
You can then use this code in the Quick CSS field to style the box.
.av-video-privacy-notice { width: 100%; height: 100%; background: #fff; z-index: 100; position: relative; text-align: center; display: table; } .av-video-privacy-notice p { position: relative; top: 0; display: inline-block; vertical-align: middle; background: orange; border: 1px solid red; border-radius: 2px; padding: 24px 74px; width: auto; top: 74px; }
Best regards,
IsmaelOctober 11, 2019 at 11:15 am #1147084Thank you very much for your effort.
I just made the code into the functions.php, but nowhere is it a hint.Unfortunately I do not understand the code, but is the cookie hint “aviaCookieConsent” actually correct? There is also the cookie “aviaPrivacyVideoEmbedsDisabled”.
And does not it have to be false or not exist that the note should be displayed?
Since you have to have an opt-in meanwhile (according to EUGH), the visitors will probably have disabled Embed and for that he would be a hint.Greeting
October 14, 2019 at 6:53 am #1147722 -
AuthorPosts
- You must be logged in to reply to this topic.