Difference between revisions of "Template:Infobox book"

From Abidan Archive Wiki
Jump to navigation Jump to search
o>FANDOM
m (1 revision: Updates made for portability)
 
o>TransEmo
m (1 revision imported)
Line 1: Line 1:
<infobox>
+
{{Infobox
<title source="title"/>
+
| italic title = {{{italic title|<noinclude>no</noinclude>}}}
<image source="image"><caption source="imagecaption"/></image>
+
| bodyclass = vcard
<data source="author"><label>Author</label></data>
+
| bodystyle = {{#if:{{{infoboxwidth|{{{width|}}}}}} |width:{{{infoboxwidth|{{{width}}}}}} }}
<data source="illustrator"><label>Illustrator</label></data>
+
 
<data source="datePublished"><label>Published on</label></data>
+
<!---------------Title----------------->
<data source="publisher"><label>Publisher</label></data>
+
| titlestyle = font-style:italic;padding-bottom:0.2em<!--(so title doesn't touch border)-->;
<group layout="horizontal">
+
| title = <includeonly>{{#if:{{{name|}}}{{{caption|{{{image_caption|}}}}}}{{{editors|{{{editor|}}}}}}{{{authors|{{{author|}}}}}}{{{audio_read_by|}}}{{{title_orig|}}}{{{title_working|}}}{{{translators|{{{translator|}}}}}}{{{illustrators|{{{illustrator|}}}}}}{{{cover_artist|}}}{{{country|}}}{{{language|}}}{{{series|}}}{{{release_number|}}}{{{subjects|{{{subject|}}}}}}{{{genres|{{{genre|}}}}}}{{{set_in|}}}{{{published|}}}{{{publisher|}}}{{{publisher2|}}}{{{pub_date|{{{release_date|}}}}}}{{{english_pub_date|{{{english_release_date|}}}}}}{{{media_type|}}}{{{pages|}}}{{{awards|{{{award|}}}}}}{{{isbn_note|{{{ISBN_note|}}}}}}{{{dewey|}}}{{{congress|}}}| }}<!-- hack for ref ordering
<header>Publication order</header>
+
-->{{{name|{{PAGENAMEBASE}}}}} <!--
<data source="previous"><label>Previous</label></data>
+
--><span class="Z3988"
<data source="next"><label>Next</label></data>
+
          title="ctx_ver=Z39.88-2004&rft_val_fmt={{urlencode:info:ofi/fmt:kev:mtx:book}}&rft.genre=book&rft.btitle={{urlencode:{{{name|}}}}}<!--
</group>
+
                -->{{#if:{{{author|}}}    |&rft.author={{urlencode:{{{author}}}}}}}<!--
</infobox><includeonly>[[Category:Books]]</includeonly><noinclude>{{Documentation}}</noinclude>
+
                -->{{#if:{{{last|}}}      |&rft.aulast={{urlencode:{{{last}}}}}}}<!--
 +
                -->{{#if:{{{first|}}}    |&rft.aufirst={{urlencode:{{{first}}}}}}}<!--
 +
                -->{{#if:{{{pub_date|{{{release_date|}}}}}} |&rft.date={{urlencode:{{{pub_date|{{{release_date}}}}}}}}}}<!--
 +
                -->{{#if:{{{publisher|}}} |&rft.pub={{urlencode:{{{publisher}}}}}}}<!--
 +
                -->{{#if:{{{location|}}}  |&rft.place={{urlencode:{{{location}}}}}}}<!--
 +
                -->{{#if:{{{pages|}}}    |&rft.pages={{urlencode:{{{pages}}}}}}}<!--
 +
                -->{{#if:{{{series|}}}    |&rft.series={{urlencode:{{{series}}}}}}}<!--
 +
                -->{{#if:{{{oclc|}}}      |&rft_id=info:oclcnum/{{{oclc}}}}}"><!--
 +
--></span><!--
 +
      --></includeonly>
 +
 
 +
<!---------------Image----------------->
 +
| imagestyle = {{#if:{{{image|}}}||display:none}}
 +
| image = {{#if:{{{image|}}} <!--
 +
  then:-->|  {{#invoke:InfoboxImage|InfoboxImage |image={{{image|}}} |size={{{image_size|}}} |sizedefault=frameless |upright=1 |alt={{{alt|}}} |border={{{border|}}} |suppressplaceholder=yes}}<!--
 +
  else:-->| {{#ifeq:{{yesno|{{lc:{{{exclude_cover|no}}}}}}}|yes | |{{main other|[[Category:Books with missing cover]]}} }}
 +
          }}
 +
| caption = {{{caption|{{{image_caption|}}}}}}
 +
 
 +
<!---------------Data------------------>
 +
| label1  = Editor{{#if:{{{editors|}}}|s}}
 +
|  data1  = {{{editors|{{{editor|}}}}}}
 +
 
 +
| label2  = Author{{#if:{{{authors|}}}|s}}
 +
|  data2  = {{{authors|{{{author|}}}}}}
 +
 
 +
| label3  = Audio&nbsp;read&nbsp;by
 +
|  data3  = {{{audio_read_by|}}}
 +
 
 +
| label4  = Original&nbsp;title
 +
|  data4  = {{#if:{{{title_orig|}}} |{{#if:{{{orig_lang_code|}}}|{{lang|{{{orig_lang_code|}}} |{{{title_orig}}}  |italics={{#invoke:lang/utilities|set_italics|{{{orig_lang_code|}}}|{{{title_orig}}}}}}}|''{{{title_orig}}}''}} }}
 +
 
 +
| label5  = Working&nbsp;title
 +
|  data5  = {{#if:{{{title_working|}}} |''{{{title_working}}}''}}
 +
 
 +
| label6  = Translator{{#if:{{{translators|}}}|s}}
 +
|  data6  = {{{translators|{{{translator|}}}}}}
 +
 
 +
| label7  = Illustrator{{#if:{{{illustrators|}}}|s}}
 +
|  data7  = {{{illustrators|{{{illustrator|}}}}}}
 +
 
 +
| label8  = Cover&nbsp;artist
 +
|  data8  = {{{cover_artist|}}}
 +
 
 +
| label10 = Country
 +
|  data10 = {{{country|}}}
 +
 
 +
| label11 = Language
 +
|  data11 = {{{language|}}}
 +
 
 +
| label12 = Series
 +
|  data12 = {{{series|}}}
 +
 
 +
| label13 = {{longitem|Release number}}
 +
|  data13 = {{{release_number|}}}
 +
 
 +
| label14 = Subject{{#if:{{{subjects|}}}|s}}
 +
|  data14 = {{{subjects|{{{subject|}}}}}}
 +
 
 +
| label15 = Genre{{#if:{{{genres|}}}|s}}
 +
|  data15 = {{#invoke:Wikidata|getValue|P136|{{{genres|{{{genre|}}}}}}}}
 +
 
 +
| label16 = Set&nbsp;in
 +
|  data16 = {{{set_in|}}}
 +
 
 +
| label17 = Published
 +
|  data17 = {{{published|}}}
 +
 
 +
| label18 = Publisher
 +
|  data18 = {{{publisher|}}}{{#if:{{{publisher2|}}} |, {{{publisher2}}} }}
 +
 
 +
| label19 = {{longitem|Publication date}}
 +
|  data19 = {{#invoke:Wikidata|getValue|P577|{{{pub_date|{{{release_date|}}}}}}}}
 +
 
 +
| label20 = {{longitem|Published&nbsp;in English}}
 +
|  data20 = {{{english_pub_date|{{{english_release_date|}}}}}}
 +
 
 +
| label21 = Media&nbsp;type
 +
|  data21 = {{{media_type|}}}
 +
 
 +
| label22 = Pages
 +
|  data22 = {{#invoke:Wikidata|getValue|P1104|{{{pages|}}}}}
 +
 
 +
| label23 = Award{{#if:{{{awards|}}}|s}}
 +
|  data23 = {{{awards|{{{award|}}}}}}
 +
 
 +
| label30 = [[International Standard Book Number|ISBN]]
 +
|  data30 = {{#if:{{{isbn|{{{ISBN|}}}}}}
 +
            | {{#ifeq:{{{isbn|{{{ISBN|}}}}}}|FETCH_WIKIDATA
 +
              | {{#if:{{#property:P212}}|{{#invoke:ISBNT|link|{{#property:P212}}}}[[Category:Pages using ISBN values obtained from wikidata]]}}
 +
              | {{ISBNT|1={{{isbn|{{{ISBN}}}}}}}} {{{isbn_note|{{{ISBN_note|}}}}}}
 +
              }}
 +
            }}
 +
 
 +
| label31 = [[OCLC#Identifiers and linked data|{{abbr|OCLC|Online Computer Library Center number}}]]
 +
|  data31 = {{#if:{{{oclc|}}} |[https://www.worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]}}
 +
 
 +
| label32 = {{longitem|[[Dewey Decimal Classification|Dewey Decimal]]}}
 +
|  data32 = {{#invoke:Wikidata|getValue|P1036|{{{dewey|}}}}}
 +
 
 +
| label33 = [[Library of Congress Classification|{{abbr|LC&nbsp;Class|Library of Congress Classification}}]]
 +
|  data33 = {{#invoke:Wikidata|getValue|P1149|{{{congress|}}}}}
 +
 
 +
| label34 = Preceded&nbsp;by
 +
|  data34 = {{#if:{{{preceded_by|}}} |''{{{preceded_by|}}}&nbsp;''
 +
            | {{#if:{{{preceded_by_quotation_marks|}}} |"{{{preceded_by_quotation_marks|}}}"}}
 +
            }}
 +
 
 +
| label35 = Followed&nbsp;by
 +
|  data35 = {{#if:{{{followed_by|}}} |''{{{followed_by|}}}&nbsp;''
 +
            | {{#if:{{{followed_by_quotation_marks|}}} |"{{{followed_by_quotation_marks|}}}"}}
 +
            }}
 +
 
 +
| label36 = {{longitem|Original text}}
 +
|  data36 = {{#if:{{both|{{{native_wikisource|}}}|{{{orig_lang_code|}}}}} <!--
 +
    then:-->| ''{{lang |{{{orig_lang_code|}}}
 +
                  | [[s:{{#if:{{{orig_lang_code|}}}|{{{orig_lang_code|}}}:}}{{{native_wikisource|}}}|{{{title_orig|{{{name|{{PAGENAME}}}}}}}}]]<!--
 +
              -->}}'' at <!--
 +
              -->{{#if:{{#invoke:lang|is_ietf_code|{{{orig_lang_code}}}}}|{{#invoke:lang|name_from_code|{{{orig_lang_code}}}}}}} [[Wikisource]]<!--
 +
              -->{{main other|[[Category:Articles that link to foreign-language Wikisources]]}} <!--(create hidden category to be monitored by WikiProject:Wikisource)
 +
    else:-->| {{#if:{{both|{{{native_external_url|}}}|{{{orig_lang_code|}}}}}
 +
                | ''{{lang |{{{orig_lang_code|}}}
 +
                    | [{{{native_external_url|}}} {{{title_orig|{{{name|{{PAGENAME}}}}}}}}]<!--
 +
                -->}}'' <!--
 +
                -->{{#if:{{{native_external_host|}}} |at {{{native_external_host|}}} |online}}
 +
            }} }}
 +
 
 +
| label37 = {{#if:{{{native_wikisource|}}} |Translation |{{#if:{{{native_external_url|}}}|Translation|Text}} }}
 +
|  data37 = {{#if:{{{wikisource|}}} <!--
 +
    then:-->| ''[[s:{{{wikisource|}}}|{{{name|{{PAGENAME}}}}}]]'' at <!--
 +
              -->{{#if:{{{native_wikisource|}}} |Wikisource |[[Wikisource]]}}<!--
 +
              -->{{main other|[[Category:Articles that link to Wikisource]]}} <!--(create hidden category to be monitored by WikiProject:Wikisource)
 +
    else:-->| {{#if:{{{external_url|}}}
 +
                | ''[{{{external_url|}}} {{{name|{{PAGENAME}}}}}]'' <!--
 +
                -->{{#if:{{{external_host|}}} |at {{{external_host|}}} |online}}
 +
            }} }}
 +
 
 +
| label38  = Website
 +
| data38    = {{{website|{{{homepage|{{{URL|{{#ifeq:{{{website|{{{homepage|{{{URL|}}}}}}}}}
 +
    | FETCH_WIKIDATA
 +
    | {{#if:{{#property:P856}}|{{Url|1={{#invoke:Wikidata|getValue|P856|FETCH_WIKIDATA}} }} }}
 +
    |}}}}}}}}}}}
 +
 
 +
| belowstyle = border-top:#aaa 1px solid;font-size:90%;
 +
| below = {{{notes|{{{note|}}}}}}
 +
 
 +
}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox book with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox book]] with unknown parameter "_VALUE_"|ignoreblank=y| alt | audio_read_by | author | authors | award | awards | border | caption | congress | country | cover_artist | dewey | editor | editors | english_pub_date | english_release_date | exclude_cover | external_host | external_url | first | followed_by | followed_by_quotation_marks | genre | genres | homepage | illustrator | illustrators | image | image_caption | image_size | infoboxwidth | isbn | ISBN  | isbn_note | ISBN_note | italic title | language | last | location | media_type | name | native_external_host | native_external_url | native_wikisource | nocat_wdimage | note | notes | oclc | orig_lang_code | pages | preceded_by | preceded_by_quotation_marks | pub_date | published | publisher | publisher2 | release_date | release_number | series | set_in | subject | subjects | title_orig | title_working | translator | translators | URL | website | width | wikisource
 +
}}{{Wikidata image |1={{{image|}}} |2={{{nocat_wdimage|}}}
 +
}}<noinclude>
 +
{{Documentation}}
 +
</noinclude>

Revision as of 01:16, 12 October 2019

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

TemplateData

TemplateData documentation used by VisualEditor and other tools
See the monthly error report for this template.

TemplateData for Infobox book

Consistently-formatted table for presenting information about books

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Namename

Book name.

Default
Pagename
Stringoptional
Imageimage

Image (prefer 1st edition where permitted). Use bare filename.

Stringoptional
Authorauthor

Author(s) of the book (should be link to their respective article if there is one).

Stringoptional
Languagelanguage

Language of (original) book. Full language name (not a language code).

Example
English
Stringoptional
Countrycountry

Country of (original) publication.

Stringoptional
Genregenre

The book's genre

Example
Science fiction
Stringoptional
Publishedpublished

Using the following format: year (publisher) (language, when originally written in a foreign language)

Stringoptional
Publisherpublisher

Name of publisher.

Stringdeprecated
ISBNisbn

Format: "ISBN 1-234-56789-0" (prefer 1st edition)

Stringoptional
exclude cover?exclude_cover

"yes" if no image is present and adding this article to "Category:Books with missing cover" is not desired

Example
yes
Stringoptional
Seriesseries

Series the book is part of

Example
[[The Federalist Papers]]
Stringoptional
Image sizeimage_size

no description

Example
200 px
Stringoptional
Image captioncaption

a caption for the image used

Contentoptional
Type of mediamedia_type

no description

Example
[[Newspaper]]
Stringoptional
Date of publicationpub_date

Date the book or work was published

Example
December 21, 1787
Dateoptional
Preceded bypreceded_by

The previous installment in the series/from the author

Example
[[Federalist No. 4]]
Stringoptional
Followed byfollowed_by

The next installment in the series/from the author

Example
[[Federalist No. 6]]
Stringoptional