Event custom reoccurrence in different StartTimes

WordPress Event Management, Calendars & Registration Forums General Question Event custom reoccurrence in different StartTimes

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5465

    Is it possible to do this?
    Sample: One event reoccurs in five custom days and starts in custom times.

    I tried to change it in Table “eo_events” column “StartTime” it works till next event dates update.

    All current events id’s are deleted and new created with default StartTime. Is there a solution for this to leave event id’s the same or something like this?

    Jancex
    #5475

    Hi Jancex,

    This is not possible ‘out of the box’, and this is entirely a user-interface issue – that is to say its in terms of the api its technically possible with a few changes, but I’m yet to come up with a user-friendly way of allowing times to be set per-date.

    If you, or anyone else is able to produce a workable solution then I’d love to see it :).


    Workaround

    A ‘workaround’ is to ‘break’ each occurrence and edit the time. But then each occurrence becomes its own event.


    TLDR;

    With a few changes the API can easily handle different dates. But having an easy-to-user, intuitive, and ‘out of the way’ (for those that don’t need it) way of altering times on an occurrence basis is hard.

    If anyone is up for having a crack it, please fork the plug-in – because I’d love to see what you come up with!


    Hooks

    If you want to try this without altering the plug-in files there are a couple of filters that can help, you’ll need to check the source for details.

    eventorganiser_generate_occurrences

    See source.

    Takes the arguments $_event_data, and $event_details. These are both ‘event data’ arrays (see docs on eo_update_event()). The value being filtered is $_event_data is essentially a copy of $event_data with the generated occurrences added in so you can replace it with the new occurrences (i.e. same dates at different times). Though you do not know what event it is (necessarily) – so you’ll want to check that you’re on the event admin page, an use get_the_ID().

    eventorganiser_update_event_event_data

    See source. Filters event data passed to eo_update_event()). You have the event (post ID) available to you, so you can specifically exclude all generated occurrences (use _eventorganiser_generate_occurrences for this) and then include the same occurrences (with different time).

    Why is this so difficult?

    Because the api isn’t expecting to handle occurrences at different times. It can be extended to cater for varying times. But finding a way of collecting that data from humans in an easy to use way, is difficult!

    Stephen Harris
    #7619

    Hey Steve,

    Definitely agree it’s a difficult problem, Here’s what I came up with for another project (see below). This would work great if you used it in combination with your date picker calendar. Date picker would create a row for each date and default to the times set above, then the user could select different times from the drop downs as required (you wouldn’t need the closed checkbox obviously).

    Would be awesome to see this feature though!

    date picker

    Cheers,

    Tim Ettle
    #7632
    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Event custom reoccurrence in different StartTimes’ is closed to new replies.