• Resolved sparky672

    (@sparky672)


    The text inside the Google Map Marker tooltip all runs together without line-breaks and it’s missing a space between the name and address, like this…

    Venue Name324 Main St, Anytown, IL, 55501

    I’m using the Twentythirteen theme. However, I don’t think it matters because I see the same issue when I activate the stock Twentytwelve theme.

    https://www.ads-software.com/plugins/event-organiser/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Stephen Harris

    (@stephenharris)

    Mmm… I don’t get this on the demo site: wp-event-organiser.com/demo (TwentyEleven / TwentyTwelve / custom theme).

    Could you link to your site?

    Thread Starter sparky672

    (@sparky672)

    I cannot yet publicly link to my site due to the client’s privacy and my NDA. However, I am seeing the exact same thing in your demo…

    https://oi39.tinypic.com/ab1b3n.jpg

    Venue Name32421 Poplar Grove, Anytown, IL, 55501

    That’s with Safari.

    Using Firefox, Chrome, and IE it looks like this…

    https://oi44.tinypic.com/2co3dyx.jpg

    Venue Name
    32421 Poplar Grove, Anytown, IL, 55501

    ——–

    I’m not really understanding why there’s not a line-break, <br/> in the HTML. This is as per my DOM inspector…

    <strong>Venue Name</strong>
    "32421 Poplar Grove, Anytown, IL, 55501"

    I’d also rather have my tooltip display the address more traditionally…

    Venue
    32421 Poplar Grove
    Anytown, IL 55501

    Is there something I can modify in one of the templates to make this happen? If so, where?

    Until I can get the text layout to my liking, is there a way to kill this map-marker tooltip? Within my template, I tried 'tooltip'=>false as per your docs, but it has no effect.

    <?php echo eo_get_venue_map( $venue_id, array('width'=>"100%",'tooltip'=>false) ); ?>

    Thank-you.

    Plugin Author Stephen Harris

    (@stephenharris)

    Ah, I’ve not checked with Safari (I figured the other three would be sufficient!).

    But perhaps this is the issue. As per this line the line break is created via </br>. Which I think isn’t strictly valid, it should be <br> or <br />. Does changing that improve matters?

    With regards to formatting, the content of the tooltip can be changed via this filter: https://wp-event-organiser.com/documentation/hook/eventorganiser_venue_tooltip/ (but I’d still love to get to the bottom of this AWOL line break ?? ).

    R.e. tooltip not disabling: this will be fixed in the next update.

    Thread Starter sparky672

    (@sparky672)

    … the line break is created via </br>.

    Ah, then that absolutely explains it. No, that’s not strictly valid, nor is that even loosely valid, because there’s technically no such thing as an “end tag” for a br element. In other words, there is no “end tag” because br is considered an “empty” tag… you do not use it to surround content:

    This is not valid usage: <br>Invalid</br>

    No such thing: </br>

    https://www.w3.org/TR/html401/struct/text.html#h-9.3.2.1

    Start tag: required, End tag: forbidden

    It’s always either <br> or the “self-closing” <br /> tag. IMHO, the self-closing version, <br />, is more universally valid than the plain <br>.

    ——-

    Meanwhile, the following code added to my child’s functions.php file is working great for me…

    add_filter('eventorganiser_venue_tooltip','my_custom_callback',10,2);
    	function my_custom_callback( $tooltip_content, $venue_id ){
    		$venue_address = eo_get_venue_address( $venue_id );
    		$tooltip_content  = '<strong>'.eo_get_venue_name( $venue_id ).'</strong><br />';
    		$tooltip_content .= $venue_address[address].'<br />';
    		$tooltip_content .= $venue_address[city].', '.$venue_address[state].'? '.$venue_address[postcode];
    		return $tooltip_content;
    	}

    Displays like this…

    Venue Name
    Street Address
    City, State? Zip

    Thank-you!

    Plugin Author Stephen Harris

    (@stephenharris)

    You’re welcome. Will fix the <br> tag in the next update. Thanks for your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Venue map marker tooltip text formatting’ is closed to new replies.