Giter Site home page Giter Site logo

mediawiki-extensions-yasec's Introduction

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

mediawiki-extensions-yasec's People

Contributors

translatewiki avatar serpent213 avatar bawolff avatar rennerocha avatar reedy avatar mary-kate avatar siebrand avatar

Watchers

Matt Senate avatar

Forkers

k--1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.