11 |
12 | ## Platform requirements
13 |
14 | * [PHP] 7.4 or later
15 | * [MediaWiki] 1.35.x
16 | * [Semantic MediaWiki] 3.2.x
17 | * [Wikibase Repository] branch: REL1_35
18 |
19 | ## Installation
20 |
21 | First install MediaWiki, Semantic MediaWiki and Wikibase Repository.
22 |
23 | The recommended way to install Semantic Wikibase is using [Composer](https://getcomposer.org) with
24 | [MediaWiki's built-in support for Composer](https://professional.wiki/en/articles/installing-mediawiki-extensions-with-composer).
25 |
26 | On the commandline, go to your wikis root directory. Then run these two commands:
27 |
28 | ```shell script
29 | COMPOSER=composer.local.json composer require --no-update professional-wiki/semantic-wikibase:*
30 | composer update professional-wiki/semantic-wikibase --no-dev -o
31 | ```
32 |
33 | Then enable the extension by adding the following to the bottom of your wikis `LocalSettings.php` file:
34 |
35 | ```php
36 | wfLoadExtension( 'SemanticWikibase' );
37 | ```
38 |
39 | You can verify the extension was enabled successfully by opening your wikis Special:Version page in your browser.
40 |
41 | As a final step you need to configure the property namespaces. See the configuration section.
42 |
43 | ## Translated data
44 |
45 | Data part of [Wikibase Items and properties] gets translated to Semantic MediaWiki property value pairs.
46 |
47 | ### Labels, descriptions, IDs, etc
48 |
49 | Translated data in the form `Wikibase datamodel element => SMW property name (SMW property type)`
50 |
51 | * EntityId => Wikibase ID (Text)
52 | * Labels => Wikibase label (Monolingual text)
53 | * Descriptions => Wikibase description (Monolingual text)
54 | * Aliases => Wikibase alias (Monolingual text)
55 |
56 | ### Statements
57 |
58 | When a [statement] is translated, only the value of the "main snak" is stored in SMW.
59 |
60 | The [SMW property] name is the ID of the Wikibase property, for instance P42. The label of the Wikibase
61 | property gets added as alias. This means both `[[P42::+]]` and `[[Capital city::+]]` are valid in SMW
62 | queries.
63 |
64 | Deprecated statements are never translated. Normal statements are not translated if there are preferred statements.
65 | The SMW property type is based on the [Wikibase property type]. Only statements with a supported property type are translated.
66 |
67 | ## Supported property types
68 |
69 | | Wikibase name (en) | 72 |SMW name (en) | 73 |Wikibase id | 74 |SMW id | 75 |
|---|---|---|---|
| Commons media file | 78 |Text | 79 |commonsMedia | 80 |_txt | 81 |
| External identifier | 84 |External identifier | 85 |external-id | 86 |_eid | 87 |
| Geographic coordinates | 90 |Geographic coordinates | 91 |globe-coordinate | 92 |_geo | 93 |
| Item | 96 |Page | 97 |wikibase-item | 98 |_wpg | 99 |
| Monolingual text | 102 |Monolingual text | 103 |monolingualtext | 104 |_mlt_rec | 105 |
| Point in time | 108 |Date | 109 |time | 110 |_dat | 111 |
| Property | 114 |Page | 115 |wikibase-property | 116 |_wpg | 117 |
| Quantity | 120 |Subobject (Page + Record) | 121 |quantity | 122 |_wpg + _rec | 123 |
| String | 126 |Text | 127 |string | 128 |_txt | 129 |
| URL | 132 |URL | 133 |url | 134 |_uri | 135 |