Download the PHP package professional-wiki/semantic-wikibase without Composer

On this page you can find all versions of the php package professional-wiki/semantic-wikibase. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package semantic-wikibase

Semantic Wikibase

MediaWiki extension that makes Wikibase data available in Semantic MediaWiki.

Semantic Wikibase was created by Professional.Wiki with help from Frans AL van der Horst.

Demo

Platform requirements

Installation

First install MediaWiki, Semantic MediaWiki and Wikibase Repository.

The recommended way to install Semantic Wikibase is using Composer with MediaWiki's built-in support for Composer.

On the commandline, go to your wikis root directory. Then run these two commands:

Then enable the extension by adding the following to the bottom of your wikis LocalSettings.php file:

You can verify the extension was enabled successfully by opening your wikis Special:Version page in your browser.

As a final step you need to configure the property namespaces. See the configuration section.

Translated data

Data part of Wikibase Items and properties gets translated to Semantic MediaWiki property value pairs.

Labels, descriptions, IDs, etc

Translated data in the form Wikibase datamodel element => SMW property name (SMW property type)

Statements

When a statement is translated, only the value of the "main snak" is stored in SMW.

The SMW property name is the ID of the Wikibase property, for instance P42. The label of the Wikibase property gets added as alias. This means both [[P42::+]] and [[Capital city::+]] are valid in SMW queries.

Deprecated statements are never translated. Normal statements are not translated if there are preferred statements. The SMW property type is based on the Wikibase property type. Only statements with a supported property type are translated.

Supported property types

Wikibase name (en) SMW name (en) Wikibase id SMW id
Commons media file Text commonsMedia _txt
External identifier External identifier external-id _eid
Geographic coordinates Geographic coordinates globe-coordinate _geo
Item Page wikibase-item _wpg
Monolingual text Monolingual text monolingualtext _mlt_rec
Point in time Date time _dat
Property Page wikibase-property _wpg
Quantity Subobject (Page + Record) quantity _wpg + _rec
String Text string _txt
URL URL url _uri

Currently not supported types:

Configuration

You can configure Semantic Wikibase via LocalSettings.php.

Property namespaces

This is the only required configuration for setting up Semantic Wikibase.

Wikibase and Semantic MediaWiki both add a Property namespace called "Property". This results in a conflict which can be resolved by renaming either the Wikibase property namespace or the Semantic MediaWiki property namespace.

Renaming the Wikibase property namespace:

Renaming the SMW property namespace:

You can choose what to rename these namespaces to. They do not need to be WikibaseProperty and/or SemanticProperty. As long as they are not the same, Semantic Wikibase will work.

You will likely need to set these extra permissions to avoid getting errors when creating new items or properties:

Property label language

The language used for translation of property labels defaults to the wiki language ($wgLanguageCode).

This means that if your wiki language is English, and you have a property P1 with Dutch label "lokatie" and English label "location", the name of the property in Semantic MediaWiki will be "location".

You can specify a language different from your wiki language should be used. This is done with the $wgSemanticWikibaseLanguage setting. With the below example, the label for P1 would be "lokatie":

Disabling translation for an entity type / namespace

Enhancement ideas

Data translation:

Properties:

Professional.Wiki provides commercial MediaWiki development, Wikibase development, and managed wiki hosting.

Release notes

Version 0.1

Released on September 3, 2020


All versions of semantic-wikibase with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
composer/installers Version ^1.0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package professional-wiki/semantic-wikibase contains the following files

Loading the files please wait ....