<docbook><section><title>VirtDeployLinkedWikiV1</title><para> </para>
<title>Installing The LinkedWiki v1.0.1.2 Extension</title>Installing The LinkedWiki v1.0.1.2 Extension
<para>The <ulink url="LinkedWiki">LinkedWiki</ulink> extension allows you to embed a SPARQL query and display the results in your wiki page.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Prerequisites</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem>A working copy of MediaWiki hosted on Virtuoso.
 (See <ulink url="http://wiki.usnet.private/dataspace/dav/wiki/Main/MediaWikiInstalltionGuide">the installation guide for MediaWiki on Virtuoso</ulink>).
 The MediaWiki  VAD should be version 1.18.1.22 or higher.
</listitem>
<listitem>The Semantic MediaWiki extension.
 (See <ulink url="http://wiki.usnet.private/dataspace/dav/wiki/Main/SemanticMWVirtuoso">the installation guide for Semantic MediaWiki on Virtuoso</ulink>).</listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h3">Step 1.
 Download the Extension.</bridgehead>
<para>Go to the <ulink url="http://www.mediawiki.org/wiki/Extension:LinkedWiki">LinkedWik Extension page</ulink>.
 Using the links in the box on the right hand side, download the v1.0.1.2 <ulink url="LinkedWiki">LinkedWiki</ulink> extension.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">Step 2.
 Extract.</bridgehead>
<para>Move the downloaded zip file into your MediaWiki extensions folder.
 You will find this folder in <emphasis>your Virtuoso installation directory</emphasis>/vsp/vad/vsp/MediaWiki/extension.
 Extract the extension.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">Step 3.
 Enable and Configure.</bridgehead>
<para>The <ulink url="LinkedWiki">LinkedWiki</ulink> extension is enabled by adding the following lines to the <emphasis>your Virtuoso installation directory</emphasis>/vsp/vad/vsp/MediaWiki/LocalSettings.php file: </para>
<programlisting>require_once(  $IP.&quot;/extensions/LinkedWiki/lib/4store/SparqlTools.php&quot;);
require_once( &quot;{$IP}/extensions/LinkedWiki/LinkedWiki.php&quot; );
$smwgDefaultStore = &quot;SMW_LinkedWikiStore&quot;; 
$wgLinkedWikiGraphWiki = &#39;http://example.org/mydefaultgraphname&#39;; 
</programlisting><para> 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: </para>
<programlisting>$wgLinkedWikiEndPoint = &quot;http://localhost:8890/&quot;;
$wgLinkedWikiLocalEndPoint = &quot;http://localhost:8890/sparql/&quot;;
</programlisting><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Note</bridgehead>
 With this <ulink url="LinkedWiki">LinkedWiki</ulink> 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 <ulink url="LinkedWiki">LinkedWiki</ulink> 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.<bridgehead class="http://www.w3.org/1999/xhtml:h2">Using <ulink url="LinkedWiki">LinkedWiki</ulink></bridgehead>
 <ulink url="LinkedWiki">LinkedWiki</ulink> lets you embed a SPARQL query in a wiki page and display the results as a table.<bridgehead class="http://www.w3.org/1999/xhtml:h3">Simple Query Examples</bridgehead>
 A simple query to get all the triples in all the graphs on the default endpoint: <programlisting>{{#sparql:select * where { ?x ?y ?z . } LIMIT 5}}
</programlisting><para>This displays the first 5 triples.
 The results will look something like this:</para>
<para> </para>
<itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtDeployLinkedWikiV1/result1.png" /></figure> </listitem>
</itemizedlist></section></docbook>