Extension:PhpTags SMW

From Linux Web Expert

MediaWiki extensions manual
PhpTags SMW
Release status: beta
Implementation Data extraction
Description Implements features for working with Semantic MediaWiki data
Author(s) Pavel Astakhov, Joel K. Pettersson
Latest version 1.5.1 (2015-05-28)
MediaWiki >= 1.34.0
PHP 5.3+
Database changes No
License GNU General Public License 2.0 or later
Download
Quarterly downloads Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Public wikis using Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Translate the PhpTags SMW extension if it is available at translatewiki.net

The PhpTags SMW extension implements features for working with Semantic MediaWiki data.

File:OOjs UI icon lightbulb-yellow.svg <translate> Note:</translate> All the features of this extension are available only through the use of the PhpTags extension.

It provides the following classes:

  • ExtArrays (A wrapper for the optionally installed Arrays extension. It can be used to get data from #ask queries that use the array format.)
  • ExtSQI (A wrapper for the optionally installed Semantic Query Interface extension. Under this name, the \SQI\SemanticQueryInterface class can be used to query the wiki's data.)
  • WSemanticData (For adding semantic property values, records, and subobjects to the current page.)
  • WSemanticProperty (Methods for looking up property names, IDs, and normalizing property strings for display.)
  • WSemanticStats (Access to the same statistics that SMW adds to the Special:Statistics page.)

Installation

File:OOjs UI icon lightbulb-yellow.svg <translate> Note:</translate> This extension requires PhpTags (v5.1.0+) and Semantic MediaWiki (2.1+) to be installed first.

  • <translate> [[<tvar name=2>Special:ExtensionDistributor/PhpTagsSMW</tvar>|Download]] and move the extracted <tvar name=name>PhpTagsSMW</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
    <translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PhpTagsSMW
  • <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
    wfLoadExtension( 'PhpTagsSMW' );
    
  • File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>

Optional

The following extensions may be useful along with PhpTags SMW.

Less common uses

Without Semantic MediaWiki installed, it is still possible to use the support provided for the Arrays extension (in isolation – nothing else will work!).