Editing
Module:Wikidata/doc
(section)
From Thetacola Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Testing == === Testing spouse === Copy and paste the following into any article and preview it (please don't save!): <syntaxhighlight lang="moin"> * - {{#invoke:Wikidata|getValue|P26|}} * - {{#invoke:Wikidata|getValue|P26|FETCH_WIKIDATA}} * - {{#invoke:Wikidata|getValue|P26|[[Hillary Rodham Clinton]]}} </syntaxhighlight> In [[Bill Clinton]] you should get: * - * - [[Hillary Clinton]] * - [[Hillary Rodham Clinton]] In [[Barack Obama]] you should get: * - * - [[Michelle Obama]] * - [[Hillary Rodham Clinton]] In [[Richard Burton]] you should get: * - * - [[Elizabeth Taylor]], [[Sally Burton]], [[Sybil Christopher]], [[Suzy Miller]], [[Elizabeth Taylor]] * - [[Hillary Rodham Clinton]] In [[Franz Kafka]] you should get: * - * - * - [[Hillary Rodham Clinton]] === Testing birthplace === Copy and paste the following into any article and preview it (please don't save!): <syntaxhighlight lang="moin"> * - {{#invoke:Wikidata|getValue|P19|}} * - {{#invoke:Wikidata|getValue|P19|FETCH_WIKIDATA}} * - {{#invoke:Wikidata|getValue|P19|[[Newport]]}} </syntaxhighlight> Try [[William Ellery]] and check that the Wikidata call correctly disambiguates. === Testing getValue, getRawValue and getDateValue === Copy and paste the following into any article and preview it (please don't save!): <pre> * - {{#invoke:Wikidata|getValue|P19|FETCH_WIKIDATA}} * - {{#invoke:Wikidata|getValue|P26|FETCH_WIKIDATA}} * - {{#invoke:Wikidata|getValue|P27|FETCH_WIKIDATA}} * - {{#invoke:Wikidata|getValue|P140|FETCH_WIKIDATA}} * - {{#invoke:Wikidata|getRawValue|P21|FETCH_WIKIDATA}} * - {{#invoke:Wikidata|getDateValue|P569|FETCH_WIKIDATA|dmy}} * - {{#invoke:Wikidata|getDateValue|P569|FETCH_WIKIDATA|mdy}} * - {{#invoke:Wikidata|getDateValue|P569|FETCH_WIKIDATA|y}} </pre> This should return the Wikidata values for birthplace, spouse, citizenship, religion, gender, date of birth (twice) and year of birth, if they exist. The dob is first in dmy format and then in mdy. === Testing dates BC/BCE === Copy and paste the following into a short section of article such as [[Horace #See also]] and preview it (please don't save!): <pre> * - {{#invoke:Wikidata|getDateValue|P569|FETCH_WIKIDATA|y}} * - {{#invoke:Wikidata|getDateValue|P569|FETCH_WIKIDATA|y|BCE}} </pre> This should return 65 BC and 65 BCE, respectively.
Summary:
Please note that all contributions to Thetacola Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Module
Discussion
Read
Edit source
History
Page actions
Module
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information