From SMW+ A Semantic Web Enterprise Wiki

Jump to: navigation, search
Smw plus help icon 32x32.gif Installing Halo extension 1.6.0
Created by: User:Dominika | Status: Final version Icon audience.png For audience: Administrator

This article explains the process of installing and integrating the Halo extension 1.6.0 into the SMW 1.5.x

This documentation applies to the latest version. If you are using an earlier version, select the relevant version.
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)
    Information.png  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

  1. Extract the file 'smwhalo-1.6.0_2_including_dependencies.zip'
  2. Copy the folder deployment into the MediaWiki root folder
  3. Install the Wiki Administration Tool
  4. Open in your commandline tool the directory:
    <mw-dir>htdocs\mediawiki\deployment\tools>
  5. 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.
  6. Optional: It is advisable to run the SMW maintenance script after the installation to refresh all data:
    1. Navigate to <mw-dir>\extensions\SemanticMediaWiki\maintenance
    2. 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

  1. Extract the file smwhalo-1.6.0_2_including_dependencies.zip
  2. Copy the folders 'ApplicationProgramming', 'ARCLibrary', 'ScriptManager' and 'SMWHalo' into the extensions folder of MediaWiki.
  3. Copy the files of the folder skins into the directory <mediawiki-dir>\htdocs\mediawiki\skins
  4. Copy the folder deployment into the MediaWiki root folder
  5. Edit the configuration file <mediawiki-dir>\htdocs\mediawiki\LocalSettings.php
  6. 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*/
    
  7. Optionally: if you want also to install a Triple store, add the line:
    $smwgTripleStoreGraph="http://mywikigraph";
  8. Adjust or add the path to the PHP interpreter (php.exe) accordingly to your Xampp directory:
    $phpInterpreter=">C:\xampp\php\php.exe";
  9. Optionall change $wgDefaultSkin='ontoskin3'; if you want to use the skin provided with Halo.
  10. Save the LocalSettings.php
  11. 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:
    1. Click Initialise or upgrade tables
    2. Click Start updating data


Notes on patches

Applying patches

  1. Add the GNU-Patch to the environment variable (see MS help [1] System Variable):
    1. Right-click My Computer > Properties
    2. Click Advanced tab
    3. Click Environment variables
    4. In the section System Variable select the variable Path
    5. Click Edit
    6. Add a semicolon ";" after the last value and then enter the path of the GNU-Path, e.g.
      <mediawiki-dir>\mediawiki\deployment\tools
    7. Click OK and close the window
  2. Switch to the command-line interface
  3. Navigate in your command line window in the SMWHalo directory:
    cd C:\xampp\htdocs\mediawiki\extensions\SMWHalo
  4. Execute the following command:
    php patch.php -patch_for_MW1.16.1.txt -d c:\xampp\htdocs\mediawiki --onlypatch
    Warning.png  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"
Information.png  Note:
If you are using Linux, make the smwadmin.sh executable (chmod +x smwadmin.sh)

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.

  1. Go to the Special:Version page and you should see SMW+ Extension (version nn) listed as a Parser Hook.
  2. Create a regular wiki page named "TestSMW", and in it enter the wiki text #
    Property test:  Dummypage
     [[Category:Test]]
  3. Then, create the page "Category:Test" and insert some dummy text.</i>
  4. 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

  1. Uses EDITDISTANCE function for near matching. Take a look in libs/mysqlUDFs/INSTALL.TXT for more information.
      $smwgHaloUseEditDistance = true;
  2. 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;
  3. $smwgPropertyPageFromTSC: Reads annotations on property pages from the TSC, not from the MySQL store.
  4. 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;
  5. 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');
    
    Warning.png  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.
  6. 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();
  7. 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

  1. Check on page Special:Version the version of SMWHalo: this should be the version of the latest release of SMWHalo, namely 1.5.6.
  2. Open C:\temp\deploytestwiki\deployment\tools\repositories
  3. Replace the following line:
     http://dailywikibuilds.ontoprise.com/repository/

    by

     http://dailywikibuilds.ontoprise.com/nightly_repository/
  4. Save the file
  5. Open a command line interface and go to directory
    <wiki>/deployment/tools
  6. 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:

  1. Open the page Special:Preferences
  2. Go to the User profile tab
  3. In the Change Password section, enter the WikiSysop password
  4. 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
  5. Click Save

Your settings will be saved.


Comment icon crystal.png

Static facts Derived facts
Facts about Installing Halo extension 1.6.0RDF feed
Content titleInstalling Halo extension 1.6.0  +
Creation dateThis property is a special property in this wiki.15 November 2011 15:55:10  +
CreatorThis property is a special property in this wiki.Dominika  +
For audienceAdministrator  +
Has StatusFinal version  +
Has overviewThis article explains the process of installing and integrating the Halo extension 1.6.0 into the SMW 1.5.x
Has prerequisitesHalo extension 1.6.0  +
Last modified byThis property is a special property in this wiki.Dominika  +
Position in subsection overview1  +
Reviewed byDominika  +
Subsection ofAdministration and Installation of Halo 1.6.0  +
Transitive Subsection ofAdministration and Installation of Halo 1.6.0  +
This page was last modified on 27 January 2012, at 03:58.This page has been accessed 1,337 times.
SemanticTreeview close tree