Difference between revisions of "Template:InfoboxBook"

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
(fix background color)
(convert fixed table to Wiki Table, Add availble from parameter)
Line 1: Line 1:
<table style="width: 20em; text-align: left; font-size: 95%; float: right; background: white">
+
{| style="width: 20em; text-align: left; font-size: 95%; float: right; background: white; clear:right"
<tr><th colspan="2" style="font-size: larger; background: #ddd;">{{{name}}}</th></tr>
+
| colspan="2" style="font-size: larger; background: #ddd;" |'''{{{name}}}'''
<tr><td colspan="2" style="text-align: center; font-size: smaller; border-bottom: 1px solid #aaa;">{{{image}}}<br>{{{caption}}}</td></tr>
+
|-
<tr><td>Publisher</td><td>{{{publisher}}}</td></tr>
+
|colspan="2" style="text-align: center; font-size: smaller; border-bottom: 1px solid #aaa;"|{{{image}}}<br>{{{caption}}}
<tr><td>Version</td><td>{{{version|Generic}}}</td></tr>
+
|-
<tr><td>Author</td><td>{{{author}}}</td></tr>
+
|Publisher || {{{publisher}}}
<tr><td>Format</td><td>{{{format}}}</td></tr>
+
|-
<tr><td>Canonical</td><td>{{{canon|no}}}</td></tr>
+
|Version ||{{{version|Generic}}}
{{if|{{{edition|}}}|<tr><td>Edition</td><td>{{{edition}}}</td></tr>}}
+
|-
<tr><td>Year Published</td><td>{{{year}}}</td></tr>
+
|Author || {{{author}}}
{{if|{{{pages|}}}|<tr><td>Pages</td><td>{{{pages}}}</td></tr>}}
+
|-
{{if|{{{alsosee|}}}|<tr><td>Also See</td><td>{{{alsosee}}}</td></tr>}}
+
|Format || {{{format}}}
<tr><td colspan="2" style="font-size: smaller; border-top: 1px solid #aaa;">{{{footnote}}}</td></tr>
+
|-
</table><includeonly>[[Category:Ludography]]
+
|Canonical || {{{canon|no}}}
 +
|-
 +
{{#if:{{{edition|}}}|
 +
{{!}}Edition
 +
{{!}}{{{edition}}}
 +
{{!}}-}}
 +
|Year Published || {{{year}}}
 +
|-
 +
{{#if:{{{pages|}}}|
 +
{{!}}Pages
 +
{{!}}{{{pages}}}
 +
{{!}}-}}
 +
{{#if:{{{alsosee|}}}|
 +
{{!}}Also See
 +
{{!}}{{{alsosee}}}
 +
{{!}}-}}
 +
{{#if:{{{available|}}}|
 +
{{!}}Available from
 +
{{!}}{{{available}}}
 +
{{!}}-}}
 +
|colspan="2" style="font-size: smaller; border-top: 1px solid #aaa;"|{{{footnote}}}
 +
|}<includeonly>[[Category:Ludography]]
 
[[Category:{{#if:{{#pos:{{{version|[[Generic]]}}}|{{!}}}}|{{#sub:{{{version|[[Generic]]}}}|2|{{#expr:{{#pos:{{{version|[[Generic]]}}}|{{!}}}}-2}}}}|{{#sub:{{{version|[[Generic]]}}}|2|-2}}}} Books]]
 
[[Category:{{#if:{{#pos:{{{version|[[Generic]]}}}|{{!}}}}|{{#sub:{{{version|[[Generic]]}}}|2|{{#expr:{{#pos:{{{version|[[Generic]]}}}|{{!}}}}-2}}}}|{{#sub:{{{version|[[Generic]]}}}|2|-2}}}} Books]]
 
[[Category:{{#if:{{#pos:{{{publisher}}}|{{!}}}}|{{#sub:{{{publisher}}}|2|{{#expr:{{#pos:{{{publisher}}}|{{!}}}}-2}}}}|{{#sub:{{{publisher}}}|2|-2}}}} Books]]
 
[[Category:{{#if:{{#pos:{{{publisher}}}|{{!}}}}|{{#sub:{{{publisher}}}|2|{{#expr:{{#pos:{{{publisher}}}|{{!}}}}-2}}}}|{{#sub:{{{publisher}}}|2|-2}}}} Books]]
 
</includeonly><noinclude>
 
</includeonly><noinclude>
[[Category:Infobox|Book]]
+
[[Category:Infobox|Book]][[Category: Template|Book]]
 
This is a template for any form of published material: e.g. books, magazines, games.
 
This is a template for any form of published material: e.g. books, magazines, games.
 
It will auto-generate categories for "publisher Books" and "version Books" assuming these are correctly defined as references.
 
It will auto-generate categories for "publisher Books" and "version Books" assuming these are correctly defined as references.
Line 35: Line 56:
 
   |pages={number of pages}
 
   |pages={number of pages}
 
   |alsosee={related reference}
 
   |alsosee={related reference}
 +
  |available={either "Out of Print" or a URL source to get the item}
 
   |footnote=(misc info e.g. isbn)
 
   |footnote=(misc info e.g. isbn)
 
}}
 
}}
 
</nowiki></pre>
 
</nowiki></pre>
 
</noinclude>
 
</noinclude>

Revision as of 14:13, 17 July 2008

{{{name}}}
{{{image}}}
{{{caption}}}
Publisher {{{publisher}}}
Version Generic
Author {{{author}}}
Format {{{format}}}
Canonical no
Year Published {{{year}}}
{{{footnote}}}

This is a template for any form of published material: e.g. books, magazines, games. It will auto-generate categories for "publisher Books" and "version Books" assuming these are correctly defined as references.

Use:

{{InfoboxBook
  |name={Name of book}
  |image={Reference to Image}
  |caption={Sub-Title of Book}
  |publisher={Reference to Publisher}
  |version={Reference to Version of Traveller}
  |author={List of authors}
  |format={book format eg. lbb}
  |canon={yes or no is book canon}
  |edition={versions of book, issue}
  |year={year published}
  |pages={number of pages}
  |alsosee={related reference}
  |available={either "Out of Print" or a URL source to get the item}
  |footnote=(misc info e.g. isbn)
}}