Topic: Filter Events

Home Pro Support Forums General Support Filter Events

Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #6126
    Walter Smoly
    Participant

    Hi,
    I am able to show the day of a certain type of upcoming event.
    I would like to show the events of this day of other calendars in the same feed.
    Thanks for help in advance.
    Best wishes
    Walter

    • This topic was modified 7 months, 3 weeks ago by Walter Smoly.
    #6157
    room34
    Keymaster

    I’m not quite sure I understand what you are asking for, but you can include multiple feeds in one calendar shortcode. If you’re using the Calendar Builder, you can use the Add Another Feed button:

    Or if using a manual shortcode, you can put multiple URLs into the url parameter, separated by the pipe character: |

    #6168
    room34
    Keymaster

    So are you selecting a single arbitrary date in the future (based on the next date of a particular event in the one feed), and you want a way to get all of the events for that date from the other feeds as well? If so, how are you selecting the date?

    This is still all a bit abstract to me. I might need to have a more concrete description of the purpose you’re trying to achieve so I can visualize what else needs to be done. If this is something confidential that you’d prefer not to post in the forum, you can follow up through the Pro Support Request Form and we can continue over email. Thanks.

    #6170
    Walter Smoly
    Participant

    You wrote: “(based on the next date of a particular event in the one feed)”
    It’s not quite like that, but the date is determined by the fact that some event in the one feed is taking place on that day.

    I apologize for the unclear description before. I hope the subject is clearer now.
    Best regards

    #6173
    Walter Smoly
    Participant

    Let’s take the moon calendar as an example:
    I want to show the next upcoming event, which is the beginning of a new phase (e.g. full moon). This is btw no problem, if I use only this calendar.
    But what I don’t know how to do, is to show all the events for that date from the other feeds as well.
    I hope this helps.
    Best wishes

    #6184
    room34
    Keymaster

    Thanks… I think this clears it up. What you’re describing is not really possible as the plugin is currently designed. It might be possible with some custom code. I see a couple of possible ways of doing this.

    First, it depends on which view you’re using. I think this kind of thing is really tailored only to List view. It doesn’t really make sense to display in any other view (at least as I am understanding the objective).

    The PHP Way
    Here you would do some pre-processing; you’d need to parse the feed of the first calendar, to find the date of the next upcoming event. Once you have that date, you would dynamically generate an ICS Calendar shortcode (including all of the feeds) that uses that date as the startdate parameter. It would also need to include limitdays="1" and count="999" (or some arbitrarily large number).

    The JavaScript Way
    This would use the existing shortcode as-is (possibly once again adding count="999"), and then use JavaScript/jQuery to find the next future event from the first feed. This would involve a jQuery selector something like this: jQuery('.ics-calendar .event:not(.past)[data-feed-key="0"]'). You’d actually need to find the first instance of this… which is eluding my brain at the moment. (I just know you can’t use :first-of-type because that only looks at HTML tags, not CSS selectors.) Then you’d hide all of the dates in the list except this one, which you could find by adding .closest('.ics-calendar-date-wrapper') to your jQuery selector.

    #6264
    Walter Smoly
    Participant

    Thank you for your great support.
    Yes, I am using the List view for showing the next upcoming event.
    You wrote: “You’d need to parse the feed of the first calendar, to find the date of the next upcoming event.” This part of the procedure should be part of the plugin, isn’t it?
    If yes, would it be possible to provide it to me? Maybe privately, if necessary?
    Best regards
    Walter

    #6278
    room34
    Keymaster

    The plugin would find the first date from any of the feeds, not a particular one. It does not have logic to give one particular feed a privileged status over the others, which is what it sounds like you would need here.

    #6292
    Walter Smoly
    Participant

    I just would have been interested in the core logic. Never mind, I will get it from somewhere else.
    Thanks Walter

    #6295
    room34
    Keymaster

    Sorry, I didn’t provide the code because what you’re asking for is not at all straightforward and would require some complicated PHP code (plus redundant parsing of the feeds) to achieve. (In other words… it’s just not a good way to go about it.)

    I feel like I would need to know the actual intended use of this (assuming the moon calendar is not the actual use) to provide any meaningful support. You can submit a support request if you’d like to continue this outside of the forums.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.