Template:Book: Difference between revisions

No edit summary
Tag: Reverted
m Renamed parameters.
 
(265 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
<includeonly>{{Infobox<!--
<div style="float: right; clear: right; width: 300px; margin: 0 0 1em 1em; background-color: #f9f9f9; border: 1px solid #aaa; padding: 0.5em;">
-->| name = ''{{{name|}}}''<!--
{| style="width: 100%; background: #ffffff; border-spacing: 0; margin: 0;"
-->| image = {{{image|}}}<!--
-->| caption = {{{caption|}}}<!--
-->| data_rows =<!--
-->{{#if: {{{author|}}} |<tr class="infobox-data-row"><th>Author</th><td>{{{author}}}</td></tr>}}<!--
-->{{#if: {{{cover_artist|}}} |<tr class="infobox-data-row"><th>Cover Artist</th><td>{{{cover_artist}}}</td></tr>}}<!--
-->{{#if: {{{series|}}} | <tr class="infobox-data-row"><th>Series</th><td>{{#if:{{b|{{{series}}}}} | ''[[{{b|{{{series}}}}}|{{b|{{{series}}}|text=y}}]]'' | {{{series}}}}}</td></tr>}}<!--
-->{{#if: {{{period_covered|}}} |<tr class="infobox-data-row"><th>Period Covered</th><td>{{{period_covered}}}</td></tr>}}<!--
-->{{#if: {{{publication_date|}}} |<tr class="infobox-data-row"><th>Publication Date</th><td>{{{publication_date}}}</td></tr>}}<!--
-->{{#if: {{{publication_place|}}} |<tr class="infobox-data-row"><th>Publication Place</th><td>{{{publication_place}}}</td></tr>}}<!--
-->{{#if: {{{publisher|}}} |<tr class="infobox-data-row"><th>Publisher</th><td>{{{publisher}}}</td></tr>}}<!--
-->{{#if: {{{media_type|}}} |<tr class="infobox-data-row"><th>Media Type</th><td>{{{media_type}}}</td></tr>}}<!--
-->{{#if: {{{pages|}}} |<tr class="infobox-data-row"><th>Pages</th><td>{{{pages}}}</td></tr>}}<!--
-->{{#if: {{{word_count|}}} |<tr class="infobox-data-row"><th>Word Count</th><td>{{{word_count}}}</td></tr>}}<!--
-->{{#if: {{{audiobook_length|}}} |<tr class="infobox-data-row"><th>Audiobook Length</th><td>{{{audiobook_length}}}</td></tr>}}<!--
-->{{#if: {{{narrated_by|}}} |<tr class="infobox-data-row"><th>Narrated By</th><td>{{{narrated_by}}}</td></tr>}}<!--
-->{{#if: {{{genre|}}} |<tr class="infobox-data-row"><th>Genre</th><td>{{{genre}}}</td></tr>}}<!--
-->{{#if: {{{isbn|}}} |<tr class="infobox-data-row"><th>ISBN</th><td>{{{isbn}}}</td></tr>}}<!--
-->{{#if: {{{preceded_by|}}} | <tr class="infobox-data-row"><th>Preceded By</th><td>{{#if:{{b|{{{preceded_by}}}}} | ''[[{{b|{{{preceded_by}}}}}|{{b|{{{preceded_by}}}|text=y}}]]'' | {{{preceded_by}}}}}</td></tr>}}<!--
-->{{#if: {{{followed_by|}}} | <tr class="infobox-data-row"><th>Followed By</th><td>{{#if:{{b|{{{followed_by}}}}} | ''[[{{b|{{{followed_by}}}}}|{{b|{{{followed_by}}}|text=y}}]]'' | {{{followed_by}}}}}</td></tr>}}<!--
-->}}<!--
-->{{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Books]]}}</includeonly><noinclude>
== Description ==
This template should be used on book pages to add an infobox in the upper right hand corner of the article.
 
== Usage ==
This template has several [[:Template:Character#Parameters|parameters]] that can be used.
: '''Note: Only parameters that are provided will appear in the infobox. Not all parameters are required for each book.'''
 
{| style="width: 100%; text-align: left; margin: auto;" class="wikitable"
|-
|-
! colspan="2" style="text-align: center; background-color: #f2f2f2; font-size: 120%; padding: 0.5em; font-weight: bold;" | {{{title|Title Unknown}}}
! width=50%|You Type
!You Get
|-
|-
{{#if: {{{image|}}} |
| style="text-align: left; vertical-align: top;" |<pre>
| colspan="2" style="text-align: center;" | [[File:{{{image}}}|200px|alt={{{caption|}}}|{{{caption|}}}]]
{{book
|name=Example Book Infobox
|image=Emma - Volume 1.jpg
|caption=Caption Here
|author=Author's Name
|cover_artist=Artist's Name
|series=Series Name
|period covered=Time Period
|publication_date=Date Here
|publication_place=Location Here
|publisher=Publisher Here
|media_type=Format Here
|pages=Number of Pages
|word_count=Word Count
|audiobook_length=Length of Audiobook
|narrated_by=Reader's Name(s)
|genre=Genre Here
|isbn=ISBN Here
|preceded_by=Title Here
|followed_by=Title Here
}}
}}
</pre>
|<br>{{book
|name=Example Book Infobox
|image=Emma - Volume 1.jpg
|caption=Caption Here
|author=Author's Name
|cover_artist=Artist's Name
|series=Series Title
|period covered=Time Period
|publication_date=Date Here
|publication_place=Location Here
|publisher=Publisher Here
|media_type=Format Here
|pages=Number of Pages
|word_count=Word Count
|audiobook_length=Length of Audiobook
|narrated_by=Reader's Name(s)
|genre=Genre Here
|isbn=ISBN Here
|preceded_by=Title Here
|followed_by=Title Here
}}
|}
=== Parameters ===
{| class="wikitable" style="width: 90%;"
! Parameter !! Description
|-
| style="text-align: center;" | <code>name</code> || The book's title.
|-
| style="text-align: center;" | <code>image</code> || Filename of the book's cover image (e.g., 'Example.jpg`).
|-
| style="text-align: center;" | <code>caption</code> || Caption for the image.
|-
|-
{{#if: {{{caption|}}} |
| style="text-align: center;" | <code>author</code> || The author's name.
| colspan="2" style="text-align: center; font-size: 90%; font-style: italic; padding: 0.5em;" | {{{caption}}}
|-
}}
| style="text-align: center;" | <code>cover_artist</code> || The name of the artist who created/designed the cover.
|-
| style="text-align: center;" | <code>audio_by</code> || The name(s) of who read the audiobook.
|-
|-
{{#if: {{{author|}}} |
| style="text-align: center;" | <code>series</code> || The series the book is from, if applicable. Use abbreviation(s) from [[:Template:B]].
| '''Author''' || {{{author}}}
}}
|-
|-
{{#if: {{{audio_read_by|}}} |
| style="text-align: center;" | <code>publication_date</code> || The date of publication of first edition.
| '''Audio read by''' || {{{audio_read_by}}}
}}
|-
|-
{{#if: {{{series|}}} |
| style="text-align: center;" | <code>publication_place</code> || The country where the book was first published.
| '''Series''' || {{{series}}}
}}
|-
|-
{{#if: {{{publication_date|}}} |
| style="text-align: center;" | <code>publisher</code> || The name of the publisher. (e.g., Rhysdon Press)
| '''Publication date''' || {{{publication_date}}}
}}
|-
|-
{{#if: {{{publication_place|}}} |
| style="text-align: center;" | <code>media_type</code> || The forms in which the book has been published. (e.g., Paperback, Hardcover, ebook, audiobook, etc.)
| '''Publication place''' || {{{publication_place}}}
}}
|-
|-
{{#if: {{{publisher|}}} |
| style="text-align: center;" | <code>pages</code> || The number of pages in the first edition.
| '''Publisher''' || {{{publisher}}}
}}
|-
|-
{{#if: {{{media_type|}}} |
| style="text-align: center;" | <code>word_count</code> || The number of words in the first edition.
| '''Media type''' || {{{media_type}}}
}}
|-
|-
{{#if: {{{pages|}}} |
| style="text-align: center;" | <code>audio_length</code> || The length of the audiobook of the first edition.
| '''Pages''' || {{{pages}}}
}}
|-
|-
{{#if: {{{genre|}}} |
| style="text-align: center;" | <code>genre</code> || The genre of the book.
| '''Genre''' || {{{genre}}}
}}
|-
|-
{{#if: {{{isbn|}}} |
| style="text-align: center;" | <code>isbn</code> || The ISBN number of the first edition.
| '''ISBN''' || {{{isbn}}}
}}
|-
|-
{{#if: {{{preceded_by|}}} |
| style="text-align: center;" | <code>preceded_by</code> || What book came before the book, if applicable. Use abbreviation(s) from [[:Template:B]].
| '''Preceded by''' || {{{preceded_by}}}
}}
|-
|-
{{#if: {{{proceeded_by|}}} |
| style="text-align: center;" | <code>followed_by</code> || What book came after the book, if applicable. Use abbreviation(s) from [[:Template:B]].
| '''Proceeded by''' || {{{proceeded_by}}}
}}
|}
|}
</div>
</includeonly>
<noinclude>
== Usage ==
This is a generic infobox for books. Only fields that are provided will appear in the infobox.


=== Parameters ===
== Articles using Template ==
* `title` (required): The book's title.
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages}}
* `image`: Filename of the book cover image (e.g., `File:Example.jpg`).
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}
* `caption`: Caption for the image.
* `author`: Author of the book.
* `audio_read_by`: The narrator of the audiobook (if applicable).
* `series`: Series the book belongs to.
* `publication_date`: Date the book was published.
* `publication_place`: Place where the book was published.
* `publisher`: The book's publisher.
* `media_type`: The format (e.g., Hardcover, Paperback, eBook, Audiobook).
* `pages`: Number of pages in the book.
* `genre`: The book's genre.
* `isbn`: The ISBN of the book.
* `preceded_by`: Previous book in the series (if applicable).
* `proceeded_by`: Next book in the series (if applicable).


=== Example Usage ===
[[Category:Infoboxes]]
```wiki
{{InfoboxBook
| title = Mistborn: The Final Empire
| image = Beth Brower.jpg
| caption = Cover of ''Mistborn: The Final Empire''
| author = Brandon Sanderson
| audio_read_by = Michael Kramer
| series = Mistborn
| publication_date = July 17, 2006
| publication_place = New York, NY
| publisher = Tor Books
| media_type = Hardcover
| pages = 541
| genre = Fantasy
| isbn = 978-0-7653-1178-4
| preceded_by = (None)
| proceeded_by = ''The Well of Ascension''
}}