Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter kbeatt

    (@kbeatt)

    As an addendum to my post, since the events for the day stop at 3:10, you probably won’t find any of the issues I brought up in my original post. The school day starts at 8:35 am EST if anyone wants to help figure it out then.

    Thanks

    Plugin Author anmari

    (@anmari)

    Hi – have I understood correctly?

    You only want to show 1 event, the current event? And you are sure there will never be 2 that start at the same time?

    Have you tried also specifying events=1

    http://icalevents.com/support/documentation/shortcodes/

    Thread Starter kbeatt

    (@kbeatt)

    Yes. I have tried using events=1 and events=2(wanted to test how it looked). While it did show only one event, it would show just the first event of the day and not the current event or any other event for the rest of the day. It would only show the 8:30am event no matter what time it was.

    Plugin Author anmari

    (@anmari)

    Hi, thats the default operation. People found it too confusing if they didn’t see the events of the currentday (even if the events were over 😉 )

    However also using hours=x should have forced it to start from the current hour.

    It seems to work to me:

    http://home.friendscentral.org/?hours=1&events=1 (athletics says none in that case when I looked at it at your 10am i think)
    maybe
    http://home.friendscentral.org/?hours=10&events=1 is better ?
    still shows first of each events in each section you have

    Thread Starter kbeatt

    (@kbeatt)

    The first one is better and probably the one I will use in the widget’s shortcode. The second one showed all the events for the day when we only need to show the current and the next even in the Middle School and Upper School widgets.

    Thanks for the help

    Another question, how would I show the next day’s first event at the end of today’s events? Is that possible or should I try something different instead?

    Plugin Author anmari

    (@anmari)

    Hi – you have two parameters here – the no of hours and the number of events. All you need to do is apply some arithmetic.

    IF YOU KNOW that your events always follow a certain pattern – say last event of day finishes at 5pm and next starts at 8am.
    That’s 15 hours inbetween. So you could use
    hours=15 (or maybe 16) to be safe and events=1. Only the first event in the 15 hour window will be shown.

    Please note that you should consider how necessary this is to have these all on the one page. You might find at times the page will be slow…. It’s 3 ics files that I could see that have to be loaded, parsed, events calculated and then stripped back for display based on the parameters you have chosen. I’d guess you would want to be sure that the ics producer doesn’t issue an ever increasingly large file (google tends to this – it still has all the past events in that have to be parsed in case they are repeating etc).

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Show current event from ical’ is closed to new replies.