Extension:PlasticMW

Category:Unmaintained extensions#PlasticMW Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:MIT licensed extensions
MediaWiki extensions manual
PlasticMW
Release status: unmaintainedCategory:Unmaintained extensions
Implementation Tag Category:Tag extensions
Description Provides a wrapper for the plastic.js data display library
Author(s) Simon Heimler (Fannontalk)
Latest version 0.0.1 pre-alpha (November 2014)
MediaWiki 1.19+Category:Extensions with manual MediaWiki version
PHP 5.2+
Database changes No
License MIT License
Download Category:Extensions in GitHub version control
README
plastic
Category:All extensionsCategory:Extensions not in ExtensionJson

The PlasticMW exentsion provides a wrapper for the plastic.js data display library.

WARNING: This extension is not ready for production use. It may work, but it is vulnerable to HTML / JS injection. Don't use it on (unprotected) production sites!

Installation


Instead of downloading the zip archive you may also check this extension out via Git:

git clone https://github.com/Fannon/PlasticMW.git

Features

  • Use a tag to embed a plastic embed code
  • plastic is a javascript library that can (asynchronously) query/fetch data, process it and display it through various modules. It supports querying of SPARQL endpoints and the Semantic MediaWiki ASK API.
  • TODO: Provide an parser function that is less verbose and more secure and uses the MediaWiki syntax.

Usage

This Wrapper Extension provides a <plastic> tag that works exactly like the native plastic.js embed code with the one difference that the <plastic> tag is used instead of an <div class="plastic"> tag. For more detailed instructions how to use the plastic.js in general, head to the user documentation.

Example

Embed Code

<plastic id="table-ask-query" class="test" style="height: auto; width: 800px">

    <script class="plastic-query" type="application/ask-query"
            data-query-url="http://semwiki-exp01.multimedia.hs-augsburg.de/ba-wiki/api.php">
                [[Kategorie:Mitarbeiter]]
                | ?Vorname=Vorname
                | ?Nachname=Nachname
                | ?Mail=Mail
                | ?Festnetz=Festnetz
                | ?Handy=Handy
            </script>

    <script class="plastic-options" type="application/json">
        {
            "benchmark": true
        }
    </script>

    <script class="plastic-display" data-display-module="advanced-table" type="application/json">
        {
            "tableClasses": "table table-condensed smaller-font",
            "paging": true,
            "searching": true,
            "ordering": true,
            "orderMulti": true
        }
    </script>
</plastic>

Result

Category:All extensions Category:BeforePageDisplay extensions Category:Extensions in GitHub version control Category:Extensions not in ExtensionJson Category:Extensions not using extension registration Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:MIT licensed extensions Category:ParserFirstCallInit extensions Category:Tag extensions Category:Unmaintained extensions