Lecteur Markdown

calendar Documentation › CALENDAR_DOCUMENTATION_EN

Calendar Documentation En

Feature: Calendar #

Per-user personal calendar. Each member manages their own events (one-shot, no recurrence in v1) and can optionally share their calendar publicly through an embeddable widget. Each event can be marked public or private.

Installation and Configuration

Via FTP: Upload the calendar/ directory into /plugins/.

Via package manager: Select calendar from the available plugins list.

Paths:

  • Main plugin: /plugins/calendar/calendar.php
  • Library: /plugins/calendar/lib/calendar.lib.inc.php
  • Public widget: /plugins/calendar/widget/calendar.widget.php
  • Handlers: /plugins/calendar/handlers/ (event save/delete, event range, settings)
  • CSS / JS: /plugins/calendar/css/, /plugins/calendar/js/

Configuration parameters:

| Variable | Default | Description |

|---|---|---|

| $basedatadisplay | 'yes' | Visible in the management interface |

| $basedisplevel | BASE_LEVEL_USER | Available to logged-in users |

| $ftype | 1 | Content module |

Usage

The logged-in user sees their calendar and can:

  • Create / edit / delete one-shot events.
  • Configure sharing via two settings:

- share_enabled — enables the public calendar widget.

- share_default_public — sets whether new events are public by default.

When sharing is enabled, a widget URL is provided:

text
?obj=calendar.widget&uid=user_id

Public widget: a non-logged-in visitor who accesses the calendar with a uid parameter is served that user's public widget, subject to a double lock: sharing must be enabled (share_enabled) and only events marked public are shown.

Hooks and Entry Points

text
?obj=calendar.php                        — Personal calendar (logged-in user)
?obj=calendar.php&uid=ID                 — Public widget (visitor)
?obj=calendar.widget&uid=ID              — Embeddable public widget
?obj=calendar_event_save.mod             — Create / edit an event
?obj=calendar_event_delete.mod           — Delete an event
?obj=calendar_events_range.mod           — Fetch events for a date range
?obj=calendar_settings_save.mod          — Save sharing settings

Dependencies

  • Beamreactor\Calendar\Calendar — event management
  • Beamreactor\Calendar\CalendarSharing — public sharing logic
  • Beamreactor\Sanitizer\Parser

Security

The personal calendar is restricted to logged-in users. Public exposure relies on a double lock: sharing must be explicitly enabled by the owner, and only events marked public are visible in the widget. Input is sanitized through Parser::sanitize().