User:Franz van Duns/sandbox

=Templates for Boxes=


 * 1 ====&gt; Category exists.


 * 2 ====&gt; Page does not exist.

Templates for inline text "Media related to ZZZZ at Wikimedia Commons:":
 * 3  ====&gt; Page does not exist.

Test:

=How to Retrieve Data from Wikidata=

Template:
The following examples have been copied from the highly useful page Template:Wikidata.

These parameters retrieve a literal string value via "entity-ID"

 * →  : Netherlands (Q55) | licence plate code (P395)
 * →  : Carl Zeiss Batis Sonnar T* 1.8/85 (Q21233320)  | mass (P2067)
 * → Now truncated to numerical value only: →  

These parameters retrieve a property with its references (see bottom of page)

 * A total of people live in the Netherlands.

These parameters return the output in a custom format

 * 

String manipulation functions
These string manipulation functions are required to alter values from Wikidata to a form suitable for Wikipedia.
 * Panthera (genus) →  Panthera (genus) 
 * Panthera (genus) →  Panthera (genus) 
 * Panthera (genus) →  Panthera (genus) 

SPARQL-QUERY
SPARQL-QUERY: queryStr=SELECT ?WikiData_item_ ?WikiData_item_Label ?value ?valueLabel ?English_WikiPedia_article #Show data in this order { 	?WikiData_item_ wdt:P18 ?value. #Collecting all items which have P18 data, from whole WikiData item pages OPTIONAL {?English_WikiPedia_article schema:about ?WikiData_item_; schema:isPartOf  .} #If collected item has link to English WikiPedia, show that SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } #Show label in this language. "en" is English. } LIMIT 10


 * query.wikidata.org/embed.html#SELECT...


 * Note: causes a "java.util.concurrent.TimeoutException" for unknown reasons.

=How to display Data Directly Derived from Wikidata within an Infobox=
 * Wikidata entity: Bill Gates (Q5284)


 * image (P18), now thumb-sized and on the right:
 * birth name (P1477):
 * date of birth (P569) :
 * spouse (P26):
 * Commons category (P373):


 * Dutch flag:


 * Infobox as copied from


 * Infobox as above, but some parameters replaced by direct Wikidata calls via template " ":

=Remarkable Templates= Item one

item two

item three Item one

item two

item three

=Linking to other Wiki Projects=

Wiki Commons

 * Link to Wiki Commons, text only, without displaying image: Passiflora caerulea stereo image - arranged L-R to be viewed with a stereo viewer, image separation approx. 25mm)


 * Image on display including both "ALT text" and an embedded link to Wiki Commons: Passiflora_caerulea_STEREO_(L-R)_view_uncrossed_2019-06-27.jpg

=POTD attribbution box=
 * Code to display the POTD attribution box within Wikipedia: :


 * Note (a): All attempts to summon this Wikipedia template from within Wiki Commons have, alas, as to now, been without avail!


 * Note (b): The Wikipedia template displays the POTD image plus caption of an image that has appeared / will appear as Picture of the day on a Wikipedia page. Extract from template: Use any valid date format for the template parameter. Pages with this template will be automatically placed into Category:Wikipedia Picture of the day files.


 * Note (c): The Wikipedia template, displays the current POTD image in a box of no more than 600 pixels wide on a Wikipedia page.

=TEST CASE 04= Interwiki linking:
 * Category:Interwiki link templates
 * Wikipedia:Template index/Sister projects

=TEST CASE 05= Relations to Commons categories:

=TEST CASE 06= Relations to Wikidata:
 * Create an Info box on the right →  
 * Create an Info box on the right →  
 * → link to Wikidata entity "universe (Q1)"
 * → link to Wikidata entity "cell component (P681)"
 * Wikidata: How to discriminate between instance of and subclass of.
 * Wikidata: Help:Basic membership properties → This page explains the differences between the properties instance of (P31), subclass of (P279) and part of (P361).

=TEST CASE 07= Special characters:
 * Character "&#x D8;" → &#xD8; (expected "Ø")
 * Commons:File:Zeiss_Batis_Distagon_F2.8_18mm.jpg → Inscription: "Distagon 2.8/18 Ø77 T* | Zeiss | Batis 2.8/18"
 * Character "&#x 2192" → &#x2192; (expected "→")

=TEST CASE 08= TEST TEST - TEST TEST

=End of Page= Note: All references from above templates are displayed below this last line of code.