Skip to content

omnicommons/mediawiki-extensions-yasec

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Yet Another Simple Event Calendar

https://github.com/improper/mediawiki-extensions-yasec

Outputs a tabular calendar filled with events automatically generated from page titles in a certain namespace. Based on the intersection extension and the FullCalendar jQuery plugin.

Demo: FoodHackingBase Events

Usage

EventCalendar expects page titles in the following format in a certain namespace:

yyyy/mm/dd Event Title

for example

Event:2014/02/14_Synchronous_Hackathon

Multi-day events can be created by setting up consecutive dates with the same title, like

Event:2014/02/14_Synchronous_Hackathon
Event:2014/02/15_Synchronous_Hackathon
Event:2014/02/16_Synchronous_Hackathon

where the second and following pages will usually redirect to the first.

Typical invocation on a page:

<EventCalendar>
namespace = Event
aspectratio = 1.35
</EventCalendar>

aspectratio is optional and defaults to 1.6. CSS max-width is set to 800px and can be overridden in MediaWiki:Common.css.

Requirements

  • MediaWiki 1.22 (will probably work with other versions, comments appreciated)
  • MySQL (see #1)

Installation

  1. Deploy the files to extensions/yasec.
  2. Edit your LocalSettings.php:
    • Load the extension:

      include("$IP/extensions/yasec/EventCalendar.php");
    • Setup your namespace:

      $wgExtraNamespaces = array(
          100 => "Event",
          101 => "Event_talk",
      );
      $wgNamespacesToBeSearchedDefault = array(
          NS_MAIN => true,
          100     => true,
      );
    • For testing you might want to disable the cache:

      # How long to cache pages using EventCalendar in seconds. Default to 1 day.
      # Set to false to use the normal amount of page caching (most efficient),
      # set to 0 to disable cache altogether (inefficient, but results will never
      # be outdated)
      $wgECMaxCacheTime = 60*60*24;   // How long to cache pages in seconds

About

Yet Another Simple Event Calendar

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 78.6%
  • HTML 9.6%
  • PHP 6.3%
  • CSS 5.5%