From SMW+ A Semantic Web Enterprise Wiki
|
This article explains the process of installing and integrating the Halo extension 1.6.0 into the SMW 1.5.x
| User manual information | |
|---|---|
Applies to version: Help:Halo extension 1.6.0,
| |
Note: Use the tree-view on the right hand side to navigate in the documentation
| |
Contents |
Introduction
The manual installation of the Halo extension requires technical expertise. Please use the SMW+ installer version (for Windows only), if you do not have good knowledge of the special technical aspects.
Requirements
- MediaWiki 1.17 (see installation guide)
- Semantic MediaWiki 1.6.1 (See installation guide)
Note:Halo 1.6.0 works best with MySQL 5.x, PHP 5.3.3, MediaWiki 1.17.0 and SMW 1.6.1
- Wiki Administration Tool (included in smwhalo-1.6.0_2_including_dependencies.zip, optional, but recommended for a fast and easy installation, installation)
- Web browser (This release has been tested with Internet Explorer 8 as well as the latest Firefox version, with is currently 6.0.2)
Installation
How to install using Wiki Administration Tool
- Extract the file 'smwhalo-1.6.0_2_including_dependencies.zip'
- Copy the folder deployment into the MediaWiki root folder
- Install the Wiki Administration Tool
- Open in your commandline tool the directory:
<mw-dir>htdocs\mediawiki\deployment\tools>
- Execute the batch file by typing:
smwadmin -i smwhalo
The extension is successfully installed, if necessary, Semantic MediaWiki and patches were added to you installation. - Optional: It is advisable to run the SMW maintenance script after the installation to refresh all data:
- Navigate to <mw-dir>\extensions\SemanticMediaWiki\maintenance
- Type:
php SMW_refreshData.php
All semantic data in the database is refreshed.
Check the LocalSettings.php if the following section appears:
/*start-smw*/ ... /*end-smw*/ /*start-smwhalo*/ ... /*end-smwhalo*/
How to install manually
- Extract the file smwhalo-1.6.0_2_including_dependencies.zip
- Copy the folders 'ApplicationProgramming', 'ARCLibrary', 'ScriptManager' and 'SMWHalo' into the extensions folder of MediaWiki.
- Copy the files of the folder skins into the directory <mediawiki-dir>\htdocs\mediawiki\skins
- Copy the folder deployment into the MediaWiki root folder
- Edit the configuration file <mediawiki-dir>\htdocs\mediawiki\LocalSettings.php
- Add the following code in front of every other extension:
require_once("extensions/ScriptManager/SM_Initialize.php"); require_once("$IP/deployment/Deployment.php"); include_once('extensions/ARCLibrary/ARCLibrary.php'); require_once( "$IP/extensions/ApplicationProgramming/ParserFunctions/ParserFunctions.php" ); require_once ("$IP/extensions/ApplicationProgramming/StringFunctions/StringFunctions.php"); require_once( "$IP/extensions/ApplicationProgramming/Variables/Variables.php" ); include_once('extensions/ApplicationProgramming/URLArguments/URLArguments.php'); require_once('extensions/SMWHalo/includes/SMW_Initialize.php'); enableSMWHalo(); $wgUseAjax=true; $smwgShowDerivedFacts = /*start-variable-smwgShowDerivedFacts*/ true;/*end-variable-smwgShowDerivedFacts*/ - Optionally: if you want also to install a Triple store, add the line:
$smwgTripleStoreGraph="http://mywikigraph";
- Adjust or add the path to the PHP interpreter (php.exe) accordingly to your Xampp directory:
$phpInterpreter=">C:\xampp\php\php.exe";
- Optionall change
$wgDefaultSkin='ontoskin3';if you want to use the skin provided with Halo. - Save the LocalSettings.php
- Go to your wiki, log in as a user with admin status and go to the page "Special:SMWAdmin" to do the final setup steps. Two steps are needed:
- Click Initialise or upgrade tables
- Click Start updating data
Notes on patches
Applying patches
- Add the GNU-Patch to the environment variable (see MS help [1] System Variable):
- Right-click My Computer > Properties
- Click Advanced tab
- Click Environment variables
- In the section System Variable select the variable Path
- Click Edit
- Add a semicolon ";" after the last value and then enter the path of the GNU-Path, e.g.
- <mediawiki-dir>\mediawiki\deployment\tools
- Click OK and close the window
- Switch to the command-line interface
- Navigate in your command line window in the SMWHalo directory:
- cd C:\xampp\htdocs\mediawiki\extensions\SMWHalo
- Execute the following command:
- php patch.php -patch_for_MW1.16.1.txt -d c:\xampp\htdocs\mediawiki --onlypatch
Important note:In case one of the paths contains a space, set it in quotes, e.g. php patch.php -d "c:\Program Files\Mywiki"
Patches for MediaWiki
There will be the following issues if this patch is missing:
- The Query Interface can not be used in an overlay.
- The Advanced Annotation Mode will not always work properly.
| Patches in SMWHalo/patch_for_MW1.16.1.txt and SMWHalo/patch_for_MW1.17.0.txt | Purpose |
|---|---|
| Parsing context | The parser contains an additional variable where the parsing content is set. |
- Patching command
php patch.php -p patch_for_MW<version>.txt -d <mw-dir> --onlypatch Replace <mw-dir> with the absolute path of your Mediawiki installation and choose the correct version of the patch file for <version>.
Patches for SemanticMediaWiki
This patch adds additional buildin properties. It is only required for older versions of SMW – 1.5.4 and 1.5.5
| Patches in SMWHalo/patch_for_builtin_properties_SMW_1.6.0.txt | Purpose |
|---|---|
| Additional builtin properties | This patch adds the built-in properties "Creator", "Creation date" and "Last modified by" |
- Patching command
php patch.php -p patch_for_SMW<version>.txt -d <mw-dir> --onlypatch
Replace <mw-dir> with the absolute path of your Mediawiki installation and
choose the correct version of the patch file for <version>.
Patches SemanticForms (if installed and not yet patched)
This patch adds styles and the Halo auto completion for form fields. It makes the semantic toolbar compatible with semantic forms.
| Patches in SMWHalo/patch_for_SF2.0.8.txt | Purpose |
|---|---|
| Fix js bug with STB | Fix bug with Semantic Toolbar and Semantic Forms |
| HaloAC in forminput parser function | Use the Halo autocompletion in the #forminput tag of SF. |
| SF style for Halo | Replace custom SF styles with the same styles that are used in other Halo extensions to have a consistent GUI. |
- Patching command
php patch.php -p patch_for_SF2.0.8.txt -d <mw-dir> --onlypatch
Replace <mw-dir> with the absolute path of your Mediawiki installation.
Testing your Installation
For any uncertainty that everything went well, you can undertake some testing so as to just check whether SMW is set up properly.
- Go to the Special:Version page and you should see SMW+ Extension (version nn) listed as a Parser Hook.
- Create a regular wiki page named "TestSMW", and in it enter the wiki text #
Property test: Dummypage [[Category:Test]]
- Then, create the page "Category:Test" and insert some dummy text.</i>
- Go to Special:DataExplorer. As soon as the interface is loaded, you should see "Test" in the category tree. Clicking on it and you should see "TestSMW" in the instance view. Clicking further on it,should display "testproperty Dummypage" in the properties view.
If you don't get these results, check the steps in the installation section, consult the FAQ section, then contact the user support list or the SMW Board.
Configuration
- Uses EDITDISTANCE function for near matching. Take a look in libs/mysqlUDFs/INSTALL.TXT for more information.
$smwgHaloUseEditDistance = true;
- Show derived facts in a tab next to explicit facts. Makes only sense when a TSC is connected. Note that the factbox must be switch on. Refer to SemanticMediaWiki/includes/Settings.php
$smwgHaloShowDerivedFacts=true;
- $smwgPropertyPageFromTSC: Reads annotations on property pages from the TSC, not from the MySQL store.
- One may use the DataExplorer to modify the ontology. Specify the appropriate rights (in this example for the WikiSysop) for modifying the ontology, otherwise you can only browse through.
$wgGroupPermissions['sysop']['ontologyediting'] = true;
- To use the Autocompletion feature within Semantic form fields, you need to install the Semantic Forms extension. Therefore add the following code:
#Semantic forms include_once('extensions/SemanticForms/includes/SF_Settings.php');
Important note:Semantic Forms must be included before the Halo Extension.
The Halo autocompletion does not depend on a specific version of Semantic Forms extension. - Enable the Query Results Cache. Please note that the full feature richness of the Query Results Cache is only available, if the Query Updator, which is deployed together with the Triple Store Connector is installed. The behaviour of the Query Results Cache can be configured in ./includes/QueryResultsCache/QRC_Settings.php
enableQueryResultsCache();
- Disable the result preview for the query results in the Query interface, instead the 'full preview' link is displayed. This option can be set to limit traffic to the server especially when queries to the TSC take a long time.
$smwgQIResultPreview = false;
There are various settings for SMW+/SMWHalo which are documented here: Customizing SMW+
Upgrade notes
- Check on page Special:Version the version of SMWHalo: this should be the version of the latest release of SMWHalo, namely 1.5.6.
- Open C:\temp\deploytestwiki\deployment\tools\repositories
- Replace the following line:
http://dailywikibuilds.ontoprise.com/repository/
by
http://dailywikibuilds.ontoprise.com/nightly_repository/
- Save the file
- Open a command line interface and go to directory
<wiki>/deployment/tools
- Type:
smwadmin -u smwhalo
SMWHalo is getting updated to the latest version in the trunk.
In order to create new tables and update old ones, open a command-line interface and navigate to the directory $IP/extensions/SemanticMediaWiki/maintenance/. Then run the script SMW_setup.php to update the database tables.
In addition, run the script SMW_refreshData.php, which is located in the same directory.
All versions after and including SMWHalo 1.5.x, require the ScriptManager extension. This is a small extension that handles the inclusion of some general Javascript libraries such as Prototype or jQuery. These libraries are needed within the SMWHalo extension and other extensions of the Halo project. If these libraries are not included in the correct order on the webpage, the javascripts that are used on this page might not work correctly or even do not work at all.
The ScriptManager eliminates the need for each extension to include it's own version of these libraries such that one now only needs to include each of these libraries only once.
First Login
Once you have successfully installed Halo extension, you can log into the wiki using the WikiSysop account credentials:
- Username: WikiSysop
- Password: root
After you have logged into the wiki, please change the WikiSysop account password from the preferences page:
- Open the page Special:Preferences
- Go to the User profile tab
- In the Change Password section, enter the WikiSysop password
- Type in a new password. Make sure that the password is of sufficient strength.Do this by using the uppercase, lowercase, numbers, and punctuation marks in this new-password
- Click Save
Your settings will be saved.
| Static facts | Derived facts | ||||||||||||||||||||||||||
Facts about Installing Halo extension 1.6.0RDF feed
| |||||||||||||||||||||||||||



