IBS Events

IBS Events is a plugin for creating and scheduling events for IBS Calendar display.

The custom post-type “ibs_event” is added to the WordPress admin.

While it is not essential to have IBS Calendar plugin installed for IBS Events to work, there is no native way provided by IBS Events to otherwise view the events created, outside of using the admin facilities.

Internals

As noted in the readme.txt this plugin uses the rrule.js engine for recurring events. When the calendar.js is activated it will make an ajax call to the server to obtain all ibs_event instances and store them client side. When Full Calendar requests events for the current calendar view calendar.js will scan the loaded ibs_events for appropriate events to display.

If during the scan an event is found that repeats the repeat pattern is used to query rrule.js for occurrences matching the calendar view dates. This keeps all the recurring logic in the code javascript  client side and none on the server side. While there is a PHP version of rrule.js, which it is itself a copy of a Python utility, it is avoided because there always seem to be nuances and differences  in the implementation.

And each environment, PHP, javascript, jquery, and Full Calendar,  have uniquely different date handling and date formatting. Full Calendar utilizes the moment.js for dates and formatting of dates and IBS Events uses that as its convention. IBS Events will use, when available, IBS Calendar’s Full Calendar options for date formatting.