Difference between revisions of "Template:InfoboxBook2"

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
 
(19 intermediate revisions by 4 users not shown)
Line 15: Line 15:
 
|year    = Date
 
|year    = Date
 
|language = Text
 
|language = Text
 +
|isbn    = Text
 +
|product_code = Text
 
}}</noinclude>
 
}}</noinclude>
 
{| class="va-infobox"
 
{| class="va-infobox"
! colspan="4"  class="color2" style="background: #f2f5e3" |'''{{{name}}}'''
+
! colspan="4"  class="color2" style="background: #99998A" |'''{{{name}}}'''
 
|-
 
|-
| colspan="2" | Author  
+
{{#if: {{{image|}}}|
 +
{{!}}colspan="4" style="text-align: center; font-size: smaller; border-bottom: 1px solid #aaa;"{{!}}[[File:{{{image}}}]]<br>{{{caption}}}
 +
{{!}}-
 +
}}
 +
|-
 +
| colspan="2" | [[Traveller Author|Author]]
 
| colspan="2" | {{#arraymap:{{{author|}}}|,|a|[[a]]|,&nbsp;}}
 
| colspan="2" | {{#arraymap:{{{author|}}}|,|a|[[a]]|,&nbsp;}}
 
|-
 
|-
{{#if:{{{available|}}}|
+
| colspan="2" | [[Traveller Publisher|Publisher]]  
{{!}} colspan="2" {{!}} Available from
+
| colspan="2" | [[{{{publisher|}}}]]
{{!}} colspan="2" {{!}} {{#if: {{#pos:{{{available}}}|rpgnow.com}}|[{{{available}}} RPGNow]|{{{available}}} }}
 
{{!}}-}}
 
{{#if:{{{alsosee|}}}|
 
{{!}} colspan="2" {{!}} Also See
 
{{!}} colspan="2" {{!}} {{{alsosee}}}
 
{{!}}-}}
 
{{#if:{{{footnote|}}}|
 
{{!}} colspan=4 style="font-size: smaller; border-top: 1px solid #aaa;" {{!}}{{{footnote}}}
 
{{!}}-}}
 
{{#if:{{{contents|}}}|
 
{{!}}-
 
!colspan="4"  class="color2" style="background: #f2f5e3"{{!}}Table of Contents
 
{{!}}-
 
{{!}}colspan="3"{{!}}{{#arraymap:{{{contents|}}}|,|c|{{#explode:c|:|0}}{{!}}{{!}}{{#explode:c|:|1}}|\n{{!}}-\n{{!}}colspan="3"{{!}} }} }}
 
|-
 
| colspan="2" | Canonical
 
| colspan="2" | {{{canon|}}}
 
 
|-
 
|-
 +
| colspan="2" | [[Versions of Traveller|Version]]
 +
| colspan="2" | [[{{{version|Generic}}}]]
 +
|-
 
{{#if:{{{edition|}}}|
 
{{#if:{{{edition|}}}|
 
{{!}} colspan="2" {{!}} Edition
 
{{!}} colspan="2" {{!}} Edition
 
{{!}} colspan="2" {{!}} {{{edition}}}
 
{{!}} colspan="2" {{!}} {{{edition}}}
 
{{!}}-}}
 
{{!}}-}}
|-
 
 
| colspan="2" | Format  
 
| colspan="2" | Format  
 
| colspan="2" | {{{format}}}
 
| colspan="2" | {{{format}}}
 
|-
 
|-
| colspan="2" | Language
+
| colspan="2" | [[Language]]
 
| colspan="2" | [[{{{language|English}}}]]
 
| colspan="2" | [[{{{language|English}}}]]
 
|-
 
|-
Line 58: Line 50:
 
{{!}}-}}
 
{{!}}-}}
 
|-
 
|-
{{#if: {{{image|}}}|
+
| colspan="2" | Year Published
{{!}}colspan="4" style="text-align: center; font-size: smaller; border-bottom: 1px solid #aaa;"{{!}}[[File:{{{image}}}]]<br>{{{caption}}}
+
| colspan="2" | {{{year|{{CURRENTYEAR}}}}}
{{!}}-
 
}}
 
| colspan="2" | Publisher
 
| colspan="2" | [[{{{publisher|}}}]]
 
 
|-
 
|-
| colspan="2" | Version
+
| colspan="2" | [[Canon|Canonical]]
| colspan="2" | [[{{{version|Generic}}}]]
+
| colspan="2" | {{{canon|}}}
 
|-
 
|-
| colspan="2" | Year Published
+
{{#if:{{{available|}}}|
| colspan="2" | {{{year|{{CURRENTYEAR}}}}}
+
{{!}} colspan="2" {{!}} Available from
 +
{{!}} colspan="2" {{!}} {{#if: {{#pos:{{{available}}}|rpgnow.com}}|[{{{available}}} RPGNow]|{{{available}}} }}
 +
{{!}}-}}
 +
{{#if:{{{alsosee|}}}|
 +
{{!}} colspan="2" {{!}} Also See
 +
{{!}} colspan="2" {{!}} {{{alsosee}}}
 +
{{!}}-}}
 +
{{#if:{{{product code|}}}|
 +
{{!}} colspan="2" {{!}} Product code
 +
{{!}} colspan="2" {{!}} {{{product code}}}
 +
{{!}}-}}
 +
{{#if:{{{footnote|}}}|
 +
{{!}} colspan=4 style="font-size: smaller; border-top: 1px solid #aaa;" {{!}}{{{footnote}}}
 +
{{!}}-}}
 +
{{#if:{{{isbn|}}}|
 +
{{!}} colspan="2" style="font-size: smaller;" {{!}} ISBN
 +
{{!}} colspan="2" style="font-size: smaller;" {{!}} {{{isbn}}}
 +
{{!}}-}}
 +
{{#if:{{{contents|}}}|
 +
{{!}}-
 +
!colspan="4"  class="color2" style="background: #f2f5e3"{{!}}Table of Contents
 +
{{!}}-
 +
{{!}}colspan="3"{{!}}{{#arraymap:{{{contents|}}}|,|c|{{#explode:c|:|0}}{{!}}{{!}}{{#explode:c|:|1}}|\n{{!}}-\n{{!}}colspan="3"{{!}} }} }}
 
|-
 
|-
 
|}<includeonly>[[Category:Ludography]]
 
|}<includeonly>[[Category:Ludography]]
Line 91: Line 101:
 
|year    ={{{year|{{CURRENTYEAR}}}}}
 
|year    ={{{year|{{CURRENTYEAR}}}}}
 
|language ={{{language|English}}}
 
|language ={{{language|English}}}
 +
|isbn    ={{{isbn|}}}
 +
|product_code ={{{product code}}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
[[Category: Infobox|Book]]
 
[[Category: Infobox|Book]]
Line 96: Line 108:
 
[[Category: Cargo Templates|Book]]
 
[[Category: Cargo Templates|Book]]
 
{{InfoboxBook2/doc}}  
 
{{InfoboxBook2/doc}}  
 +
[[Template:InfoboxBook2/doc]]
 
</noinclude>
 
</noinclude>

Latest revision as of 01:36, 25 January 2022

This template defines the table "RPGBook". View table.

{{{name}}}
Author
Publisher [[]]
Version Generic
Format {{{format}}}
Language English
Year Published 2024
Canonical

This is a template for any form of published material: e.g. books, periodicals, games. The result is a combined Bibliography and Ludography.

Description[edit]

This template stores data in Cargo tables. This means the format of the elements is more specific and picky. The parameters to the template are parsed and inserted into tables in the database for query through Cargo.

It will auto-generate categories for "<publisher> Books", "<version> Books", and "Published <year>" when you enter the parameters correctly. .

Template Parameters[edit]

InfoboxBook2 Parameters
Parameter Remarks
name Full title of the book or publication. Do not add any formatting. Periodicals should have their issue number appended, zero padded, and with no other formatting. E.g. Challenge 26
alsosee related reference
author List of credited authors, comma separated. Do not add any formatting
available URL source to legally purchase the item, please use Template:DTRPG if possible to format the link
canon Yes or No. Statement if the book is considered a canon source.
caption Sub-Title of Book, or description of the content
contents Table of contents, comma separated list of "chapter title":page. This can be tricky to get right and recommend omitting it.
edition Edition of the book or publication. Usually a 1st edition, but some books had a second edition.
footnote Miscellaneous information, usually used for either a publisher ID number or an ISBN or both
format Format of the publication: Book, softcover, hardcover, PDF, folio, periodical
image Cover image or associated image. Do not add any formatting, and omit the "File:" namespace from the name
isbn International Standard Book Number (ISBN), the 13-digit number that uniquely identifies this book or publication.
language Language of the publication, defaults to English
pages number of pages, whole numbers only
product code The publisher specific code for this publication. Some publisher give short codes or numbers to identify their products different from the isbn
publisher Name of publisher. Used for generating a category so precise names are important. Do not add any formatting.
version Which version of Traveller rules are being referenced in the book. Do not add any formatting.
year Year of publication according to the title page.

Template Layout[edit]

Use:

{{InfoboxBook2
|name      = {Name of the book, no links}
|alsosee   = {related reference}
|author    = {List of authors, comma separates, no links}
|available = {URL source to get the item (only)}
|canon     = Yes {1 (yes) or 0 (no) is book considered a canon source}
|caption   = {Sub-Title of Book}
|contents  = {Table of contents, comma separated list of "chapter title":page}
|edition   = 1st {versions of book, issue}
|footnote  = (misc info e.g. isbn)
|format    = Book (Softback) {book format eg. lbb}
|image     = {Reference to Image, no links, no File required}
|isbn      = {ISBN number, no links}
|language  = English
|pages     = {number of pages}
|product code = {publisher code}
|publisher = {Name of publisher, no links}
|version   = {Reference to Version of Traveller, no links}
|year      = {year published}
}}

As of 2019, the previous template Template:InfoboxBook has almost entirely been phased out. Please use this template for published materials. Template:InfoboxBook2/doc