%META:TOPICPARENT{name="VirtDeployMediaWiki"}% ---+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 * A working copy of MediaWiki hosted on Virtuoso. (See [[http://wiki.usnet.private/dataspace/dav/wiki/Main/MediaWikiInstalltionGuide][the installation guide for MediaWiki on Virtuoso]]). The MediaWiki VAD should be version 1.18.1.22 or higher. * The Semantic MediaWiki extension. (See [[http://wiki.usnet.private/dataspace/dav/wiki/Main/SemanticMWVirtuoso][the installation guide for Semantic MediaWiki on Virtuoso]]). ---+++Step 1. Download the Extension. Go to the [[http://www.mediawiki.org/wiki/Extension:LinkedWiki][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: *