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: Finally <wikitext> is the description of the event.

Configuration

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

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,
);

Details