Recurring events – determining where i am in the sequence

Home Forums Calendar Products Events Calendar PRO Recurring events – determining where i am in the sequence

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #127294
    cromerpier
    Participant

    I am using a recurring event and each event has it’s own unique url, used for the booking button (we use a third party booking system). I can’t add this to individual events without breaking the event out of the series, something I don’t want to do. So, i figured i could use custom fields to add the url for each day. For example:

    day 1 : http://www.blah.com?id=23
    day 2 : http://www.blah.com?id=24

    I think this will work fine, providing i can hook into the individual day and cross reference it with the correct custom field. I was thinking I could perhaps store the data like this:

    1|www.blah.com?id=23
    2|www.blah.com?id=23

    So that i can extract the day by splitting on the pipe. What i’m not sure how to do, is find out where in the series of events the actual event i’m looking at is. So that if i’m looking at day 2 in the sequence, i can match it with ‘2|www.blah.com?id=23’ and extract the url.

    I may be looking at it totally the wrong way! Any suggestions would be brilliant. Big thanks in advance.

    #127305
    cromerpier
    Participant

    Ah thinking about it further, I could just use the post ID. e.g.
    153|www.blah.com?id=23
    154|www.blah.com?id=24
    Not a very elegant solution though. Particularly as i will need to instruct the user in adding the id at the start.
    Any other solutions?

    #127756
    Barry
    Member

    Well, conceivably you could store this as a piece of post meta per individual recurring event. The current user interface to some extent masks the fact that this is possible – but certainly if you added a meta box to the event editor and to facilitate this and handled updates for that piece of data by ajax it would be fairly smooth and clean.

    I’m not sure how much that helps if at all, but I do feel confident in saying you can basically create a nice, clean implementation for this without too much work.

    Good luck!

    #128087
    cromerpier
    Participant

    Thanks for the reply.
    I couldn’t add the post meta to individual events though, could I? As i would break the chain if I try to edit any of the ‘child’ events. They would still need to be added in bulk?…

    #128314
    Barry
    Member

    Not if you run with the current workflow, no. However you don’t necessarily need to do that – especially if you are building a customization – as you could work around this programmatically and target only the individual child post in question.

    Really that’s just to posit an alternative approach to the problem – you could certainly go with what you proposed previously in your reply-before-last.

    As this is custom development territory, though, there isn’t a great deal more assistance we can provide – so I’ll go ahead and close this – but we do wish you luck 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Recurring events – determining where i am in the sequence’ is closed to new replies.