Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1345134

    Hi,

    we’ve used the Google Maps media element and would like to change the behavior of the link when cookies are deactivated. The client doesn’t want a redirect to Google Maps in a new Tab but a reload of the frame itself, even when all other external cookies are deactivated. As soon as I accept all cookies via cookie notice bar the behavior is according to the clients’ wishes: page reloads and the map still requires confirmation – once clicked it appears as intended.

    I’m aware that the text itself could be changed in the de_DE.po file but I’m struggling to figure out how to avoid the external redirect to Google Maps.

    If needed I can set up an admin access for you.

    Thanks in advance.

    #1345314

    Hey tebitron gmbh,

    Thank you for the inquiry.

    This is possible but you will have to modify the enfold/config-templatebuilder/avia-shortcodes/google_maps/google_maps.php around line 785, look for this code.

    	if( 'confirm_link' == $google_link )
    				{
    					$html_overlay = '<a href="#" class="av_gmaps_confirm_link av_text_confirm_link' . $button_class . '">';
    					$text_overlay = esc_html( $confirm_button );
    				}
    				else
    				{
    					$html_overlay .= '<a class="av_gmaps_page_only av_text_confirm_link' . $button_class . '" href="' . esc_url( $url ) . '" target="_blank">';
    					$text_overlay = esc_html( $page_link_text );
    				}
    

    Replace it with:

    $html_overlay = '<a href="#" class="av_gmaps_confirm_link av_text_confirm_link' . $button_class . '">';
    $text_overlay = esc_html( $confirm_button );
    

    This will replace the new tab link with the button that refreshes or loads the map on click.

    Have you tried setting the map’s Advanced > Conditional Load > Link to Google Maps settings to the second option (User must accept to show google maps)?

    Best regards,
    Ismael

    #1345334

    Hi Ismael,

    thanks for your help. This worked so far.

    How to I add a link and/or a button into the notification badge?

    Thanks in advance.

    #1345354

    Hi Ismael,

    for whatever reason Microsoft Edge doesn’t seem to display the changes.

    The badge on the map is supposed to say: “Durch den Klick …”
    Instead it is showing an old version: “Aufgrund deiner Datenschutzeinstellungen …”

    The backend is fine, the revisions make sense, the map settings are OK.

    I’ve installed Fastest Cache and tried shift F5 – no success. I’m lost.

    #1345437

    Hi,

    Instead it is showing an old version: “Aufgrund deiner Datenschutzeinstellungen …”

    The changes are displaying correctly on our end as shown in the screenshot below. Please try to check the site on incognito mode or test it on another device.

    Screenshot: https://1drv.ms/u/s!AjjTfXSRbKTvwEieHBV0RqB4DoZ4?e=efUL5T

    Best regards,
    Ismael

    #1345488

    Hi Ismael,

    thanks for your confirmation.

    Kind regards.

    #1345528

    Hi,

    No problem. Please do not hesitate to open another thread if you have more inquiries regarding the theme. We will close this one for now.

    Have a nice day.

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Google Maps link when cookies are deactivated’ is closed to new replies.