Add venue to week view tooltip, week view mobile

Home Forums Calendar Products Events Calendar PRO Add venue to week view tooltip, week view mobile

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #807687
    cruzio
    Participant

    I created this thread previously: https://theeventscalendar.com/support/forums/topic/add-venue-to-week-view-tooltip/. I am still not able to get this to work and am wondering if you could take a peek at my code. I feel like I’m close, but I’m very new to this so hopefully it’s a quick fix in my code.

    single-event-hourly.php: https://gist.github.com/mikebrogan/c737da11decd2ad9aff4
    tooltip.php: https://gist.github.com/mikebrogan/461f2d8a17a13f39a01f

    When I use this code, I see the venue name added to the data-tribejson attribute, but along with it comes eventId with a lot of null values.

    The console reports this error: Uncaught TemplateError: ReferenceError: eventId is not defined (on tribe_tmpl_tooltip line 1)

    I’m thinking the issue is either this line: $additional_values[‘venue’] = tribe_get_venue($event_id);

    or this line: data-tribejson='<?php echo tribe_events_template_data( $event ); ?> <?php echo tribe_events_template_data( $post, $additional_values ); ?>’>

    I’ve tried it a bunch of different ways and I’m thinking I’m just missing the special incantation.

    Once this works, I’m assuming it’s a similar procedure to also add the venue to the week view mobile.php?

    #810330
    Brian
    Keymaster

    Ok I took a look at your coding and see two changes to help you out.

    In tooltip.php

    Try changing the coding to this for the venue title:

    [[ if(venue.length) { ]]
    <p class="venue">Venue: [[=title]]</p>
    [[ } ]]

    In the single-event-hourly.php

    Change this:
    <?php echo tribe_events_template_data( $event ); ?> <?php echo tribe_events_template_data( $post, $additional_values ); ?>

    To just this:

    <?php echo tribe_events_template_data( $event, $additional_values ); ?>

    Once this works, I’m assuming it’s a similar procedure to also add the venue to the week view mobile.php?

    Yep pretty similar.

    Let me know if that works for you.

    Thanks

    #810577
    cruzio
    Participant

    Getting closer. The tooltip displays the new paragraph, but it’s putting the event title in instead of the location. Can you help me figure out why?

    #810893
    Brian
    Keymaster

    Try this instead:

    <p class="venue">Venue: [[=venue]]</p>

    the =title was from the Event Title in the tooltip.

    #812537
    cruzio
    Participant

    Still not quite working. The site is now live here: http://www.cruzio.com/events/week/2014-10-13

    Sometimes the tooltip fires, sometimes it doesn’t. If it does, the location is exactly the same for each event. The console reports this error:
    Uncaught TemplateError: TypeError: Cannot read property ‘length’ of null (on tribe_tmpl_tooltip line 18)

    #812539
    cruzio
    Participant

    The tooltips display upon page load. If I advance a week, they stop displaying, and if I go back a week they still don’t display.

    #812691
    Brian
    Keymaster

    I am afraid I cannot provide any more support on this customization. We have provided all we can in terms of coding and I have to leave it to you to take it from here and troubleshoot the errors.

    As much as I would like to troubleshoot this with you, per our terms of service I cannot do it.

    We have answered your questions in two different topics related to this and got you to the next step each time, but from here you are going to have to take it on your own or find a developer to help troubleshoot this with you.

    Thanks

    #827166
    cruzio
    Participant

    Ok understood. We got so close too! Hopefully I can find someone that can assist.

    Marking as resolved.

    #827516
    Brian
    Keymaster

    Thanks for marking it resolve. I hope you are able to get, it does look like you are close and we some trial and error I think you can get it.

    I am going to close this ticket, but if you need else on another issue or question please post a new topic on the forum and we can help you out.

    Thanks

     

     

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Add venue to week view tooltip, week view mobile’ is closed to new replies.