Topic: Filter Events
Home › Pro Support Forums › General Support › Filter Events
Tagged: Filter
- This topic has 9 replies, 2 voices, and was last updated 7 months, 2 weeks ago by
room34.
-
AuthorPosts
-
February 1, 2023 at 4:23 am #6126
Walter Smoly
ParticipantHi,
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.
February 2, 2023 at 12:48 pm #6157room34
KeymasterI’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:|
February 3, 2023 at 3:14 pm #6168room34
KeymasterSo 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.
February 4, 2023 at 5:40 am #6170Walter Smoly
ParticipantYou 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 regardsFebruary 5, 2023 at 8:30 am #6173Walter Smoly
ParticipantLet’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 wishesFebruary 6, 2023 at 9:59 am #6184room34
KeymasterThanks… 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 thestartdate
parameter. It would also need to includelimitdays="1"
andcount="999"
(or some arbitrarily large number).The JavaScript Way
This would use the existing shortcode as-is (possibly once again addingcount="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.February 8, 2023 at 9:04 am #6264Walter Smoly
ParticipantThank 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
WalterFebruary 9, 2023 at 3:23 pm #6278room34
KeymasterThe 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.
February 10, 2023 at 9:50 am #6292Walter Smoly
ParticipantI just would have been interested in the core logic. Never mind, I will get it from somewhere else.
Thanks WalterFebruary 10, 2023 at 12:37 pm #6295room34
KeymasterSorry, 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.
-
This topic was modified 7 months, 3 weeks ago by
-
AuthorPosts
- You must be logged in to reply to this topic.