Wikidata:Cum să utilizați date pe proiectele Wikimedia

This page is a translated version of the page Wikidata:How to use data on Wikimedia projects and the translation is 69% complete.
Outdated translations are marked like this.

Datele de la Wikidata pot fi afișate direct în proiectele Wikimedia, prin diferite metode. Cu o funcție parser sau prin cod Lua, este posibil să fie afișate etichete, descrieri, valori, referințe și multe alte informații stocate pe Wikidata. Pentru o vedere de ansamblu a utilizărilor Wikidata în proiectele Wikimedia vedeți Wikidata:Wikidata in Wikimedia projects.

În această pagină veți învăța cum să folosiți datele Wikidata pe wikiul dvs. Puteți de asemenea să aflați mai multe despre ce este Wikidata, cum este organizată informația sau să navigați prin glosar.

Pot accesa datele Wikidata direct din wikiul meu?

The two main client functionalities, parser function and access via Lua, can be enabled together on the wikis of the Wikimedia projects. This is the case for almost all Wikimedia projects now.

To check if these functionalities are activated on a wiki, you can access the page Special:Version. In the section "Parser function hooks", if "statements" appears in the list, that means that you can use it on this wiki.

The access to Wikidata data is currently restricted to the Wikimedia projects, because of technical limitations. If you have your own instance of MediaWiki, you can't use Wikidata's data using these features. However, you can set up your own Wikibase instance and use data from there in the same way.

Funcție parser

Prima metodă de accesare a datelor este folosirea funcției parser #statement. Această funcție vă va permite să afișați valoarea oricărei afirmații inclusă într-un element.

 
Diagrama modelului de date Wikidata.

Acces direct

Pe o pagină conectată la un element Wikidata, puteți folosi funcția parser adăugând eticheta proprietății pe care o doriți în română sau numărul P al proprietății. Codul trebuie adăuga în wikitext.

Exemple:

  • {{#statements:membru al partidului politic}} sau {{#statements:P102}} va returna valoarea pentru "membru al partidului politic"
  • {{#statements:descoperitor sau inventator}} sau {{#statements:P61}} va întoarce valoarea "descoperitor sau inventator".
  • Pe w:ro:Douglas Adams, codul {{#statements:cetățenie}} va afișa "Regatul Unit".

Acces arbitrar

Puteți afișa date dintr-un element care nu este conectat printr-o legătură interwiki. Pentru aceasta folosiți aceeași funcție, adăugând parametrul from= urmat de codul Q (titlul) elementului.

Exemple:

  • {{#statements:nume la naștere|from=Q42}} va afișa "Douglas Noël Adams"
  • {{#statements:cetățenie|from=Q42}} va afișa "United Kingdom".
  • {{#statements:P1476|from=Q191380}} va afișa "Notre-Dame de Paris"
  • {{#statements:autor|from=Q191380}} va afișa "Victor Hugo"
  • {{#statements:data publicării|from=Q191380}} va afișa "1831"

Valori multiple

Când o declarație are mai multe valori, funcția parser va afișa cea mai "bună" valoare, adică:

Where there are multiple values, they are shown in a comma-separated list.

Exemplu: {{#statements:ocupație|from=Q42}} afișează "playwright, screenwriter, novelist, children's writer, science fiction writer, comedian, writer, musician" (mai sunt și alte ocupații în Douglas Adams (Q42) dar doar unele sunt preferate)

Valori formatate

Pentru anumite proprietăți, funcția parser #statements va afișa valoarea într-un anumit format.

Imagini de la commons

Funcția parser afișează o previzualizare a imaginii, redimensionată la 200 de pixeli. Legătura trimite la pagina de descriere de la Wikimedia Commons.

{{#statements:image|from=Q42}} afișează  

Coordonate geografice

Funcția parser afișează coordonatele în formatul grade-minute-secunde.

{{#statements:coordinate location|from=Q243}} afișează 48°51′30″N 2°17′40″E

Text monolingv

Funcția parser afișează textul cu rankingul cel mai mare, sau concatenarea tuturor valorilor.

{{#statements:native label|from=Q31}} afișează Koninkrijk België, Royaume de Belgique, Königreich Belgien.

Dată

Valoarea datei va fi formatată ca zi-lună-an.

{{#statements:date of birth|from=Q42}} afișează 11 March 1952

Legături

Se poate da clic pe legături.

{{#statements:official website|from=Q243}} afișează https://www.toureiffel.paris, https://www.toureiffel.paris/en, https://www.toureiffel.paris/it

ID-uri externe

Un ID extern va oferi o legătură directă către siteul extern.

{{#statements:IMDb ID|from=Q42}} afișează nm0010930

Elemente

{{#statements:capital|from=Q142}} displays Paris

Valori brute

Pentru a folosi valori fără legătură, folosiți #property.

Exemplu:

{{#property:IMDb ID|from=Q42}} afișează nm0010930

Module

Data can also be accessed with Lua modules, which are much more flexible. Modules that access data from Wikidata should be organized as instance of Wikimedia module using Wikidata (Q59259626). For instance, Module:Wikidata (Q12069631) is available on many wikis, see w:Module:Wikidata#Usage for usage instruction. If your wiki does not contain a module you can copy it from another wiki and add documentation.

For a full technical reference of Lua functions for accessing Wikidata, see mw:Extension:Wikibase Client/Lua.

Formate

Some templates use modules to access Wikidata data. They are as simple to use as regular templates. Moreover, using Wikidata, some parameters become unnecessary. For instance, some infoboxes are able to retrieve data from Wikidata, so you just have to insert the template and all the data will magically appear (if the needed information is present on the Wikidata item, of course). For templates using Wikidata see Category:Templates using data from Wikidata (Q11985372).

If you want to create a template on your wiki, check your documentation page about Module:Wikidata and already existing templates.

Liste

Liste actualizate regulat

Daily updated lists based on SPARQL queries can be configured using Template:Wikidata list (Q19860885). Content is replaced daily.

There are essentially two uses:

  • Work lists: lists with topics to be covered in project namespace. Results can be limited to topics that don't exist.
  • Reference list: lists for a specific topic in article namespace.

This is currently the most efficient way of doing lists.

Liste dinamice

Content is displayed from various items based on a selection done in a Lua module.

Liste manuale

A series of items are selected and their properties displayed in an article. Content from Wikidata can be completed with locally edited text.

Exemple de utilizare

= Infocasetă magică

A call of the general cheese infobox template fr:Modèle:Infobox Fromage without any parameters, on an article about a type of cheese, for example fr:Reblochon, produces an infobox with details about that type of cheese, using data from the Wikidata item linked to the article.

Commons

Commons creator template uses Wikidata with arbitrary access to provide information about the creators of the works.

Grafic

Informații bibliotecare

Wikisursă

Cum să găsești ajutor?

You will find contributors on the Wikidata project chat which exists in different languages. Moreover, some wikis have projects dedicated to Wikidata : see Project:WikiProject Wikidata (Q20855878).


Vezi și