User:RexxS/sandbox #Infobox with separate image

{{User sandbox|plain=yes}}

Archive is at User:RexxS/sandbox/Archive

For temporary testing 1

{{wdib|ps=1|P793|qual=P580|qid=Q44440|qo=y}}

{{wdib/sandbox|ps=1|P793|qual=P580|qid=Q44440|qo=y}}

{{wdib/sandbox|ps=1|P793|qual=DATES|qid=Q44440|qo=y}}

For temporary testing 2

  • {{#invoke:Cite Q/sandbox |lang_code |Q100368014}}
  • {{Cite Q |Q100367981}}
  • {{Cite Q/sandbox |Q100367981}}
  • {{Cite Q/sandbox |Q100367981|expand=yes}}

For temporary testing 3

Wikidata table

  • {{q|Q3998890}}
  • {{q|P276}}
  • {{q|P131}}
  • >{{#invoke:Wikidata table |getWD |qid=Q3998890 |pid=P276}}<
  • >{{#invoke:Wikidata table |getWD |qid=Q3998890 |pid=P131}}<

getValueByLang

  • {{#invoke:WikidataIB|getValueByLang|P856|qid=Q1071969|fwd=ALL|osd=no}} → {{#invoke:WikidataIB|getValueByLang|P856|qid=Q1071969|fwd=ALL|osd=no}}
  • {{#invoke:WikidataIB|getValueByLang|P856|qid=Q1071969|fwd=ALL|osd=no|maxvals=1}} → {{#invoke:WikidataIB|getValueByLang|P856|qid=Q1071969|fwd=ALL|osd=no|maxvals=1}}
  • {{#invoke:WikidataIB|getValueByLang|P856|qid=Q1071969|fwd=ALL|osd=no|rank=best}} → {{#invoke:WikidataIB|getValueByLang|P856|qid=Q1071969|fwd=ALL|osd=no|rank=best}}

Blacklist

Fragment to demo exact matching for field names in blacklist:

  • {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=title |suppressfields=aaa, bbb, title, ccc, ddd}} → {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=title |suppressfields=aaa, bbb, title, ccc, ddd}}
  • {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=title |suppressfields=aaa; bbb; title; ccc; ddd}} → {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=title |suppressfields=aaa; bbb; title; ccc; ddd}}
  • {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=title |suppressfields=aaa; bbb; other title 1; ccc; ddd}} → {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=title |suppressfields=aaa; bbb; other title 1; ccc; ddd}}
  • {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=title |suppressfields=aaa; bbb; other_title_1; ccc; ddd}} → {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=title |suppressfields=aaa; bbb; other_title_1; ccc; ddd}}
  • {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=other title |suppressfields=aaa; bbb; other title 1; ccc; ddd}} → {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=other title |suppressfields=aaa; bbb; other title 1; ccc; ddd}}
  • {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=other title 1 |suppressfields=aaa; bbb; other title 1; ccc; ddd}} → {{#invoke:Sandbox/RexxS/Blacklist |isBlacklisted |name=other title 1 |suppressfields=aaa; bbb; other title 1; ccc; ddd}}

FAC headers

  • == {{{1|Level 2 heading}}} ===== {{{1|Level 3 heading}}} ===
  • === {{{1|Level 3 heading}}} ======= {{{1|Level 4 heading}}} ====

Testing #if with module

  • 0 → {{#if:0 | if is true | if is false}}
  • false → {{#if:false | if is true | if is false}}
  • "" → {{#if:"" | if is true | if is false}}
  • → {{#if: | if is true | if is false}}
  • {{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}} → {{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}}
  • {{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Jim; Fred}} → {{#invoke:WikidataIB |checkBlacklist |name=Jim |suppressfields=Dave; Joe; Fred}}
  • {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}} | blacklisted | not blacklisted}} → {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}} | blacklisted | not blacklisted}}
  • {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Jim |suppressfields=Dave; Joe; Fred}} | blacklisted | not blacklisted}} → {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Jim |suppressfields=Dave; Joe; Fred}} | blacklisted | not blacklisted}}

Retired person's guide to Time

;Time: An ever-accelerating metric designed to monotonically shorten the gap between Christmas and birthdays, thus maximising the opportunity for your children to receive gifts from you.

;Hour: The ever-shortening gap between feeding the cat.

;Day: The ever-shortening gap between taking your statin tablets.

;Night: The period when fewer shops are open.

;Weekday: Day where there is lots of traffic in the morning and late afternoon.

;Weekend: Days when the British Association of Slow Drivers have their weekly rallies.

;Sunday: Day when the local supermarket closes early.

CheckPage

  • {{#invoke:RexxS|checkRedirect|art=Theologian}} → {{#invoke:RexxS|checkRedirect|art=Theologian}}
  • {{#invoke:RexxS|checkRedirect|art=Theology}} → {{#invoke:RexxS|checkRedirect|art=Theology}}
  • {{#invoke:RexxS|checkRedirect|art=Theologianx}} → {{#invoke:RexxS|checkRedirect|art=Theologianx}}
  • {{#invoke:RexxS|checkPage|art=Theologian}} → {{#invoke:RexxS|checkPage|art=Theologian}}
  • {{#invoke:RexxS|checkPage|art=Theologianx}} → {{#invoke:RexxS|checkPage|art=Theologianx}}

Wikidata #statements

{{q|Q151973}} → {{#statements:P106|from=Q151973}}

{{q|Q133682}} → {{#statements:P106|from=Q133682}}

{{q|Q151973}} → {{#invoke:WikidataIB|getValue|P106|qid=Q151973|fetchwikidata=ALL|onlysourced=no}}

{{q|Q133682}} → {{#invoke:WikidataIB|getValue|P106|qid=Q133682|fetchwikidata=ALL|onlysourced=no}}

Card suits

I've used these to create vector images of the unicode characters as accurately as possible.

{{cot}}

—3♠—3File:Card spade.svg

—3{{red|♥}}—3File:Card heart.svg

—3{{red|♦}}—3File:Card diamond.svg

—3♣—3File:Card club.svg

— 3♠ — 3File:Card spade.svg

— 3{{red|♥}} — 3File:Card heart.svg

— 3{{red|♦}} — 3File:Card diamond.svg

— 3♣ — 3File:Card club.svg

{{cob}}

Carousel

File:{{#invoke:RexxS

{{#invoke:RexxS |carousel |switchsecs=10}}

{{-}}

Infobox with separate image

{{User:RexxS/sandbox/Infobox building

| name = Sydney Opera House

| status = completed

| image = The Sydney Opera House at dusk.jpg

| image_upright = 2.2

| image_alt =

| caption = Sydney Opera House at dusk

| map_type = Australia Sydney#New South Wales#Australia

| map_alt =

| map_caption = Location of Sydney Opera House in Sydney

| altitude = {{convert|4|m|ft|0|abbr=on}}

| building_type = Performing arts centre

| architectural_style = Expressionist

| structural_system = Concrete frame & precast concrete ribbed roof

| cost = {{AUD|102 million}}, equivalent to ~{{AUD|915 million}} in 2015{{cite web|url=http://www.rba.gov.au/calculator/annualDecimal.html|title=Inflation Calculator|publisher=RBA|date=14 February 1966|accessdate=15 May 2016}}

| client = NSW government

| owner = NSW Government

| current_tenants = {{Unbulleted list|Opera Australia|The Australian Ballet|Sydney Theatre Company|Sydney Symphony Orchestra|(+ others)}}

| location = Bennelong Point, Sydney

| location_country = Australia

| iso_region = AU-NSW

| coordinates_display = title

| latd = 33

| latm = 51

| lats = 31.2

| latNS = S

| longd = 151

| longm = 12

| longs = 50.5

| longEW = E

| groundbreaking_date = 1 March 1959

| start_date = 1 March 1959

| completion_date = 1973

| opened_date = 20 October 1973

| inauguration_date = 20 October 1973

| renovation_date =

| height = {{convert|65|m|ft|0|abbr=on}}

| other_dimensions = {{unbulleted list | length {{convert|183|m|ft|0|abbr=on}} | width {{convert|120|m|ft|0|abbr=on}} | area {{convert|1.8|ha|acre|1|abbr=on}} }}

| seating_capacity = {{Unbulleted list|Concert Hall 2,679|Joan Sutherland Theatre 1,507|Drama Theatre 544|Playhouse 398|The Studio 400|Utzon Room 210|Total 5,738}}

| main_contractor = Civil & Civic (level 1), M.R. Hornibrook (level 2 and 3 and interior)

| architect = Jørn Utzon

| structural_engineer = Ove Arup & Partners

| awards =

| url = {{URL|sydneyoperahouse.com}}

| embedded = {{designation list | embed=yes

| designation1 = WHS

| designation1_date = 2007 (31st session)

| designation1_type = Cultural

| designation1_criteria = i

| designation1_number = [http://whc.unesco.org/en/list/166 166rev]

| designation1_free1name = State Party

| designation1_free1value = Australia

| designation1_free2name = Region

| designation1_free2value = Asia-Pacific

}}

| references = CoordinatesTopographic maps 1:100000 9130 Sydney and 1:25000 91303N Parramatta River

}}

Adapted from {{oldid2|735365651|Sydney Opera House}}

{{reflist-talk}}

{{-}}

Thermometer

{{Thermometer |val=300 |max=1000}}

{{-}}

Wikidata arbitrary access

See Module:Sandbox/RexxS/AA

{{#invoke:Sandbox/RexxS/AA|getValueFromID|Q151973|P26|FETCH_WIKIDATA}} - to fetch value of 'spouse' (P26) from 'Richard Burton' (Q151973)

{{#invoke:Sandbox/RexxS/AA|getValueFromID|Q151973|P26|FETCH_WIKIDATA}}:

At present (21:55, 11 May 2015 (UTC)) this returns "Lua error in Module:Sandbox/RexxS/AA at line 17: Access to arbitrary items has been disabled.."

Previewing in Richard Burton gives Elizabeth Taylor, Sally Burton, Sybil Christopher, so we know the sandbox module works.

:Yay - Today it works! 12:24, 17 September 2015 (UTC)

Monitor check - green

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15 grey

16 pale green

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15 pale green

16 white

Chrome button

Chrome button

Bad sig

Famously Sharp (talk) 15:50, 18 April 2014 (UTC)

cslist

A comma separated list.

html inline list:

  • Headmaster
  • painter
  • recording artist

html list inside hlist class:

  • Headmaster
  • painter
  • recording artist

html list inside cslist class:

  • Headmaster
  • painter
  • recording artist

hlist template:

{{hlist|Headmaster|painter|recording artist}}

hlist template with cslist class:

{{hlist|Headmaster|painter|recording artist|class=cslist}}

Getting an image from Wikidata

{{#if: {{#property:p18}} | thumb |}}

{{#invoke:Sandbox/RexxS/Images|getImage}}

Infobox person

Just parent=

{{User:RexxS/IBPerson

|parent = my father

}}

{{-}}

Just parents=

{{User:RexxS/IBPerson

|parents = {{ubl|my dad|my mom}}

}}

{{-}}

Both parent= and parents=

{{User:RexxS/IBPerson

|parent = my father

|parents = {{ubl|my dad|my mom}}

}}

Convert errors

This represents an error message that should be different in preview mode from saved mode.

Icon for editing Wikidata

Author for {{Q|Q15228}} - should be J. R. R. Tolkien

  • {{#invoke:WikidataIB |getValue |P50 |name=author |fetchwikidata=ALL |qid=Q15228 }}

Publication date for {{Q|Q15228}} - should be 1954

  • {{#invoke:WikidataIB |getValue |P577 |name=publication_date |fetchwikidata=ALL |qid=Q15228 }}

Cite encyclopedia

  • {{cite encyclopedia | last = Cavell | first = Richard | editor-last = Sugars | editor-first = Cynthia | title = Remembering Canada: The Politics of Cultural Memory | encyclopedia = The Oxford Handbook of Canadian Literature | year = 2015 | publisher = Oxford University Press | isbn = 9780199941865 | pages = 64–79}}
  • {{cite encyclopedia | last=Brody | first=David | author-link=David Brody | title=Meany, George | url=http://www.anb.org/articles/15/15-01098.html | encyclopedia=American National Biography Online | publisher=Oxford University Press and American Council of Learned Societies | subscription=yes | date=February 2000 | access-date=12 August 2016}}
  • {{cite book | last = Cavell | first = Richard | editor-last = Sugars | editor-first = Cynthia | title = Remembering Canada: The Politics of Cultural Memory | work = The Oxford Handbook of Canadian Literature | year = 2015 | publisher = Oxford University Press | isbn = 9780199941865 | pages = 64–79}}
  • {{cite book | last = Cavell | first = Richard | editor-last = Sugars | editor-first = Cynthia | title = Remembering Canada: The Politics of Cultural Memory | encyclopedia = The Oxford Handbook of Canadian Literature | year = 2015 | publisher = Oxford University Press | isbn = 9780199941865 | pages = 64–79}}
  • {{cite book | last=Brody | first=David | author-link=David Brody | title=Meany, George | url=http://www.anb.org/articles/15/15-01098.html | encyclopedia=American National Biography Online | publisher=Oxford University Press and American Council of Learned Societies | subscription=yes | date=February 2000 | access-date=12 August 2016}}

Test citeq

{{#invoke:Citeq/sandbox |cite_q |qid=Q15625490 |title=Book title}}

{{Cite Q|Q15625490}}

Test Page

{{#invoke:Page|id|1284129}} → {{#invoke:Page|id|1284129}}

Subst cite

{{cite web|title=1-2 Castle Cottages|url=http://list.english-heritage.org.uk/resultsingle.aspx?uid=1057244|work=National Heritage List for England|publisher=Historic England|accessdate=15 July 2013}}

{{citation|title=1-2 Castle Cottages|url=http://list.english-heritage.org.uk/resultsingle.aspx?uid=1057244|work=National Heritage List for England|publisher=Historic England|accessdate=15 July 2013}}

{{subst:cite web|title=1-2 Castle Cottages|url=http://list.english-heritage.org.uk/resultsingle.aspx?uid=1057244|work=National Heritage List for England|publisher=Historic England|accessdate=15 July 2013}} → {{#invoke:citation/CS1|citation

|CitationClass=web

}}

{{safesubst:cite web|title=1-2 Castle Cottages|url=http://list.english-heritage.org.uk/resultsingle.aspx?uid=1057244|work=National Heritage List for England|publisher=Historic England|accessdate=15 July 2013}} → {{#invoke:citation/CS1|citation

|CitationClass=web

}}

{{subst:citation|title=1-2 Castle Cottages|url=http://list.english-heritage.org.uk/resultsingle.aspx?uid=1057244|work=National Heritage List for England|publisher=Historic England|accessdate=15 July 2013}} → {{

#if:

|{{Citation/patent

|Surname1 =

|Surname2=

|Surname3=

|Surname4=

|Given1 =

|Given2=

|Given3=

|Given4=

|Inventorlink1=

|Inventorlink2=

|Inventorlink3=

|Inventorlink4=

|Title=1-2 Castle Cottages

|CountryCode=

|PublicationNumber=

|Description=

|PublicationDate=

|IssueDate=

|Year={{{year}}}

|FilingDate=

|PriorityDate=

|Assignee1=

|Assignee2=

|Ref=harv

|Sep = {{#ifeq:{{{seperator}}}|;|;|,}}

|PS = {{#if:|||.}}

|AuthorSep = {{#ifeq:|;|;|;}}

}}

|{{#invoke:citation/CS1|citation

|CitationClass=citation

}}

}}

WikidataIB on Commons

From c:User talk:RexxS #Oddity with WikidataIB

: The strange part is that fetching the label directly for Q35682629 gives "Stierch"; asking for the local sitelink shows there isn't one (as expected):

:* {{#invoke:WikidataIB |getLink |Q35682629}} → {{#invoke:WikidataIB |getLink |Q35682629}}

:* {{#invoke:WikidataIB |getLabel |Q35682629}} → {{#invoke:WikidataIB |getLabel |Q35682629}}

:* {{#invoke:WikidataIB |getAT |Q35682629}} → {{#invoke:WikidataIB |getAT |Q35682629}}

: But enabling the "wikidata-link" in getValue() still returns nothing:

:* {{#invoke:WikidataIB |getValue |P735 |qid=Q5060734 |fetchwikidata=ALL |onlysourced=no |wdl=yes}} → {{#invoke:WikidataIB |getValue |P735 |qid=Q5060734 |fetchwikidata=ALL |onlysourced=no |wdl=yes}}

: It's as if there were a label, but that label is empty, which shouldn't happen. I need to track that down. --RexxS ({{int:Talkpagelinktext}}) 00:38, 5 April 2018 (UTC)

: A few more tests:

:* {{#invoke:WikidataIB |getValue |P735 |qid=Q5060734 |fetchwikidata=ALL |onlysourced=no}} → {{#invoke:WikidataIB |getValue |P735 |qid=Q5060734 |fetchwikidata=ALL |onlysourced=no}}

:* {{#invoke:WikidataIB |getValue |P735 |qid=Q5060734 |fetchwikidata=ALL |onlysourced=no |noicon=true}} → {{#invoke:WikidataIB |getValue |P735 |qid=Q5060734 |fetchwikidata=ALL |onlysourced=no |noicon=true}}

:* {{#invoke:WikidataIB |getValue |P735 |qid=Q5060734 |fetchwikidata=ALL |onlysourced=no |noicon=true |sep="--"}} → {{#invoke:WikidataIB |getValue |P735 |qid=Q5060734 |fetchwikidata=ALL |onlysourced=no |noicon=true |sep="--"}}

These work here. Something's not right. --RexxS (talk) 01:44, 5 April 2018 (UTC)

Routemap tables

20px

Aberdeen, Carlisle, Inverness,

Glasgow Central, Glasgow Queen Street

20px

Waverley Route

to Brunstane

20px

Edinburgh Suburban line

Lothian lines

--

24px

Aberdeen, Carlisle, Inverness,

Glasgow Central, Glasgow Queen Street

24px

Waverley Route

to Brunstane

24px

Edinburgh Suburban line

Lothian lines

--

28px

Aberdeen, Carlisle, Inverness,

Glasgow Central, Glasgow Queen Street

28px

Waverley Route

to Brunstane

28px

Edinburgh Suburban line

Lothian lines

Nationality

New Oxford American Dictionary:

;state: a nation or territory considered as an organized political community under one government

;nation: a large aggregate of people united by common descent, history, culture, or language, inhabiting a particular country or territory

;country: a nation with its own government, occupying a particular territory

Lists

  • {{cslist | first item | second item | third item | etc}} → {{cslist | first item | second item | third item | etc}}
  • {{#invoke:List |horizontal | first item | second item | third item | etc}} → {{#invoke:List |horizontal | first item | second item | third item | etc}}

Date precision

  • >{{#invoke:WikidataIB|getDatePrecision|P569|qid=Q52063097}}< ok
  • >{{#invoke:WikidataIB|getDatePrecision|P569|qid={{{qid|Q52063097}}}}}< ok
  • >{{#invoke:WikidataIB|getDatePrecision|P569|qid={{{qid|Q42}}}}}< ok
  • >{{#invoke:WikidataIB|getDatePrecision|P569|qid=}}<
  • >{{#invoke:WikidataIB|getDatePrecision|P569}}<
  • >{{Date precision|P569|qid={{{qid|}}}}}<
  • >{{Date precision|P569|qid=}}<
  • >{{Date precision|P569|qid={{{qid|Q52063097}}}}}<
  • >{{Date precision|P569}}<
  • >{{Date precision|P569|qid={{{qid|}}}|99}}<
  • >{{#ifexpr:{{#invoke:WikidataIB|getDatePrecision|P569|qid={{{qid|Q52063097}}}}}>8|BIGGER|SMALLER}}<
  • >{{#ifexpr:{{#invoke:WikidataIB|getDatePrecision|P569|qid={{{qid|Q42}}}}}>8|BIGGER|SMALLER}}<
  • >{{#ifexpr:{{#invoke:WikidataIB|getDatePrecision|P569|qid={{{qid|}}}}}>8|BIGGER|SMALLER}}<
  • >{{#ifexpr:{{Date precision|P569|qid={{{qid|}}}}}>8|BIGGER|SMALLER}}<