Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #972278

    Hi, dear Enfold-Team,

    you helped me to modify the “Click to load Google Maps”-button when using Google Maps element and the new option that user must accept to show Google Maps. So, now the window “Click to load Google Maps” is showing up by default and not only upon hover; thanks again, that’s great.

    But now my (German) lawyer just adviced that it would be much safer, if there is a double-click solution. The button itself may not be sufficient and GDPR compliant without pointing to the privacy policy first.

    Do you have any idea how to solve this? All your help is really appreciated.

    Thanks so much in advance.

    All the best,
    bkag

    #972998

    Hey Bkag,

    Yes it’s possible but you must hack the theme files and it’s not update safe (thus you must modify the theme file after every update). If we get more request for such a feature we might add an option but for now you must modify the file directly. Open up enfold\framework\js\conditional_load\avia_google_maps_front.js and replace line 134

    
    confirm.on('click', object.AviaMapsLoadConfirmed );
    

    with

    
    confirm.on('dblclick', object.AviaMapsLoadConfirmed );
    

    Best regards,
    Dude

    #973027

    well put the edited js in your child-theme js folder and add this to your child-themes functions.php
    Test if it works:

    add_action( 'wp_enqueue_scripts', 'change_google_maps_front_script', 100 );
    function change_google_maps_front_script() {
       wp_deregister_script( 'avia_google_maps_front_script' );
       wp_enqueue_script( 'avia_google_maps_front_script-child', get_stylesheet_directory_uri().'/js/avia_google_maps_front.js', array( 'jquery' ), $vn, true );
    }
    #973037

    but i think the best would be to have here a popup with a little checkmark that the privacy policy has been read.
    like in contact form element. that would be great – only if the checkmark is checked the click has a function.

    #973066

    i managed to insertBefore a google map a checkbox – but i do not know how to avoid the click event.
    i tried to change the attribut href on that confirmation window but it has no effect on loading the map.

    i did this in functions.php of my child-theme:

    function add_checkbox(){
    ?>
    <script>
    (function($){
        $(window).load(function() {
    
    	$('<input id="maps-consent" type="checkbox" name="maps-consent" label="ja - ich las die Datenschutzerklärung" /><label for="maps-consent" class="input_checkbox_label"> Ich akzeptiere den <a href="https://webers-testseite.de/weber/datenschutz/#google-maps">Datenschutzhinweis über Google Maps</a> <abbr class="required" title="benötigt">*</abbr></label>').insertBefore('.av_gmaps_confirm_link');
    
    	$('a.av_text_confirm_link').click(function(){return false; });
    	$('#maps-consent').click(function() {
    	  if(!$(this).is(':checked')){
    	    $('a.av_text_confirm_link').bind('click', function(){ return false; });
    	  }else{
    	    $('a.av_text_confirm_link').unbind('click');
    	  }
    	});
    
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_checkbox');

    but it is awefully the other way round – it blocks the link on check.
    I do not see the trees for the wood . How can i have it other way round ? Check then bind the event
    have a look here: https://webers-testseite.de/weber/contact-2/

    • This reply was modified 6 years, 5 months ago by Guenni007.
    #973421

    Hey!

    @Guenni007
    – probably the easiest solution is to use css to block the click event:

    
    #top .av_gmaps_confirm_link {
      pointer-events: none;
    }
    

    I strongly suggest don’t deregister the script like you suggested here: https://kriesi.at/support/topic/google-maps-double-click-solution/#post-973027 because it’s a core framework js file and we update it on a regular basis (probably with every update because of api changes). Thus your solution is not update safe either but might cause side effects cause the js file is outdated and breaks other framework components.

    Cheers!
    Peter

    #973494

    and how to correlate to the checkbox checked / unchecked state ?

    #973560

    Hi,
    To be honest I did not look into it. It’s beyond the scope of our support forum and I don’t have the time to debug the code.

    Best regards,
    Dude

    #973596

    Hi,

    thank you for all your efforts and your suggestions.


    @Guenni007
    I think you are right when saying the best would be to have here a popup with a little checkmark that the privacy policy has been read.

    This is an important element that should be implemented by every (German) website owner that uses Google Maps. Acc to my lawyer there is no other way around it, except – of course – disabling Google Maps.

    I think you should ask Kriesi, because he as an Austrian may be affected by this regulation as well.

    What do you think?

    Thank you for your help in advance.

    Kind regards,
    Bkag

    #974007

    If my customer expresses a request, then I try to implement. I explain to them in no case that it is an irrelevant wish.
    So why not place a checkbox similar to the contact form with link to privacy policy in that popup-window, which has to be checked if you want to see the map.

    #974491

    Hi,

    That request also have been forwarded.
    The problem here is that we are moving into the direction to create a full plugin, rather than a fix of what a theme should manage.
    We have although been building some additional functionality, which we will introduce later on.

    Best regards,
    Basilis

    #975319

    No – that is not what i suppose is the problem.
    I think the problem is that Kriesi and the development team do not want to support all these measures to implement the GDPR. This can be clearly seen from the fact that the Kriesi website itself has not set any opt-in procedures itself.
    The checkbox in the contact form has also been implemented late. I think it should not be difficult for you professional coders to put a checkbox with a link to the privacy notices in the hover state of the fallback image. If the checkbox is not set, the map will not be loaded.

    Yes – all this crap makes pages unmanageable for the users and rather discourages visitors; but I can’t advertise my company enough to recoup all the money that would be lost through injunctive relief. And even worse, if it happened to a customer of mine.

    If my customer signs me that he does not want this and is aware of the danger of a warning, then I love to leave all this out.

    _______________________

    because the thread is closed i found for me an acceptable solution – and discussed it here:

    https://kriesi.at/support/topic/google-maps-gdpr-dsgvo/

    #975530

    Hi,

    Thank you for the feedback.
    We will do forward it as should.

    Best regards,
    Basilis

    #979027

    Hi Basilis,

    thank you for your feedback. Will await the outcome. Please let us kindly know asap since this is an issue that cannot wait that much longer. Thank you in advance.

    Best regards,
    Bkag

    #980290

    Hi,

    Unfortunately I cant provide any day or if we will do it or not. Our theme is supposed to provide the basic regarding GDPR.

    Best regards,
    Basilis

    #980743

    Hi Basilis,

    thank you for the info. I think the Google Maps double-click solution is the basic regarding GDPR, because acc to GDPR there is no other way around it, except – of course – disabling Google Maps. The button itself is not sufficient and GDPR compliant without pointing to the privacy policy first and with a checkmark that the privacy policy has been read.

    So, unfortunately, I had to disable Google Maps. However, thank you for all your efforts in this issue.

    Best regards,
    Bkag

    #980775

    Hey!

    I’ll close this thread for now. We’ll announce updates for the maps element here https://kriesi.at/blog or here https://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990

    Best regards,
    Peter

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘Google Maps double-click solution’ is closed to new replies.