mindbird / contao-calendar-editor

GNU Lesser General Public License v3.0
0 stars 1 forks source link

Updated version for contao 4.13 based on https://github.com/DanielGausi/Contao-CalendarEditor

Contao-CalendarEditor

This is a revision of the module for Contao 3. Essentially, everything should run as it did in Contao 3. The only change is the direct integration of the extension "CalendarField", which allows the use of a jQuery calendar for date fields.

Features

New settings in the Contao Calender: Enable Frontend editing

New setting in the Contao Events

The Event-Editor module

A simple form for the Contao Frontend. The Frontend-User can

As the goal is to keep it simple, only the following fields can be edited

The field "details" is a little bit tricky here. It is just one single text field, but the Contao model is way more complex. When creating a new event, a new Content-Element of type "Text" is created. When an existing event is edited, the first Content-Element of type "Text" is presented for editing. If this element contains further information like headline or attached image, or if there are more Content-Elements (created in the Backend) a warning is presented to the Frontend-User.

The Hidden-Eventlist module

An Eventlist that shows only the hidden Events, provided with an "edit-link" to open the event in the Frontend editor

The Event Editlink module

Should be placed on the site with the Eventreader module. Provides a proper edit-link to open the event in the Frontend editor. Optional: create also links to duplicate or delete the event.

The Calendar FE edit module

Similar to the regular Contao Calendar, but with edit-Links and "add event"-Links for every day. As a bonus, a "Holiday Calendar" can be specified. Events from this calendar are shown in the day-header of the calender module, to mark some days as "holiday", or whatever.

Usage

Just an overview here.

Preliminaries:

The Event Editor module

Now we can create a new Module of type "Event Editor".

The redirect page defines the page, where the user is redirected to after the formular is submitted succesfully. The FE user may overwrite this by a selection of some other pages (show the new event in event reader, show it in event editor again, create a new event or duplicate the just created event).

The Backend user can specify some more settings here, which should be self-explaining. For example, a list of calendars must be set where this module has access to, just as in the event reader module as well.

There you can also set some more mandatory fields, which the FE user must fill in the form.

To keep it simple for the FE user, the field "CSS value" can be renamed into something the FE user may understand more easily. This depends on how CSS values are used in the calendar on your website. You can also add a list of predefined CSS values/labels.

For entering dates more comfortable, a jQuery Datepicker can be added to the form.

This module should then be added to the article on the editor page you selected in the calendar(s) before.

Provide "edit links" to the Frontend user

If a user is authorized to edit events, he or she should be provided with some links to click on to edit these events. To update an existing website you should

Note that an "edit link" is only added to the template, if the user is actually authorized to edit this event. If the current FE user is not authorized to edit an event, he or she should not see the link. If the user enters such an unauthorized edit-link in the address bar of the browser, the editing form should show an error message.

Captchas

This module supports editing of events even for not registered users. In this case, a captcha is included to the formular. With the most recent changes to Contao 4.6, this does not work any more as it did in Contao 4.4.

Now it works like this:

Donation

If you like this extension and think it's worth a little donation: You can support me via Paypal.Me:

Donation for CalendarEditor

Thank You!