MediaWiki Extension Events

This extension provides the ability to create events on any page of your MediaWiki. Also included is a highly configurable Special page for aggregating events on your site by various criteria. All events are stored in MySQL or pgSQL, so the Special page is extremely fast.

Original authors are Aran Deltac and Sylvain Machefert.

Installation

  1. Download Events,
  2. Unpack the archive in your Mediawiki extension directory: $IP/extensions.
  3. add require_once($IP.'/extensions/Events/Events.php'); in your LocalSettings.php.

Declare Events

To declare events, you only need to put an <events/> tag in a page:


<events>
2010-08-09 : Adaptation of the original source code.
</events>
Each line inside the <events/> tag corresponds to an event. The line format is:
YYYY-MM-DD <separator> <wikitext>
where YYYY, MM, and DD are respectively the year, the month and the day of the event. <separator> is one of the following characters:
  • '!' for an important event which is visible to every one,
  • ':' for an event which is visible to every one,
  • '#' for an event which is visible only for connected users, and
  • '-' for an event which is invisible.
Finally <wikitext> is the description of the event.

Configuration

Events extension provides several configuration variables. these variables should be defined in your LocalSettings.php.

  • $wgEventsOldAge: Number of days in the past before which events are discarted. null means default value ie. 30.
  • $wgEventsYoungAge: Number of days in the future after which events are discarted. null means default value ie. 365.
  • $wgEventExtensionRenderImportantEventBox: Indicates if the box for important events should be rendered. To enable this event box, this global variable must be true, AND the current skin must implement a function named isEventsExtensionImportantEventEnabled() which replies a boolean value indicating if the skin support the event box CSS style or not.
  • $wgEventsCloseButtonIcon: Is the URL to the icon which is displayed to close the event popup box. Expected sizes: 12x12 or 16x16.

Special Page for List of Events

A special page Special:Events is available and display all the events on the wiki site.

Special Page to Reset Database

A special page Special:ClearEvents is available and remove all event related tables from the database.

Database Schema

Events supports pgSQL and MySQL databases. The 'events' table is automatically created for both database types.

pgSQL


DROP TYPE IF EXISTS eventVisibility CASCADE;
DROP TABLE IF EXISTS events CASCADE;
DROP TABLE IF EXISTS eventglobal CASCADE;
CREATE TYPE eventVisibility AS ENUM ('public', 'connected', 'invisible');
CREATE TABLE events (
page_id integer NOT NULL DEFAULT 0,
date date NOT NULL,
description text NOT NULL,
visibility eventVisibility DEFAULT 'invisible' NOT NULL
);
CREATE TABLE eventglobal (
popuphtml text NOT NULL,
);

MySQL


DROP TABLE IF EXISTS events CASCADE;
DROP TABLE IF EXISTS eventglobal CASCADE;
CREATE TABLE events (
page_id INT UNSIGNED NOT NULL DEFAULT 0,
date DATE NOT NULL DEFAULT '0000-00-00',
description TEXT NOT NULL,
visibility ENUM('public','connected','invisible') DEFAULT 'invisible' NOT NULL,
KEY date_idx (page_id,date)
);
CREATE TABLE events (
popuphtml TEXT NOT NULL,
);
AuthorsAran Clary Deltac, Sylvain Machefert, Stéphane GALLAND
Licenses
Operating SystemsOS Independent
ImplementationPHP

RssRecent releases

PackageVersion
Events3.1

No-screenshot

Project Spotlight

TeX-UPmethodology

A LaTeX style which permits to create Unified Process methodology (UP or RUP) based documents (document version, history, authors, validators, specification, task management, helping tools...).

No-screenshot

Project Spotlight

tinyMAS

A very small platform which permits to implement and run agent-based systems.