Release status: experimental
|Implementation||Special page, Skin|
|Description||Provides features for event organizers and participants|
|Compatibility policy||Snapshots releases along with MediaWiki. Master is not backward compatible.|
|License||GNU General Public License 2.0 or later|
|Quarterly downloads||3 (Ranked 175th)|
|Translate the CampaignEvents extension if it is available at translatewiki.net|
|Issues||Open tasks · Report a bug|
- Download and place the file(s) in a directory called
- Add the following code at the bottom of your
wfLoadExtension( 'CampaignEvents' );
- Run the update script which will automatically create the necessary database tables that this extension needs.
- Schedule a cronjob that runs the #script to update timezones (optional)
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
|Variable name||Default value||Description|
|The database cluster to use. False means the cluster of the current wiki will be used. In order to use a shared central database for a wiki farm, you need to setup single sign-on for that wiki farm. See Manual:Central ID for more information.|
|The database to use. False means the database of the current wiki will be used. In order to use a shared central database for a wiki farm, you need to setup single sign-on for that wiki farm. See Manual:Central ID for more information.|
|Determines which instance of the P&E Dashboard should be used, if any. Supported values are 'production', 'staging', or null to not use the dashboard.|
|API secret to use with the selected P&E Dashboard instance. Must be configured if you intend to use the P&E Dashboard.|
See /Api for the list of API endpoints provided by this extension.
Script to update timezonesEdit
The extension stores the local time and timezone for each event, to guarantee that the local time remains accurate even if time zone rules change. However,internally it also stores UTC timestamps so that certain operations like sorting are possible; you can read more details in T314871. The UTC timestamps may go out of sync with the local ones if time zone rules change, which happens more commonly than you may think (see more information on the same task). In order to mitigate that, the extension provides a maintenance script that recomputes the UTC timestamps for all events according to the latest timezone rules, and stores them back into the database.
In order for this to work, you have to make sure that PHP has access to the latest version of the tz database. The PHP manual provides some context about this. The easiest solution is to install the timezonedb PECL package and make sure to keep it up-to-date.
Assuming that PHP has access to the latest timezone rules, you can run the script with:
$ php extensions/CampaignEvents/maintenance/UpdateUTCTimestamps.php
The script also takes an optional
--timezone parameter where you can specify the name of a time zone whose rules changed; this parameter can be repeated multiple times. If passed, the script will only update events whose timezone matches one of the timezones specified via this parameter.
If you upgrade the time zone database automatically (e.g., with a cronjob), you can make that job also execute this script, so that you don't have to do it manually every time you upgrade the time zone database.
|This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page.|