Events Made Easy › Forums › How do I … › Add extra information to iCal
Tagged: ical
- This topic has 8 replies, 2 voices, and was last updated 4 years, 7 months ago by Anonymous.
-
AuthorPosts
-
Wed 22 Apr 2020 at 11:59 #61134AnonymousInactive
Hi,
The iCal seems to add all the information from the details section for the event, is it possible to add more information to this?
We’re doing more and more online events but don’t want to advertise the URL for the meeting on the event itself, the link is included in the confirmation email but I also want the link to be included in the iCal description when saving it to Outlook.
I’ve looked at this: https://www.e-dynamics.be/wordpress/category/documentation/6-shortcodes/eme_ical_link/ but it doesn’t seem to answer my question.
Hope you can help.
Thanks,
DavidWed 22 Apr 2020 at 13:06 #61135FrankyKeymasterPlease see https://www.e-dynamics.be/wordpress/category/documentation/12-hooks-and-filters/ , filter eme_ical_filter will help you.
Wed 22 Apr 2020 at 14:36 #61136AnonymousInactiveHi,
I’m hoping you Franky, or someone else, might be able to help as it’s getting out of my skill set now… π
What I want is to add some plain text, then a custom attribute after it, so it would be something along the lines of “The URL for the meeting is: #_ATT{TeamsURL}{null}”
This would be underneath the event description that is included as standard.
Hope someone can help.
Thanks,
David.Wed 22 Apr 2020 at 15:01 #61137FrankyKeymasterWell, if you want that for all events, you can change the generic EME option called “ICAL description format”. Next to that: EME supports “virtual-only” (or online-only) meetings, for that just add a location to the event and enter for the location at the bottom the external url. Then the location-url for the event will directly point to there.
Wed 22 Apr 2020 at 15:12 #61138AnonymousInactiveThanks, but unfortunately it’s not for all events as we’re still doing some face to face, we only need to include the custom attribute on those events that are online.
I’ve got it setup with the custom attribute in a template, a confirmation email that is selected as a template for the specific online events. This means they get the link to the online meeting in the confirmation email they get no problem, it would be good if that custom attribute was also in the iCal description.
I don’t know if I could do it globally, as would the custom attribute then be in all iCals (both face to face and online)?
I don’t know if there is a better way to do it, or if it is even possible to do for specific events?
Wed 22 Apr 2020 at 17:07 #61139FrankyKeymasterYou can use the EME conditional tags to test if the value exists for an event (or test for anything of choice), and only then include it. You can use conditional tags in “ICAL description formatβ too (or should be able to, if not it is my bad π )
For conditional tags and examples, see: https://www.e-dynamics.be/wordpress/category/documentation/7-placeholders/7-1-conditional-tags/Thu 23 Apr 2020 at 10:47 #61143AnonymousInactiveThat’s great Franky, I just hope someone will be able to help with the filter now, as that’s beyond my skill set π – I don’t know what line I need to add to the code below to include the custom attribute in the iCal description
function my_ical_filter($ical_entry) { // do a print_r of $ical_entry to see the content // as an example, let's add a line "CLASS:PUBLIC" $ical_entry .= eme_esc_ical("CLASS:PUBLIC"); // other example: remove lines that contains "ORGANIZER" $ical_entry = preg_replace('/ORGANIZER.*\r\n/','',$ical_entry); return $ical_entry; } add_filter('eme_ical_filter','my_ical_filter');
Fri 24 Apr 2020 at 17:11 #61144FrankyKeymasterI wouldn’t go for the filter, but go in the EME settings, tab RSS, and change “ICAL description format” to include something like this:
[eme_if tag="#ESC_ATT{TeamsURL}"]my url: #_ATT{TeamsURL}[/eme_if]Wed 29 Apr 2020 at 12:10 #61152AnonymousInactiveThat worked perfectly, thanks Franky!
I never clicked on the RSS tab as I thought it was only for RSS and never use it!
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.