professional-wiki/modern-timeline

Adds a modern timeline visualization as Semantic MediaWiki result format

Fund package maintenance!
JeroenDeDauw

Installs: 799

Dependents: 1

Suggesters: 0

Security: 0

Stars: 6

Watchers: 4

Forks: 0

Open Issues: 2

Type:mediawiki-extension

1.2.0 2020-03-29 13:54 UTC

This package is auto-updated.

Last update: 2020-06-22 06:24:14 UTC


README

Build Status Code Coverage Scrutinizer Code Quality Latest Stable Version Download count

The Modern Timeline extension provides a modern timeline visualization for Semantic MediaWiki as a result format.

It was created by Professional.Wiki and funded by KDZ - Centre for Public Administration Research.

Example timeline

image

Platform requirements

  • PHP 7.1 or later
  • MediaWiki 1.31.x up to 1.34.x
  • Semantic MediaWiki 3.0 or later

See the release notes for more information on the different versions of Modern Timeline.

Installation

The recommended way to install Modern Timeline is using Composer with MediaWiki's built-in support for Composer.

Note that the required extension Semantic MediaWiki must be installed first according to the installation instructions provided.

Step 1

Change to the base directory of your MediaWiki installation. If you do not have a "composer.local.json" file yet, create one and add the following content to it:

{
	"require": {
		"professional-wiki/modern-timeline": "~1.0"
	}
}

If you already have a "composer.local.json" file add the following line to the end of the "require" section in your file:

"professional-wiki/modern-timeline": "~1.0"

Remember to add a comma to the end of the preceding line in this section.

Step 2

Run the following command in your shell:

php composer.phar update --no-dev

Note if you have Git installed on your system add the --prefer-source flag to the above command.

Step 3

Add the following line to the end of your "LocalSettings.php" file:

wfLoadExtension( 'ModernTimeline' );

Usage

See also live demos at the following website: Professional.Wiki Starter demo wiki - Category:Modern Timeline examples.

The first date printout is used as date for the timeline events:

{{#ask:
 [[Modification date::+]]
 |format=moderntimeline
 |?Modification date
}}

If a second date printout is present it is used as end date and the event is displayed as a range:

{{#ask:
 [[Start date::+]]
 |format=moderntimeline
 |?Start date
 |?End date
}}

Display and behaviour of the timeline can be changed via several output parameters:

{{#ask:
 [[Modification date::+]]
 |format=moderntimeline
 |?Modification date
 |width=75%
 |height=500px
 |start at end=on
}}

Parameters

A full list of supported output parameters can be obtained in wiki via the smwdoc parser function:

{{#smwdoc: moderntimeline }}

Configuration

The default value of all parameters can be changed by placing configuration in "LocalSettings.php". These configuration settings are available:

  • $wgModernTimelineWidth – Timeline width in %. Can also be specified in px, em and ex
  • $wgModernTimelineHeight – Timeline height in pixels. Can also be specified in em and ex
  • $wgModernTimelineBookmark – Make the timeline bookmarkable via the page URL
  • $wgModernTimelineBackground – Background color for the timeline slides (CSS color values)
  • $wgModernTimelineScaleFactor – Timeline width in screen widths at first presentation
  • $wgModernTimelinePosition – Display the timeline navigation at the top or at the bottom
  • $wgModernTimelineTickWidth – Optimal distance (in pixels) between ticks on the axis
  • $wgModernTimelineStartSlide – The first slide to display when the timeline is loaded
  • $wgModernTimelineStartAtEnd – Start with the last timeline slide
  • $wgModernTimelineTransitionDuration – Slide transition in milliseconds
  • $wgModernTimelineNavHeight – Height of the timeline navigation section in % or px
  • $wgModernTimelineTemplate – Name of a template to show the slide area with
  • $wgModernTimelineImageProperty – Semantic property of type Page. Needs to be queried as print request

Default values of these configuration settings can be found in "extension.json". Do not change "extension.json".

Example of changing one of the configuration settings:

$wgModernTimelineHeight = '500px';

Limitations

  • The template parameter is not supported on "Special:Ask"
  • The timeline style does not automatically match that of the wiki
  • The timeline language does not automatically match that of the wiki

Professional MediaWiki development is available via Professional.Wiki.

Contribution and support

If you want to contribute work to the project please subscribe to the developers mailing list and have a look at the contribution guideline.

Professional MediaWiki support is available via Professional.Wiki.

License

GNU General Public License v2.0 or later (GPL-2.0-or-later).

Release notes

Version 1.2.0

Released on March 29, 2020.

  • Fixed error occurring when using the template parameter with MediaWiki 1.34 or later
  • Added image property parameter (with image alias)
  • Added wgModernTimelineImageProperty configuration parameter
  • Translation updates from https://translatewiki.net

Version 1.1.0

Released on August 28, 2019.

Version 1.0.0

Released on August 16, 2019.

Initial release with a TimelineJS3 based result format featuring 12 customization parameters, template support and date range support.

Examples

image

image