Extension:Semantic Result Formats/Installation

From semantic-mediawiki.org
< Extension "Semantic Result Formats"
Extension "Semantic Result Formats"Extension:Semantic Result Formats/Installation

This document holds the installation and configuration instructions for the Semantic Result Formats (SRF) extension.

Installation

The recommended way to install Semantic Result Formats 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. This is where the "LocalSettings.php" file is located. If you have not yet installed Composer do it now by running the following command in your shell:

wget https://getcomposer.org/composer.phar

Step 2

If you do not have a "composer.local.json" file yet, create one and add the following content to it:

{ "require": { "mediawiki/semantic-result-formats": "~3.0" } }

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

"mediawiki/semantic-result-formats": "~3.0"

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

Step 3

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. Also note that it may be necessary to run this command twice. If unsure do it twice right away.

Step 4

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

wfLoadExtension( 'SemanticResultFormats' );

Verify installation success

As final step, you can verify SRF got installed by looking at the "Special:Version" page on your wiki and check that it is listed in the semantic extensions section.

Configuration

A default set of formats is enabled. These are the formats that satisfy the following criteria:

  • they do not require further software to be installed (besides Semantic MediaWiki),
  • they do not transmit any data to external websites, not even by making client browsers request any static external resources (such as an externally hosted image file),
  • they are considered reasonably stable and secure.

Currently, these default formats are:

'icalendar', 'vcard', 'bibtex', 'calendar', 'eventcalendar', 'eventline', 'timeline', 'outline', 'gallery', 'jqplotchart', 'jqplotseries', 'sum', 'average', 'min', 'max', 'median', 'product', 'tagcloud', 'valuerank', 'array', 'tree', 'ultree', 'oltree', 'd3chart', 'latest', 'earliest', 'filtered', 'slideshow', 'timeseries', 'sparkline', 'listwidget', 'pagewidget', 'dygraphs', 'media', 'datatables'

To add more formats to this list, you can add lines like:

$srfgFormats[] = 'googlebar';

... or you can override the set of formats entirely, with a call like:

$srfgFormats = [ 'calendar', 'timeline' ];

There are some formats that you may not want to include because they may not follow certain policies within your wiki; the formats 'googlebar' and 'googlepie', for instance, send data to external web services for rendering, which may be considered a data leak.

Notes on specific formats:

  • array: requires the MediaWiki Arrays extension to work.
  • excel: requires the phpexcel library from phpoffice to work.
  • googlebar: sends data to Google for rendering. It also requires

access to the Google servers in order to render.

  • googlepie: sends data to Google for rendering. It also requires

access to the Google servers in order to render.

  • graph: requires the MediaWiki GraphViz extension to work.
  • hash: requires the MediaWiki HashTables extensions to work.
  • process: requires the MediaWiki GraphViz extension to work.