How vinugawade/com.osseed.eventcalendar works
Project Type and Purpose
• This is a PHP–JavaScript “plugin” (extension) for CiviCRM that provides an Event Calendar.
• It hooks into CiviCRM’s framework (Admin UI, API v3, ORM, templating), supplies its own forms/pages for configuration and display, and integrates with Joomla and WordPress front-ends.
High-Level Components
a. CiviCRM Core
• Provides DB schema management, API framework, ORM (DAO/BAO), menu hooks, templating (Smarty), event system.
b. EventCalendar Extension
• PHP Back-end
– DAO/BAO classes (CRM/EventCalendar/DAO & BAO)
– Form classes (CRM/EventCalendar/Form) for settings
– Page controllers (CRM/EventCalendar/Page) for ManageEventCalendars & ShowEvents
– Upgrader (Upgrader.php) & SQL scripts (sql/auto_install.sql, auto_uninstall.sql) for schema changes
– XML schema definitions (xml/schema/CRM/EventCalendar/*.xml)
– API v3 endpoints (api/v3/EventCalendar.php, EventCalendarEventType.php)
• Front-end Assets
– Templates (templates/CRM/EventCalendar/… .tpl) rendered by Smarty
– CSS (css/fullcalendar.css, civicrm_events.css)
– JS libraries (js/fullcalendar.js, moment.js, jscolor.js, locale-all.js, eventcalendar.js)
• Localization files (l10n/*/*.mo)
c. Integration Adapters
• Joomla menu type (joomla/EventCalendar/…)
• WordPress plugin wrapper (wordpress/osseed-wordpress-event-calendar/*.php)
d. Data Store
• MySQL (tables civicrm_event_calendar, civicrm_event_calendar_type, plus CiviCRM’s core tables)
Relationships & Data Flows
• Admin user → CiviCRM menu → Extension Form/Page → BAO/DAO → MySQL
• Public user → /civicrm/showevents → Page controller → DAO → JSON or HTML → Front-end JS (FullCalendar) → Renders calendar
• API clients → /civicrm/api/v3/EventCalendar → API wrapper → DAO → DB → JSON
• Upgrader/SQL → DB schema changes on install/upgrade
• CMS (Joomla/WordPress) → loads plugin files → registers menu/shortcode → delegates to CiviCRM pages
Architectural Patterns & Principles
• MVC-like within CiviCRM: Page controllers (C), Smarty templates (V), BAO/DAO (M)
• Extension modularity: clear separation of configuration (Form), presentation (Page + templates), data (DAO/BAO)
• API-first: provides a v3 API wrapper for event calendar entities
• Plugin-adapter layers for multiple CMSs