Difference between revisions of "Template:Infobox book/wikidata/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>RexxS
(Create sandbox version of Template:Infobox book/wikidata)
 
imported>Jonesey95
(Fix Linter errors, use standard call to ISBN template to get error-checking. This should probably use Module:WikidataIB to get its benefits, including exclusion of unsourced data.)
Line 35: Line 35:
 
| data12      = {{#invoke:Wikidata|getValue|P136|{{{genre|FETCH_WIKIDATA}}}}}
 
| data12      = {{#invoke:Wikidata|getValue|P136|{{{genre|FETCH_WIKIDATA}}}}}
 
| label13      = Set in
 
| label13      = Set in
| data13      = {{{set_in|{{#invoke:Wikidata|getValue|P2408|FETCH_WIKIDATA}} {{#invoke:Wikidata|getValue|P1434|FETCH_WIKIDATA}} {{#invoke:Wikidata|getValue|P840|FETCH_WIKIDATA}}}}}
+
| data13       = {{{set_in|{{#invoke:Wikidata|getValue|P2408|FETCH_WIKIDATA}} {{#invoke:Wikidata|getValue|P1434|FETCH_WIKIDATA}} {{#invoke:Wikidata|getValue|P840|FETCH_WIKIDATA}}}}}
 
| label14      = Published
 
| label14      = Published
 
| data14      = {{date| {{{published| {{#property:p577}}}}}|{{{dateformat|dmy}}} }}
 
| data14      = {{date| {{{published| {{#property:p577}}}}}|{{{dateformat|dmy}}} }}
Line 45: Line 45:
 
| data17      = {{#invoke:Wikidata|getValue|P1104|{{{pages|FETCH_WIKIDATA}}}}}
 
| data17      = {{#invoke:Wikidata|getValue|P1104|{{{pages|FETCH_WIKIDATA}}}}}
 
| label18      = Awards
 
| label18      = Awards
| data18       = {{#if:{{#property:p166}}|{{plainlist|{{#invoke:listify|input|,| {{#invoke:Wikidata|getValue|P166|{{{awards|FETCH_WIKIDATA}}}}}}}}}}}
+
| data18       = {{#if:{{#property:p166}}|{{plainlist|{{#invoke:listify|input|,| {{#invoke:Wikidata|getValue|P166|{{{awards|FETCH_WIKIDATA}}}}}}}}}}}
 
| label19      = {{#if:{{#property:p957}}{{#property:p212}}|[[International Standard Book Number|{{abbr|ISBN|International Standard Book Number}}]]}}
 
| label19      = {{#if:{{#property:p957}}{{#property:p212}}|[[International Standard Book Number|{{abbr|ISBN|International Standard Book Number}}]]}}
| data19      = {{plainlist|
+
| data19      = {{#if:{{#property:p957}}{{#property:p212}}|{{plainlist|
{{#if:{{#property:p957}}|*{{nowrap|ISBN-10: [[Special:Booksources/{{#property:p957}}|{{#property:p957}}]]}}}}
+
{{#if:{{#property:p957}}|*{{nowrap|{{ISBN|{{#property:p957}}}}}}
{{#if:{{#property:p212}}|*{{nowrap|ISBN-13: [[Special:Booksources/{{#property:p212}}|{{#property:p212}}]]}}}}
+
{{#if:{{#property:p212}}|*{{nowrap|{{ISBN|{{#property:p212}}}}}}}}
}}
+
}}}}
 
| label20      = [[OCLC#Control Numbers|{{abbr|OCLC|Online Computer Library Center number}}]]
 
| label20      = [[OCLC#Control Numbers|{{abbr|OCLC|Online Computer Library Center number}}]]
 
| data20      = {{#if:{{#property:p243}}|[http://worldcat.org/oclc/{{urlencode:{{#property:p243}}}} {{#property:p243}}]}}
 
| data20      = {{#if:{{#property:p243}}|[http://worldcat.org/oclc/{{urlencode:{{#property:p243}}}} {{#property:p243}}]}}

Revision as of 19:04, 2 July 2020

{{Infobox | bodyclass = vcard | bodystyle = | labelstyle = white-space:nowrap | italic title = | titlestyle = font-style:normal | subheaderstyle = font-style:normal | title = {{#property:p1476}} | subheader = {{#property:p1680}} | image = {{#property:p18}} | caption = | label1 = Author | data1 = Script error: No such module "Wikidata". | label2 = Editor | data2 = Script error: No such module "Wikidata". | label3 = Original title | data3 = | label4 = Working title | data4 = Script error: No such module "Wikidata". | label5 = Translator | data5 = Script error: No such module "Wikidata". | label6 = Illustrator | data6 = Script error: No such module "Wikidata". | label7 = Cover artist | data7 = Script error: No such module "Wikidata". | label8 = Country | data8 = Script error: No such module "Wikidata". | label9 = Language | data9 = Script error: No such module "Wikidata". | label10 = Series | data10 = Script error: No such module "Wikidata". | label11 = Subject | data11 = Script error: No such module "Wikidata". | label12 = Genre | data12 = Script error: No such module "Wikidata". | label13 = Set in | data13 = Script error: No such module "Wikidata". Script error: No such module "Wikidata". Script error: No such module "Wikidata". | label14 = Published | data14 = {{#property:p577}} | label15 = Publisher | data15 = Script error: No such module "Wikidata". | label16 = Media type | data16 = Script error: No such module "Wikidata". | label17 = Pages | data17 = Script error: No such module "Wikidata". | label18 = Awards

| data18 =

Script error: No such module "listify".

| label19 = ISBN

| data19 =

  • ISBN [[Special:BookSources/%7B%7B%23property%3Ap957%7D%7D |{{#property:p957}}]] Parameter error in {{ISBN}}: Invalid ISBN.
  • ISBN [[Special:BookSources/%7B%7B%23property%3Ap212%7D%7D |{{#property:p212}}]] Parameter error in {{ISBN}}: Invalid ISBN.


50px Template documentation[view] [edit] [history] [purge]

Template:Uses Wikidata

Try it in context: Template:Wikidata example

Please test it across the Wikipedia!

Usage

See Template:Infobox book/doc#Usage. Not working params:

  • wikisource

No support for notes. Support for obsolete params dropped.

Template:Wikidata infoboxes