• Topic
  • Discussion
  • VOS.VirtDeployLinkedWikiV1(Last) -- DAVWikiAdmin? , 2017-06-13 05:39:43 Edit WebDAV System Administrator 2017-06-13 05:39:43

    Installing The LinkedWiki v1.0.1.2 Extension

    The LinkedWiki extension allows you to embed a SPARQL query and display the results in your wiki page.

    Prerequisites

    Step 1. Download the Extension.

    Go to the LinkedWik Extension page. Using the links in the box on the right hand side, download the v1.0.1.2 LinkedWiki extension.

    Step 2. Extract.

    Move the downloaded zip file into your MediaWiki extensions folder. You will find this folder in your Virtuoso installation directory/vsp/vad/vsp/MediaWiki/extension. Extract the extension.

    Step 3. Enable and Configure.

    The LinkedWiki extension is enabled by adding the following lines to the your Virtuoso installation directory/vsp/vad/vsp/MediaWiki/LocalSettings.php file:


    require_once(  $IP."/extensions/LinkedWiki/lib/4store/SparqlTools.php");
    require_once( "{$IP}/extensions/LinkedWiki/LinkedWiki.php" );
    $smwgDefaultStore = "SMW_LinkedWikiStore"; 
    $wgLinkedWikiGraphWiki = 'http://example.org/mydefaultgraphname'; 
    

    The extension is further configured by setting the endpoint and the SPARQL endpoint. These will be the same as are used by Semantic MediaWiki and may be something like:


    $wgLinkedWikiEndPoint = "http://localhost:8890/";
    $wgLinkedWikiLocalEndPoint = "http://localhost:8890/sparql/";
    

    Note

    With this LinkedWiki extension errors are reported every time a page is saved. The message refers to missing functions on a Semantic MediaWiki class and seems to be due to this version of LinkedWiki being developed to use an earlier version of Semantic MediaWiki than the one that is bundled in the Virtuoso MediaWiki VAD. The error does not in fact stop the page being saved.

    Using LinkedWiki

    LinkedWiki lets you embed a SPARQL query in a wiki page and display the results as a table.

    Simple Query Examples

    A simple query to get all the triples in all the graphs on the default endpoint:
    {{#sparql:select * where { ?x ?y ?z . } LIMIT 5}}
    

    This displays the first 5 triples. The results will look something like this: