pitaj / nodebb-plugin-calendar

Fully-featured calendar plugin for NodeBB
42 stars 34 forks source link

External calendar support #46

Open geransmith opened 8 years ago

geransmith commented 8 years ago

It would be great for admins to be able to add external calendars to the main yoursite/calendar view. I suspect just iCal support would be enough for most cases. When clicking into an imported event, it could either reference a webpage or display HTML content. You may need to an option to strip HTML out for security reasons though?

If you wanted to go crazy, you could build something that allows mapping incoming data from a file or other source. Something like reading from a json file periodically and mapping that information to the iCal standard. That might be way beyond a normal persons use case though.

My personal use case is to get this calendar displayed in my forums calendar.

pitaj commented 8 years ago

My personal use case is to get this calendar displayed in my forums calendar.

Is there a JSON or iCal endpoint for this calendar?

geransmith commented 8 years ago

Is there a JSON or iCal endpoint for this calendar?

Not yet. I am seeing if that is something they can do. I mentioned my specific goal to add some color to it, but I do think enabling iCal feeds will be a helpful feature going forward. I will post a link if they can get a JSON or iCal endpoint for OpenCritic.

geransmith commented 8 years ago

@pitaj

The OpenCritic developer team messaged me back. Is there a specific iCalendar data structure you have in mind?

pitaj commented 8 years ago

Either follow the iCal or jCal spec. jCal would be better for me. They are interchangeable with a parser but jCal is JSON-based.

On Jul 29, 2016 16:39, "Geran" notifications@github.com wrote:

@pitaj https://github.com/pitaj

The OpenCritic developer team messaged me back. Is there a specific iCalendar data structure you have in mind?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pitaj/nodebb-plugin-calendar/issues/46#issuecomment-236311330, or mute the thread https://github.com/notifications/unsubscribe-auth/AAxDdSnzAhXqGzu9QwZyPLCpEJdU5vMpks5qaoEzgaJpZM4JYkfx .

geransmith commented 7 years ago

Example ical for the site I am interested: http://c.opencritic.com/calendar/OpenCritic.ics

geransmith commented 7 years ago

Import.

On Jul 1, 2017 11:38 AM, "Florian Kinder" notifications@github.com wrote:

Is this issue for import or export?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pitaj/nodebb-plugin-calendar/issues/46#issuecomment-312448688, or mute the thread https://github.com/notifications/unsubscribe-auth/AHqNgxQtWho5rntivyXNiv-wyz9B9wvvks5sJpINgaJpZM4JYkfx .

Fank commented 7 years ago

I'm currently working on something like that because some of my member request such feature, this is a stupid hardcoded working draft https://github.com/Fank/nodebb-plugin-calendar/commit/19b0d1ad817e0390147ced9776992ae95eac195a .

Blue are the "imported":
image
image

I have some question about implementing the import part.

  1. Where can ics be entered? (only in ACP?)
  2. how should the ical be handled? (Download via job (every 2 hours or with custom interval?) and saved local?)
  3. Maybe a url template or something like that so the user have a "Go to Post" (i this example external link) for the event?
  4. Maybe a custom color per ical? or a "imported ical" one, so people can easily determine this is an external one.

This should be the first version and very simple, so it can be expanded later.

Fank commented 7 years ago

Ah and i forgot one, there should be a permission system for the ical because we don't want to bloat the calender with lots of ical. In example:

Fank commented 7 years ago

@pitaj you may be able to help me, how do i build a list system in the admin ui. Where can new icals be added (and the current list will show the new ical) and some existing icals be deleted. Thats one of my biggest issues i still have.

pitaj commented 7 years ago

If you can get everything else working, I can add the admin UI. Add express handlers for a couple of actions in controllers.js. For example, router.get('/api/admin/plugins/calendar/custom/add', ...), etc. Then you can test if your thing works, and I can add a UI, from there.