Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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.

    #1146472

    Hey 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,
    Ismael

    #1147084

    Thank 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

    #1147722

    Hi,

    Thank you for the update.

    Make sure that the cookies are removed from the local storage, or try to check the page on incognito mode. Where can we see the site?

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.