Home › Forums › Calendar Products › Filter Bar › Add Orgaziner to calendar detail overlay (Part II)
- This topic has 15 replies, 3 voices, and was last updated 10 years ago by Casey.
-
AuthorPosts
-
March 31, 2014 at 6:05 am #125122LarsParticipant
In relation to this: https://tri.be/support/forums/topic/add-orgaziner-to-calendar-detail-overlay/ – this doesn’t work anyhow:
<?php echo tribe_get_organizer($event->ID); ?>.
It only returns the first created Organizer (on the Organizer list) and not the actual different Orgaziners for each event.
March 31, 2014 at 9:26 pm #125876CaseyParticipantmending,
Thanks for getting in touch. As this is related to a customization, we unfortunately won’t be able to provide further support on this. Feel free to look at our developer docs to understand further how this function works.Thanks! 🙂
-Casey-
April 1, 2014 at 12:51 am #125911LarsParticipantBut if you cannot provide a single line of code that works (though you developed it) how should then we be able to look this up?
April 1, 2014 at 12:46 pm #126338RobMemberHey Lars! It looks like Casey attempted to point you in the general direction for you to display the organizer name in the tooltips, but you haven’t yet tested these suggestions? Or are we misunderstanding and your question is that you can’t find out how to do this via the dev docs resource Casey linked to.
Sounds like this is ultimately a customization, after chatting with Casey – are you saying that the answer provided here (https://tri.be/support/forums/topic/add-orgaziner-to-calendar-detail-overlay/#post-123480) didn’t help point you in the right direction? What about that code is giving you problems?
April 1, 2014 at 1:02 pm #126351LarsParticipantHi Rob! We did of course test it – placing this <?php echo tribe_get_organizer($event->ID); ?> in the right spot in the tooltip.php file. But as described the code is not showing the right Organizer for each event. Something is wrong ($event->ID).
April 2, 2014 at 6:40 am #126746CaseyParticipantLars,
You’ll definitely want to make sure that you’ve updated your tooltips template files since upgrading to vesion 3.5, as we’ve made a lot of changes with how the tooltip templating functions. That might help to address your issue. Thanks! 🙂-Casey-
April 2, 2014 at 6:51 am #126760LarsParticipantOf course we updated to version 3.5 as well as the tooltip.php file itself. But nonetheless – it doesn’t work. As described: your line of code: <?php echo tribe_get_organizer($event->ID); ?> will pick and show the same Organizer for all our events in the Tooltip – and not the right Organizer (as they are different from one another) by it’s related Event ID.
If Modern Tribe doesn’t know how get this information out by it’s right ID – we can’t see how we should be able to do it ourselves by referring to your resources and guides?
April 2, 2014 at 6:58 am #126763CaseyParticipantLars,
It looks like the Event ID is getting passed using a different variable name in the new tooltips.php file, so this code should work for you:
<?php echo tribe_get_organizer($event_id); ?>
Give that a shot and let me know if it does the trick. Thanks! 🙂
-Casey-
April 2, 2014 at 7:35 am #126829LarsParticipantSame result. It just shows the same Organizer (the one with the highest ID number) for all events.
April 2, 2014 at 8:11 am #126875CaseyParticipantOk, I’m still getting my feet wet on the new tooltip templating system, so thanks for bearing with me. If you look in views/month/single-event.php, you’ll see a very thorough write-up on how the new JavaScript templating system works, along with the ability to add your own variables for use within tooltip.php using the tribe_events_template_data() function.
Go ahead and override the template and replace the code at the bottom of views/month/single-event.php (starting at line 191) with the following code: https://gist.github.com/ckpicker/9936083
Then you’ll need to update your tooltip template to display this organizer variable that we’ve made available. You can do that using the following code:
[[ if(organizer.length) { ]]
Organizer: [[=organizer]]
[[ } ]]
That should finally get you where you need to be with this. Give that a shot and let me know if you have further questions. Thanks! 🙂
-Casey-
April 2, 2014 at 8:28 am #126894LarsParticipantThanks, but it didn’t work either. It causes the Tooltip box to not show at all. Did you test this yourselves? Guess we just have to leave this as it seems just a difficult for you – as it is for all of us – to work with your calender.
April 2, 2014 at 8:33 am #126896CaseyParticipantLars,
Yes, I tested this successfully in my own environment. Different organizers were displaying for me with no issues. Did you make the modifications to single-event.php?April 2, 2014 at 8:36 am #126901LarsParticipantOh… I’m working with Week View. Not Month View… so that’s why! Is that possible as well?
April 2, 2014 at 8:43 am #126909CaseyParticipantThat would explain it. 😉 Yes, this is possible, you’ll just want to modify views/pro/week/single-event-hourly.php to use some of the code that I shared for the single-event.php file, and then update views/pro/week/tooltip.php using the code I shared above.
Keep in mind that you might have to modify some of the code in order for this to work in week view. For example you’ll need to change some of the variable names ($event_id to $event->ID) in order for the Organizer to be retrieved successfully.
You should be able to take my month view example and modify it for Week View fairly easily. Good luck! 🙂
-Casey-
April 2, 2014 at 11:47 am #127023LarsParticipantDid you get this to work with Week View? If so please advice. Thanks a lot.
-
AuthorPosts
- The topic ‘Add Orgaziner to calendar detail overlay (Part II)’ is closed to new replies.