37

Product support

Get help in the plugin support forum.

Categories

MyCalendar plugin

This plugin adds a great calendar feature to OctoberCMS.

Features

  • Choose to store events in your own application tables or use the events table provided.
    • Using a blank calendar components, you can populate it with your own applications event data
    • Using the calendar components tied to the built-in events table, you can easily manage and display simple or advanced HTML formatted events .
  • Manage events in simple back-end form- ( Now with rich text editor ).
  • Allow some or all logged in users to add their own events with a front-end form that includes an easy to use rich editor to format the events.
  • Use complex recurring dates including repeating interval cycles used in fire department shift calendars.
  • Multiple Views
    • Single Event View
    • Event List View
    • Month View
    • Week View ( New! 1/26/2017 )
  • Localization files allow full translation
    • en ( US ) December 11, 2015
    • pt_BR Portuguese ( Brazil ) added December 12, 2015 by ribsousa
    • de ( German ) added Jun 3, 2016 by Drikani
    • nl ( Dutch ) added Mar 18, 2018 by wverhoogt@github

**MyCalendar was built to be extendable for your own needs. You can use it as is or add fields with your own plugins and make use of great display features.

Optionally works with:

Month View With Events

Installation

( Installation code : kurtjensen.mycalendar )

Download the plugin to the plugins directory and logout and log in back into October backend. Go to the MyCalendar page in the backend and add your events.

MyCalendar plugin

This plugin adds a simple calendar with events database feature to OctoberCMS.

  • Easily add a calendar to your site and populate with your own event dates
  • Store dates in a simple table through backend form
  • Events can be edited with a rich editor in the backend with installation of Wysiwyg Editors by Anand Patel(*NEW)

MyCalendar was built soley to be extended to do what you need. You can use it as is or add fields with your own plugins.

Go to the MyCalendar page in the backend and add your events.

Display Month calendar on page

  • Drag "Month Component" to the page layout.
  {% component 'Month' %}
  • Edit Page URL to provide "Next" and "Previous" link to allow users to scroll through months. ( /calendarpage/ with no month or year will default to current month and year)
    /calendarpage/:month?/:year?

Display Month calendar on page and make it wider

  • Drag "Month Component" to the page layout and edit as below.
  <style>
      table.mycal { width: 900px;}
  </style>

  {% component 'Month' %}

Display Month calendar on page and insert events from DB

  • Drag "Events Component" to add it to page.
  • Drag "Month Component" to the page layout and edit as below.
  {% component 'Events' %}
  {% component 'Month' events = MyEvents %}

The "Events Component" injects the MyEvents array into the page. It also has a modal pop-up for showing event details.

Display Event list calendar on page and insert events from today to 60 days from now

  • Drag "Events Component" to the page.
  • Drag "List Component" to the page layout and edit as below.
  • In "Events Component" set property "Future Days" to 60
  <div style="width:100px">
  {% component 'Events' %}
  {% component 'EvList' events = MyEvents %}
  </div>

The "List Component" only shows up when there are events for the month indicated. The "Events Component" injects the MyEvents array into the page.

You have multiple optional properties for each component

  • Month (month) - The month you want to show. ( defaults to now )
  • Year (year) -The year you want to show. ( defaults to now )
  • Events (events) - Array of the events you want to show.
  • Calendar Color (color) - What color do you want calendar to be? ( defaults to red )
  • Day Properties (dayprops) - Array of the properties you want to put on the day indicator.
  • Load Style Sheet (loadstyle) - Do you want to load the default stylesheet?

These properties can be set by clicking on component and changing them there or in the page layout as below:

{% component 'Month' month = 2 events = MyEvents %}

Passing you own "Events" and/or "Day Properties" to the calendar

If passing you own "Events" and/or "Day Properties" to the calendar using an array in the page, here is the formate used:

    /**
    * ======================================================
    * Sample of array format used to pass events to calendar
    * ======================================================
    **/
    $this->page['MyEvents'] = [
        2015 => [   // Year
            2 => [    // Month
                20 => [  // Day
                    [
                        'txt' => 'October CMS', 
                        'link' => 'http://octobercms.com/'
                    ], 
                    [
                        'txt' => '<p>Text to show on calendar</p>', 
                        // You can add properties to anchor tag if needed.
                        'link' => '#content-confirmation" data-toggle="modal',
                        // You can add a CSS class tag to the <li> tag for this event.
                        'class' => 'text-success',
                        // You can add an on-hover "title" property to the <li> tag for this event.
                        'title' => 'Just another test. This text shows on hover of event.' 
                    ],
                ],
                22 => [
                    [
                        'txt' => 'My really long and dumb event name',
                        'title' => 'More about my really long and dumb event named event.'
                    ],
                ],
            ],
        ]
    ];
    /**
    * ==============================================================
    * Sample of array format used to pass Day Properties to calendar
    * ==============================================================
    **/
    $this->page['MyDayProps'] = [
        2015 => [   // Year
            2 => [    // Month
                20 => [ // Day
                    // You can add a link to the day indicator in the calendar.
                    // ( This example was for a modal AJAX dialog box. )
                    'link' => '#content-confirmation" data-toggle="modal'
                ],
                22 => [
                    // You can add a CSS class to the day indicator in the calendar.
                    'class' => 'dis'
                ],
            ],
        ] 
    ];

Thank You Early Users

Early users have discovered that several issues with the original design of this plugin. I want to sincerely apologize for those missteps and flaws that became very apparent when December and January events did not show as expected on your calendars. This is my third project involving calendars in PHP and each time I learn something new and often forget the many pitfalls of working with dates. This plugin was no exception.

I very much appreciate your patience and assistance in finding and addressing issues that I should have found before first publishing. I am committed to getting this right but there is still work to be done before I am completely satisfied with this product. Please hang in there and continue to point out any issues you may discover.

Did You Add Your Own Language File?

Please share it with the community by contacting me directly using the contact form at https://octobercms.com/author/KurtJensen

Like this plugin?

If you like this plugin or if you use some of my plugins, you can help me by submiting a review in the market.

Please do not hesitate to find me in the IRC channel or contact me for assistance. Sincerely Kurt Jensen

  • Found the plugin useful on 19 Dec, 2018

    Great Plugin.

    I had some questions and the author was very responsive and even added couple of new futures in just few hours.

    Thank you very much Kurt!

  • Found the plugin useful on 24 Feb, 2017

    Great Plugin! Very useful and easy to customize to my wishes.

  • Found the plugin useful on 7 Sep, 2016

    Hello Kurt Jensen,

    is this plugin licensed MIT or GPL-3.0?

    The Github repository indicates it is GPL-3.0 but your plugin on OctoberCMS shows that it would be MIT (License: MIT)

  • author

    Replied on 13 Sep, 2016

    It is intended to be GPL as the repo says. I do not see a setting for the license type on October Market so I have not found a way to make Market match repo.

    Thanks for positive review.

  • Found the plugin useful on 24 May, 2016

    Very nice plugin! I wonder however how I can make a frontend view fot current week?

  • author

    Replied on 26 Jan, 2017

    Thank you for your kind review.

    The week component is now available.

  • Found the plugin useful on 18 May, 2016

    Very useful Plugin. Look in your inbox. There are some improvement wishes ;)

  • Found the plugin useful on 1 Apr, 2016

    Was there already a way to show the current day? If not, I made a simple hack for it that might be useful?

    Otherwise a very nice plugin!

  • author

    Replied on 1 Apr, 2016

    Thank you for your positive review.

    I would love to see what you have for me to add to show the current day. Send me a message through my profile page and I can take a look at what you have.

    Sincerely Kurt Jensen

  • Found the plugin useful on 21 Jan, 2016

    Great plugin. Thank you for the fast en clear support.

  • author

    Replied on 1 Apr, 2016

    Thank you for your positive review. I hope MyCalendar will continue to meet all your expectations.

    Sincerely Kurt Jensen

  • Found the plugin useful on 16 Dec, 2015

    Awesome! Nice job! Over the last update, 1.0.18, the plugin is very functional.

  • author

    Replied on 1 Apr, 2016

    Thank you for your positive review and for sticking it out during some less than perfect updates. I hope MyCalendar will continue to meet all your expectations.

    Sincerely Kurt Jensen

  • Found the plugin useful on 3 Dec, 2015

    I had to change a few things in the plugin's core, as to add other languages, and the design of "EvList", all is well....BUT...The whole "Showing 2 months" works fine IF the first month isn't Dec and the second JAN... It's not checking next year's january events.... Which is a shame.. But overall, very usefull <3

  • author

    Replied on 3 Dec, 2015

    Thank you for the review. It looks like I need to do a little more work. I will have a look at the items you mentioned here and see if we can make it even better very soon. Kurt

  • Found the plugin useful on 1 Dec, 2015

    This Dev is quick to respond, and make changes for new features. I am very happy with the Plugin thus far.

  • author

    Replied on 1 Apr, 2016

    Thank you for your positive review. I hope MyCalendar will continue to meet all your expectations.

    Sincerely Kurt Jensen

  • Found the plugin useful on 26 Nov, 2015

    How can I add an image to the event?

  • author

    Replied on 29 Nov, 2015

    Thank you for positive review. Please use support area for future help requests.

    Please see support topic for your image question: https://octobercms.com/plugin/kurtjensen-mycalendar/how-can-i-add-an-image-to-the-event

  • Found the plugin not useful on 6 Nov, 2015

    Perhaps it could give a less harsh error when there are no users avalable when you are trying to add an event ? Also no listing in a a page of events after adding any tag!

  • author

    Replied on 8 Nov, 2015

    Errors when installing w/o rainlab.user have been fixed today. I appreciate your pointing out the errors.

    I would have a been much more grateful if you had submitted a support request prior to given me a negative review. I value my users and my reputation and want my applications to live up to expectations.
    I always respond quickly to support requests and attempt to make things right. This is hard for me to quantify in reviews of my work if I am not given the chance to support you first.

    Please take this into consideration in the future.

    Sincerely, Kurt Jensen

1.2.34

Adds "start_at" and "end_at" in the ev data array for views.

Sep 13, 2019

1.2.33

Fixes week component to work when start day is not Sunday.

Jul 09, 2019

1.2.32

Adds Froala editor to backend.

Dec 19, 2018

1.2.31

Adds rich editor to backend. Also makes categories permission and event length use the default from settings.

Dec 19, 2018

1.2.30

Fixes details from CKEditor not saving in front end form.

Sep 22, 2018

1.2.20

Fixes error on line 24 "(count(array_get($f, 'WBYDAY',0))" in _rrule.htm now "(count(array_get($f, 'WBYDAY',[]))". Also fixed an ajax issue with form validation feedback.

Apr 12, 2018

1.2.19

Fixes error "count() Parameter must be an array or an object that implements Countable

Mar 02, 2018

1.2.18

Adds AllDay feature provided by github.com/wverhoogt.

Mar 02, 2018

1.2.17

French translation added by github.com/damsfx

Mar 02, 2018

1.2.16

changed sort order of events to desc and list view date field to partial

Mar 02, 2018

1.2.15

Dutch translation added

Jan 03, 2018

1.2.14

Updated to changes made in Passage Permission Plugin up to version 1.0.12

Nov 22, 2017

1.2.13

Adds new setting for max_count for ENDS NEVER rule and others.

Apr 12, 2017

1.2.12

Fixes dumb typo that prevented sorting from working.

Mar 27, 2017

1.2.11

Fixes line 85 in Event model. Adds sorting to events. Seperates out time from name in event partial.

Mar 26, 2017

1.2.10

Made Builder compatible. Updated a few translation strings.

Mar 04, 2017

1.2.9

Fixes inoperable linkpage property.

Mar 03, 2017

1.2.8

Add Next and Previous links to Week component.

Jan 27, 2017

1.2.7

Finished Week component. Months now shows prev and past month events in leading and trailing days.

Jan 26, 2017

1.2.6

Consolidated component properties and functions into new trait. Added working week component.

Jan 25, 2017

1.2.5

Fixes settings model default times.

Jan 22, 2017

1.2.4

Fixes FIRST-SUNDAY-of-JANUARY is not valid for ON DATE ABOVE

Jan 15, 2017

1.2.3

Fixes Language problem monthHead in MonthEvents. no language switch

Dec 12, 2016

1.2.2

Database maintenance. Updated all timestamp columns to be nullable.

Nov 08, 2016

1.2.1

Fixes datepicker in _rrule widget partial by adding JS

Nov 03, 2016

1.2.0

Added configurable week start day to month and fixed category filter for showing events

Oct 31, 2016

1.1.21

Updated to changes made in Passage Permission Plugin

Oct 04, 2016

1.1.20

Fixes backend form broken by changes to October timepicker.

Jul 26, 2016

1.1.19

Added DE lang files. Fixed a few minor issues.

Jun 03, 2016

1.1.18

Located and eliminated bastard div end tag that screwed up backend form.

Apr 06, 2016

1.1.17

Fixed form not showing interval field when editing a series type event.

Apr 02, 2016

1.1.16

Fixed concat() error for SQLITE users in add_date.php.

Apr 01, 2016

1.1.15

Fixed missing use DB in add_date.php.

Apr 01, 2016

1.1.14

Add recuurence generation for backend controller.

Mar 31, 2016

1.1.13

Fixes error caused by removal of test component. Adds sorting.

Mar 21, 2016

1.1.12

Added Series recurrence type and added several phrases to lang files including validation.

Mar 19, 2016

1.1.11

Fixed "NOT NULL column with value of NULL" error for SQLite users

Mar 18, 2016

1.1.10

Fixed JS errors and frontend form save redirection

Mar 16, 2016

1.1.9

Fixed Settings model mutators causing errors

Mar 16, 2016

1.1.8

!!! This is an important update that contains breaking changes. Adding occurance table for recuring events.

Mar 16, 2016

1.1.7

Added Backend Settings Permissions

Feb 23, 2016

1.1.6

Added messageURL() to enable Author Notices

Feb 14, 2016

1.1.5

!!! This is an important update that contains breaking changes. MyCalendar will now be using Passage Permission Keys for permissions and you will need to install the plugin using code "kurtjensen.passage" if you use permissions for your events. If you do not install Passage Permission Keys plugin then your protected events may not show or may be visible to anyone who visits your site until you do add PassagePermission Keys plugin. This update also added raw data element to event array and applied config date/time to all components.

Feb 05, 2016

1.1.4

Fixed issue caused by wrong roles/groups table query.

Jan 27, 2016

1.1.3

Fixed Seting issue when Roles not installed.

Jan 26, 2016

1.1.2

Refactored to reduce query count, remove trait and reformat single event component.

Jan 23, 2016

1.1.1

Added "Event List w/ Event Data" and "Month View w/ Event Data" components.

Jan 17, 2016

1.1.0

Fixed No date == Error by requiring a date in model. Adds a copy feature to frontend form.

Jan 06, 2016

1.0.19

Finished Localization of backend.

Jan 06, 2016

1.0.18

Abandone seperate month,day,year in favor of date field.

Dec 16, 2015

1.0.17

Fixes future date issue and allows choice to include past dates.

Dec 14, 2015

1.0.16

Fixes overlooked items from Localization update.

Dec 13, 2015

1.0.15

Added Localization for pt_BR Portuguese (Brazil).

Dec 12, 2015

1.0.14

Added Localization only (en) included.

Dec 11, 2015

1.0.13

Fixes incorrect namespace for UserPermission.

Dec 08, 2015

1.0.12

Check for 'Roles' plugin before trying to seed tables.

Dec 06, 2015

1.0.11

Added "owner" and "id" to Events data array

Nov 30, 2015

1.0.10

Added "Next" and "Previous" links to month

Nov 29, 2015

1.0.9

Fixes bug for no logged in user

Nov 28, 2015

1.0.8

Adds permissions to calendar categories

Nov 28, 2015

1.0.7

Fixes error when there are no events in DB

Nov 09, 2015

1.0.6

Fixed ungracefull errors when rainlab.user not installed

Nov 08, 2015

1.0.5

Add option to use CKEditor to write event description in form

Nov 03, 2015

1.0.4

Add link and time Field to Events

Nov 01, 2015

1.0.3

Added frontend form. Fixed Backend context

Oct 31, 2015

1.0.2

Built Tables

Oct 30, 2015

1.0.1

First version of MyCalendar

Oct 30, 2015

Upgrade guide

<a name="upgrade-1.1.8"></a>

Upgrading To 1.1.8

This is an important update that contains breaking changes.

The Super Simple Calendar is Growing Up. Several customers have requested the ability to have recurring dates on MyCalendar. This feature has now been added and I want to make sure existing customers understand how this update will effect them and their current installation. Details about the changes and upgrade instructions can be found at: http://firemankurt.com/mycalendar

<a name="upgrade-1.1.5"></a>

Upgrading To 1.1.5

This is an important update that contains breaking changes.

MyCalendar will now be using Passage Permission Keys plugin for permissions.

You will need to install that plugin using code "kurtjensen.passage".

You should follow directions in Passage Permission Keys plugin to transfer your permissions over from the Roles plugin. No other changes should be needed for existing MyCalendar data to work as long as the "id" of the permissions in Passage Permission Keys matches the "id" old of the permissions in Roles.

If you do not install Passage Permission Keys plugin then your protected events may not show or may be visible to anyone who visits your site until you do add PassagePermission Keys plugin.

This change was due to some unresolved issues in the Roles plugin that made it unreliable and out of our control to fix.

IF YOU USE PERMISSIONS, DO NOT UPGRADE TO 1.1.5 UNLESS YOU ARE GOING TO INSTALL Passage Permission Keys PLUGIN.

This update also added raw data element to event array and applied config date/time to all components.

<a name="upgrade-1.0.18"></a>

Upgrading To 1.0.18

The database has been changed to the more common and easier to use date field instead of separate year,month, and day fields. There is very good reason for using one date type field and I should have thought that through better prior to original design. If you are ever thinking of breaking dates across multiple DB fields in one of your own projects, DON'T DO IT. Dates are a nightmare already without adding a non-standard method of storage to the problem.

Your data should transfer to this new date field automagicaly on upgrade and you should not need to change any data.

Please review instructions as some things have changed for displaying "Event Lists". This should be much easier now.

I have discovered that some items in Backend still do not use translation and those will areas be addressed in upcoming updates. Thank you for your patients.

<a name="upgrade-1.0.10"></a>

Upgrading To 1.0.10

The Month Component now includes a "Next" and "Previous" link to allow users to scroll through months. You will need to add parameters to your page URL to accept these parameters. Example:

/calendarpage/:month?/:year?

This will make the parameters optional and default to current month and year.