Extension:ChapTimeline

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
ChapTimeline

Release status:Extension status unmaintained

ImplementationTemplate:Extension#type Parser function
DescriptionTemplate:Extension#description Provides the chap-timeline result format to Semantic MediaWiki
Author(s)Template:Extension#username Katkov Yurytalk
Latest versionTemplate:Extension#version 1.0 (2013-11-14)
MediaWikiTemplate:Extension#mediawiki 1.20+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 3.0 or later
Download
ExampleTemplate:Extension#example no MediaWiki example available as yet, but see here for a demo of the CHAP library

Translate the ChapTimeline extension if it is available at translatewiki.net

Check usage and version matrix.

The ChapTimeline extension is a result format for Semantic MediaWiki. It allows you to represent your data in a form of a zoomable, clusterable and customizable timeline like this one:

ChapTimline example

Installation[edit]

Note Note: This extension requires Semantic MediaWiki to be installed first.

  • Download and place the file(s) in a directory called ChapTimeline in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/ChapTimeline/ChapTimeline.php";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Demo[edit]

We don't yet have MediaWiki public demo but you can get the idea by looking at this demo (see Examples section).

Usage[edit]

Use the extension as any other result format, for example:

{{#ask:
 [[Myprop::+]]
 |?Start date
 |?End date
 |height=600px
 |cluster=true
 |format=chap-timeline
 |startproperty=Start date
 |endproperty=End date
}}

Parameters[edit]

The following parameters are mandatory:

  • startproperty - which property to use for the start dates of the events. The property must be in the list of printout statements

The following properties are not mandatory:

  • height, width - define the size of timeline in pixels or percents
  • endproperty - which property to use for the end dates of the events. The property must be in the list of printout statements
  • cluster - true/false. Whether to cluster nearby events
  • template - template for box. Works similar to template parameter in Semantic Maps. Put the name of the template to this parameter and every event box will be formatted according to the template.
  • start and end - The initial start date and the initial end date for the axis of the timeline. If not provided, the earliest and the latest dates of the events are taken as start date and end date, respectively. You can put the date here in the following formats:
  • YYYY, e.g. 1964 - the date will be set to January 1 1964
  • MMM YYYY, e.g. Nov 1964 - the date will be set to November 1 1964
  • MMM DD YYYY, e.g. Nov 4 1964 - the date will be set to November 4 1964
  • MMM DD YYYY HH:MM:SS, e.g. Nov 4 1964 18:03:00 - the date will be set to November 4 1964 on 18:03:00

Details[edit]

I have used very powerful javascript library Almende chap timeline. Unfortunately they use Google API for data representation so you need to have Internet access in your client machine.

You'll find a lot more features in the library that have been incorporated in this version or a result format. Feel free to create pull requests if you're the developer or just ask me to implement the features. Funding is also always appreciated.

See also[edit]