Posted: July 16, 2014 at 4:57 pm
|
Hi, I am using [LISTATTENDEES] shortcode in the espresso-calendar.php file to display attendees on the calendar tooltips. This is working fine. I would like to also list attendees on the actual calendar events below the event title. If so how will the code vary from this:
and where should I place it in the file? Cheers, Tony |
|
Hi, So you want the listattendees to show on the actual calendar blobs? While in theory it’s possible you may find it difficult to make it look good. If you edit espresso-calendar.php at approx. line 577 and add $x = do_shortcode('[LISTATTENDEES paid_only="true" show_gravatar="true"]'); $events[ $cntr ]['title'] .= htmlspecialchars_decode(stripslashes($x ), ENT_QUOTES); Then it will add it. HOWEVER, it does not process it correctly due to plugin making the HTML show as raw. I have been unable to pinpoint where it does this exactly, so you would need to figure that out before it becomes of any use. |
|
Hi Dean, |
|
OK, I’ve got it to work, but you’re going to need to edit two files and as suspected the results will not look that good as the content area is so narrow. Do what we did above, but with one slight difference: $x = do_shortcode('[LISTATTENDEES paid_only="true" show_gravatar="true"]'); $events[ $cntr ]['mychanges'] .= htmlspecialchars_decode(stripslashes($x ), ENT_QUOTES); (Notice the mychanges bit instead of the title?) Then in /wp-content/plugins/espresso-calendar/scripts/espresso_calendar.js at about line 249 chaneg this: eventAfterRender : function( event, element, view ) { }, to this: eventRender: function(event, element) { element.find('.fc-event-title').append(event.mychanges); }, Resources |
The support post ‘List Attendees on Calendar Events’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.