2024-09-24 | Maven 3.9.9 |
2024-08-13 | Noble Numbat |
2024-06-21 | Maven 3.9.8 |
2024-02-02 | Maven 3.9.6 |
2023-10-11 | P2 repository deleted |
2023-10-10 | Maven 3.9.5 |
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
- Download Events,
- Unpack the archive in your Mediawiki extension directory:
$IP/extensions
. - add
require_once($IP.'/extensions/Events/Events.php');
in yourLocalSettings.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.
<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 betrue
, AND the current skin must implement a function namedisEventsExtensionImportantEventEnabled()
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, );
Details
- Main authors: GALLAND Stéphane
- License: GPL
- Implementation: Php
- Stable Version: 3.1