ODS Integration of MediaWiki?
- What is MediaWiki??
- Install VAD
- User Authentication with the VirtuosoAuth? Extension
- Additional setup required for
- Access Control Lists and the
- Installing Extensions on a Virtuoso Hosted MediaWiki?
- URI Schemes
- Start virtuoso db using the hosting_php.so ( .dll for win users).
To use this plugin, it must be included in your virtuoso ini file as follows:
... [Plugins] # for ex. here the location of the plugins is the plugin folder LoadPath = ./plugin ... Load6 = Hosting,hosting_php.so ...
- Setup "Local Virtuoso" DSN (note the empty space in the name!) in order to access any of the application URLs.
- For windows users, please perform the following steps:
- Go to Start >> Settings >> Control Panel >> Administrative Tools >> Data Sources (ODBC)
- Go to tab "User DSN" and click "Add"
- Select the "OpenLink? Virtuoso (version)" driver and click "Finish"
- Enter "Name":
- Enter "Description":
My Local Virtuoso
- For "Server", enter your Virtuoso's hostname and ISQL port, e.g.,
- Click "Next"
- Enter a username for "Login ID", e.g.,
- Enter the user's "Password".
For dba, the default password is
- Click "Next"
- Click "Finish".
- For windows users, please perform the following steps:
- From ISQL, execute:
This will install MediaWiki version 1.18.4 and Semantic MediaWiki version 1.8 .
- Go to http://yourvirtuosohost:port/MediaWiki This will show the start page of the MediaWiki installer and will look like this:
- Click the complete the installation link. This will open a Language selection page. Tip: If you have run the mediawiki installer before it may remember you settings and not start the installation from the beginning. In this case you should click the restart installation link in the menu on the right hand side.
- Select your language and click the Continue button. This will open the Welcome to MediaWiki page.
- About half way down the page there should be a green message saying The environment has been checked. You can install MediaWiki?. Click the Continue button at the bottom of the page. This will take you to the Connect to Database page.
- Virtuoso should be selected for you. When using Virtuoso there are no further settings required so just click the Continue button.
- Setup the name of your wiki the and Administrator account. Select Ask me more questions before clicking Continue to enable VirtuosoAuth?.
- On the Options page in the Extensions section select VirtuosoAuth. Click Continue.
- Once the tables have been created you will be propmpted to download LocalSetting.php.
- Move the downloaded LocalSettings.php into virtuoso installation folder/vsp/vad/vsp/MediaWiki.
- To enable VirtuosoAuth edit LocalSettings.php and add the following
require_once( "$IP/extensions/VirtuosoAuth/VirtuosoAuth.php" );
- Click on the enter your wiki link or go to http://yourvirtuosohost:port/MediaWiki you should see something like this:
With the extension enabled, usernames and passwords are authenticated by Virtuoso as well as MediaWiki. What this means is that an existing Virtuoso user does not have to specifically set up a MediaWiki account, just use her Virtuoso username and password in the MediaWiki login dialog.
In addition, the extension allows users to authenticate themselves using an OpenId or WebID. In either case a matching MediaWiki user is silently created the first time the user logins in. In order to use a WebID you will need to do some further configuration. Please see the Additional setup required for WebId Setup section.
In the case where authentication is via an OpenId or WebId and the username from the OpenId or WebId matches an existing MediaWiki username then the user is prompted for the mediawiki password. The OpenId or WebId is then associated with that MediaWiki user.
If your instance of Virtuoso has the ODS-Framework installed then the VirtuosoAuth extension will attempt to authenticate users as ODS users. Additionally, when a new mediawiki user is created an ODS account will also be created for that user. New MediaWiki/ODS users can be created from a username and password or from an existing OpenId or WebId.? extension with a private wiki then the VirtuosoAuth login page must be added to the white list of pages that can be read before logging in. This is done by adding the following line to LocalSettings.php
$wgWhitelistRead = array( "Special:VOILogin" );
Additional setup required for WebId.
If you want to be able to login using a WebId? you will need to set up a secure sockets server in Virtuoso.
- Open the Virtuoso Conductor, http://yourvirtuosohost:port/conductor.
- Select the System Admin tab and then the Security tab. This opens a form for creating a security certificate.
- Fill in the fields and click the Generate button. This will create the certificate. You should now see the Configure HTTPS Listeners button.
- Click the Configure HTTPS Listeners button and fill in the Host or Domain name and the Listening Interface in the listener configuration form.
- Generate a new key by clicking the Generate New button. Click Save.
- You should now see a Configure ODS Endpoints button. Click this button.
- Click the link to Create a New End Point.
- Click the Save button.
- You can test the endpoint clicking the endpoint link. Tip: If there is a problem finding the certificate, you may need to restart your browser.
- You can now edit LocalSettings.php so that $wgSecureServer is set to your https listener.
Access Control Lists and the VirtuosoAuth? Extension
The VirtuosoAuth? extension must be enabled and the global variables $wgRequireODSAccount and $wgUseVirtuosoACL must both be set to true. The $wgAllowMWUsers global array is basically a white list of users and should contain the name of the wiki administrator. In my case theis is admin so I have this line in LocalSetting.php
$wgAllowMWUsers = array ( "admin" );
So, the section of LocalSettings.php that contains the config information for the VirtuosoAuth? extension looks like this
require_once( "$IP/extensions/VirtuosoAuth/VirtuosoAuth.php" ); $wgRequireODSAccount = true; $wgAllowMWUsers = array ( "admin" ); enableVirtuosoAuth(); $wgUseVirtuosoACL = true;
The access control list is set up using a custom tag in the wiki page like this:
<accesscontrollist user=http://id.myopenlink.net/dataspace/person/jhand#this mode=Read /> <accesscontrollist user=http://id.myopenlink.net/dataspace/person/jhand#this mode=Write /> <accesscontrollist user=http://localhost:8890/dataspace/person/TestUser1#this mode=Read /> <accesscontrollist user=http://localhost:8890/dataspace/person/TestUser1#this mode=Write />
If there are no
If there is an
Extensions let you customize how MediaWiki looks and works. There are many extensions available to download from the MediaWiki web site. For general instructions on installing extensions see the Extensions manual page.
Extensions can be downloaded using the the Extensions Distributor or from the extensions page on the MediaWiki web site.
Select the required extension from the drop down list. Click the Continue button.
If there are different versions of the extension available you can choose the one that matches your version of MediaWiki. If you have installed the Virtuoso VAD then you have MediaWiki version 1.18. Once you have selected the version click the Continue button. You will then see a confirmation screen with some instructions for unpacking the download. Your download should start automatically.
Move the downloaded file to the extensions folder of your MediaWiki installation. This will be in your Virtuoso installation folder/vsp/vad/vsp/MediaWiki/extensions. Unzip the extension.
Extensions are enabled in the LocalSettings.php file in the root of your MediaWiki installation. Typically, this will mean adding a line similar to the following at the end of LocalSettings.php.
require_once( "$IP/extensions/extension_name/extension_name.php" );
Some extensions will have additional settings that can be modified by adding them to LocalSettings.php. See the documentation for the particular extension that you are installing.
For example, if you are installing the Widgets extension then you would add the following line to LocalSettings.php to enable it:
The Widgets extension also needs the following to be set in LocalSettings.php:
$wgGroupPermissions['sysop']['editwidgets'] = true; </verbatim>/ ---+++Linked Data View Scripts After you have installed the <nowiki>MediaWiki</nowiki> mediawiki_fs.vad package you may want to set up Linked Data Views of the MediaWiki database tables. The benefits of doing so are described in [[http://virtuoso.openlinksw.com/wiki/main/Main/MediaWikiSIOCRef][MediaWiki SIOC Reference]]. Setting up the views is simply a matter of executing a script in ISQL. The script is included in the MediaWiki VAD and can be found in <i>your Virtuoso installation folder</i>/vsp/vad/vsp/MediaWiki/maintenance/virtuoso/MediaWiki_rdf_views_script.sql <verbatim> isql localhost:1116 dba dba MediaWiki_rdf_views_script.sql
- The MediaWiki Linked Data Views script can also be found here.
- You can download the MediaWiki VAD package from here.
- MediaWiki SIOC Reference
- Installing and Configuring SemanticMediaWiki using Virtuoso?
- Installing and Configuring the LinkedWiki v2.0.1 Extension?
- Installing and Configuring the LinkedWiki v184.108.40.206 Extension?