Home › Forums › Calendar Products › Events Calendar PRO › Previous month as well as 12 months ahead
- This topic has 7 replies, 3 voices, and was last updated 9 years, 7 months ago by
Cliff.
-
AuthorPosts
-
September 29, 2016 at 7:44 am #1170365
Bryan
ParticipantWe are using the following URL for our iCal feed : http://<domain>/calendar/?ical=1&year-feed=1
It works in that we can always see a year into the future.
The issue we have is that a meeting is removed from our calendar 10 minutes prior to the meeting start. A lot of my users have complained that meeting details (start time, room, location, agenda, etc) are suddenly gone right before the meeting.
Is there a way to configure the feed so that it displays the past 30 days as well displays the next years worth of meetings? This would eliminate our issue.
The iCal is setup as a subscribed calendar on an iOS device. There is no setting that allows me to keep the events on my calendar.
Any help would be appreciated.
Thanks,
Bryan
September 29, 2016 at 9:46 am #1170540Cliff
MemberHi Bryan.
It sounds like you’re only asking about the iCal feed and not the RSS feed.
If I’m understanding you correctly, you’re saying the iCal feed (that your users subscribe to) is working fine except that their calendars don’t update within the 10 minutes you change an event (e.g. at 11:50am, changing an event scheduled at noon).
And you think this is because the iCal feed only includes future events and therefore you want to include past events to make sure their calendars update that event that starts at noon.
Did I get all that correct?
September 29, 2016 at 10:01 am #1170555Bryan
ParticipantHi Cliff.
Sorry about the RSS feed part – I was writing this while on a conference call. Never a good idea to multi-task.
Your assessment of the issue is correct.
The way it seems to work now, any past meeting is removed from my calendar. I’m fine with this; there’s no need to keep years worth of meetings. But the downfall to this is that right as the meeting is about to start, it’s removed from my iPhone calendar. I can only assume that my phone is doing a synch as I look at my calendar. I’ve looked for ways to tell it not to do this, but no luck. I was hoping the iCal feed could give a list of meetings that happened in the past (maybe last 30 days….even last 7 days would be fine) plus the events in the future. That way the event isn’t removed right as it starts.
Thanks,
Bryan
September 29, 2016 at 10:06 am #1170560Bryan
ParticipantBTW – if you want to re-title this ticket/topic/post, please do so. That way others can find it should they encounter this same issue. I tried, but I didn’t see where to make the change.
September 29, 2016 at 1:30 pm #1170677Cliff
MemberThanks for confirming. I did remove “RSS Feed” from this thread’s title.
Could you please provide the code snippet / plugin code you’re using to generate the year feed?
September 30, 2016 at 6:16 am #1170968Bryan
ParticipantAh…..I’m starting to see the light. I made some assumptions that the ical link was hardcoded, not generated by a custom function. You know what they say about assumptions….
Here’s what I currently have:
add_action( ‘pre_get_posts’, ‘tribe_custom_month_time_range_ics_export’ );
function tribe_custom_month_time_range_ics_export( WP_Query $query ) {
if ( ! isset( $_GET[‘ical’] ) || ! isset( $_GET[‘year-feed’] ) ) {
return;
}$query->set( ‘eventDisplay’ , ‘custom’ );
$query->set( ‘start_date’ , ‘now’ );
$query->set( ‘end_date’ , ‘+ 365 days’ );
$query->set( ‘posts_per_page’, -1 );
}For giggles, I changed the start_date parm to ‘- 30 days’ and this appears to have solved my issue.
Thank you for pointing me in the right direction.
-Bryan
September 30, 2016 at 3:39 pm #1171272Cliff
MemberAwesome job! Thanks for sharing your code to clarify your answer and help others who may find this in the future.
-
AuthorPosts
- The topic ‘Previous month as well as 12 months ahead’ is closed to new replies.
