Home › Forums › Calendar Products › Events Calendar PRO › Add venue to week view tooltip, week view mobile
- This topic has 8 replies, 2 voices, and was last updated 9 years, 6 months ago by Brian.
-
AuthorPosts
-
October 13, 2014 at 8:59 am #807687cruzioParticipant
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/461f2d8a17a13f39a01fWhen 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?
October 14, 2014 at 8:07 am #810330BrianKeymasterOk 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
October 14, 2014 at 9:31 am #810577cruzioParticipantGetting 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?
October 14, 2014 at 12:53 pm #810893BrianKeymasterTry this instead:
<p class="venue">Venue: [[=venue]]</p>
the =title was from the Event Title in the tooltip.
October 15, 2014 at 10:17 am #812537cruzioParticipantStill 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)October 15, 2014 at 10:18 am #812539cruzioParticipantThe 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.
October 15, 2014 at 11:54 am #812691BrianKeymasterI 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
October 22, 2014 at 9:32 am #827166cruzioParticipantOk understood. We got so close too! Hopefully I can find someone that can assist.
Marking as resolved.
October 22, 2014 at 12:29 pm #827516BrianKeymasterThanks 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
-
AuthorPosts
- The topic ‘Add venue to week view tooltip, week view mobile’ is closed to new replies.