EO handling of event finish times

This topic contains 2 replies, has 2 voices, and was last updated by  Stephen Harris 10 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12077

    I’m trying to modify the plugin to allow for varying start/finish times for weekly reoccurring events.

    I’m looking at _eventorganiser_generate_occurrences and figuring out where to modify the event times for the different occurrences. I see that in the loop to set up the schedule, the event’s start day is used, as well as it being used in the loop to generate the actual occurrences. However, I don’t see the finishing time being used anywhere, except when being validated earlier on in the function.

    Is it brought up elsewhere that I should be aware of? I want to be able to set custom start and end times to events, but occurrences seem to only use the starting time… Is there somewhere I should be looking, that you know of? Where would you recommend setting the ending time for occurrences?

    Thanks!

    Alex Reynolds
    #12078

    Hi Alex,

    If you look at _eventorganiser_insert_occurrences() you’ll see that the duration of the first occurrence is calculated and used to generate the finish times of the event. So the duration of each occurrence is fixed, according to the first.

    This may well change: as I mentioned in this thread there is currently a development branch (edittime) for altering start date/times on the admin calendar. I’ll be pushing the changes to GitHub in the next few days. Initially the duration of each occurrence will still be fixed, but the admin calendar does allow (although its currently disabled) for events to be resized (i.e. duration changes).

    But there are a few canges that would need to happen, above and beyond what changes have been made in the edittime branch

    • The include argument would need some way of accepting and recognising periods (i.e. include occurrence with given start and end time) rather than just a date.
    • _eventorganiser_generate_occurrences would need to generate 2D array of start and end datetimes
    • _eventorganiser_insert_occurrences would need to use that to insert/update event dates.

    I’ll post an update on the thread I’ve linked to once the edittime branch is up on GitHub.

    Stephen Harris
    #12094

    Here’s a link to the development branch for allowing individual occurrences to have differing start times. Durations are still fixed at this point: https://github.com/stephenharris/Event-Organiser/tree/edittime

    Stephen Harris
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.