Home › Forums › Calendar Products › Event Aggregator › Import ICS : auto-category possible?
- This topic has 8 replies, 2 voices, and was last updated 10 years, 7 months ago by
Brian.
-
AuthorPosts
-
September 28, 2015 at 7:36 am #1009162
Antoine
ParticipantHi,
When importing via iCal or ICS URL, is it possible to auto-assign (mapping) an Event to a category?
SCREENSHOT: http://i.imgsafe.org/609d011.png
Thanks!
September 28, 2015 at 2:03 pm #1009434Brian
MemberHi Again,
You can only assign one category to an import. So if you would like to assign multiple categories you would want to break the import up by the category and import them that way.
If you would like a more robust category assigning feature, I encourage you to visit our User Voice Page and either upvote an existing request or make a new request there.
Let me know if you have any follow up questions.
Thanks
September 29, 2015 at 6:54 am #1009596Antoine
ParticipantHi,
Thanks, that what I suspected. But is there any snippet that we can add in the functions.php file in order to auto-assign based on keywords in the events NAME or DESCRIPTION or any other fields from the ICS feed?
Thanks
September 29, 2015 at 7:55 am #1009679Brian
MemberHello,
Unfortunately, I do not have any snippets for that.
There is no hook to directly get into our save process, but you could use hook:
save_post_tribe_eventsAnd hook in after the event saves.
Then check for this custom field:
_EventIcalSourceIf that is not blank you are on a iCal Imported Event and could then run a function to determine a category based on the title or content.
That is something to get started, but I am limited in supporting customizations beyond getting you started, but I can try to answer a couple questions.
Thanks
October 1, 2015 at 6:45 am #1010382Antoine
ParticipantHi Brian,
Thanks, that makes sense to wait for the import and then apply a function to assign a category, I will look for that and if I got something I will share it here but it can takes few days before it’s complete.
Regards,
October 1, 2015 at 7:12 am #1010415Antoine
ParticipantBrian,
I was thinking, isn’t this already implemented with the “Keywords” field during importation of a feed?
Where the query is made? In the event title or/and description?
Because if for example we got:
Event title: XXX – Flight for Toykyo
Event dDescription: Flight number TK001
Keyword: Tokyo
Category: TokyoThen will it works?
If so, we only need to import the same feed with different keyword for other category.
Regards,
October 1, 2015 at 8:35 am #1010498Brian
MemberHi,
It is already there, sorry if I did not make that clear in my earlier response. You can search by a keyword and then import those events as and assign them to a category.
Each category would have to be a separate import if you want multiple categories.
As for the keyword we search in the summary and description fields for it in the ical feed.
Does that help?
October 4, 2015 at 1:22 am #1011261Antoine
ParticipantHi Brian,
That’s perfect! Thank you very much.
October 5, 2015 at 6:21 am #1011398Brian
MemberGreat glad it helps.
I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.
Thanks
-
AuthorPosts
- The topic ‘Import ICS : auto-category possible?’ is closed to new replies.
