Semantic MediaWiki and related extensions
|
Parameters to the #ask
function can apply to the filtered
format as a whole (format level) or to only one specific printout (printout level). On format level there are some generic parameters that are common to all result formats and some format specific parameters that are used only by the filtered
format.
Consider the following query:
In this query limit=100
is on format level (generic), views=map
is on format level (format specific) and +filter=number
is on printout level.
Supported:
Not supported by the filtered
format:
list
|calendar
|table
|map
)top
|bottom
)This view is only available if $srfgMapProvider
is set in LocalSettings.php
, e.g. `$srfgMapProvider='OpenStreetMap.HOT';`
See the list of available providers
It's also possible to set alternative provider for users with dark appearance enabled on their systems via $srfgMapProviderDark
.
true
|false
)true
|false
)value
, distance
, and/or number
)yes
|no
)right
|left
|center
) (Table view only)yes
|no
)collapsed
|uncollapsed
)and or
and/or on off
)collapsed
|uncollapsed
)on off
)m
|km
|mi
|nm
)collapsed
|uncollapsed
)on off
)auto
|comma-separated list of values): If this parameter is specified, min, max and step will be ignored.min
|max
|range
|select
)This is only required for development, not for simple installation and usage.
From the .../SemanticResultFormats/formats/filtered
directory run
JavaScript tests use the QUnit test environment of MediaWiki. To enable the test environment add the following to LocalSettings.php
:
Then the easiest way to run tests is to go to http://127.0.0.1/wiki/Special:JavaScriptTest/qunit/plain?module=ext.srf.formats.filtered
(with server and path modified as necessary).
To at some point allow for continuous integration testing the tests can also be run from the command line on a headless browser. Google Chrome 59 (currently in Beta status) allows headless execution. It will forward anything written to the JavaScript console to the CLI standard output. So, to run tests from the command line install Chrome Beta and run
Chrome will remain running, so when the test run is finished it has to be force-stopped. See https://developers.google.com/web/updates/2017/04/headless-chrome for details on headless Chrome.
PHP tests use PHPUnit. The easiest way to run all SRF tests including the tests for the Filtered format is to run composer phpunit
from the SRF directory. However, for the tests to run it has to be ensured, that the $srfgMapProvider
configuration variable is not set in LocalSettings.php
.
#Credits
The Filtered format contains the following software libraries:
Several other libraries are used for the build process. See the devDependencies in the package.json file.