Template:Infobox character: Difference between revisions

No edit summary
No edit summary
Tag: Reverted
Line 1: Line 1:
<!-- Template:Infobox character (HTML-safe, auto-links) -->
<!-- Template:Infobox settlement (HTML-safe, auto-links) -->
<table class="infobox infobox-character">
<table class="infobox infobox-settlement">
   <tr>
   <tr>
     <th class="infobox-title" colspan="2">{{{name|{{PAGENAME}}}}}</th>
     <th class="infobox-title" colspan="2">{{{name|{{PAGENAME}}}}}</th>
Line 7: Line 7:
   {{#if: {{{image|}}} |
   {{#if: {{{image|}}} |
   <tr>
   <tr>
     <td class="infobox-image mw-no-invert" colspan="2">
     <td class="infobox-image mw-no-invert" colspan="2">[[File:{{{image}}}|{{{imagesize|250px}}}|alt={{{image_alt|}}}|center]] {{#pageimage:{{{image}}}}} {{#if: {{{image_caption|}}} | <div class="infobox-caption">{{{image_caption}}}</div> }}</td>
      [[File:{{{image}}}|{{{imagesize|250px}}}|alt={{{image_alt|}}}|center]]
      {{#if: {{{image_caption|}}} | <div class="infobox-caption">{{{image_caption}}}</div> }}
    </td>
   </tr>
   </tr>
   }}
   }}


   {{#if: {{{race|}}} |
   {{#if: {{{type|}}} |
   <tr>
   <tr>
     <th scope="row">Race</th>
     <th scope="row">Type</th>
     <td>[[{{{race}}}]]</td>
     <td>{{{type}}}</td>
   </tr>
   </tr>
   }}
   }}


   {{#if: {{{age|}}} |
   {{#if: {{{nation|}}} |
   <tr>
   <tr>
     <th scope="row">Age</th>
     <th scope="row">Nation</th>
     <td>{{{age}}}</td>
     <td>[[{{{nation}}}]]</td>
   </tr>
   </tr>
   }}
   }}


   {{#if: {{{nationality|}}} |
   {{#if: {{{province|}}} |
   <tr>
   <tr>
     <th scope="row">Nationality</th>
     <th scope="row">Province</th>
     <td>[[{{{nationality}}}]]</td>
     <td>[[{{{province}}}]]</td>
   </tr>
   </tr>
   }}
   }}


   {{#if: {{{origin|}}} |
  <!-- In-game banner (only if provided) -->
   {{#if: {{{banner|}}} |
  <tr><th class="infobox-sub" colspan="2">In-game banner</th></tr>
   <tr>
   <tr>
     <th scope="row">Origin</th>
     <td class="infobox-image mw-no-invert" colspan="2">[[File:{{{banner}}}|{{{banner_imagesize|160px}}}|alt={{{banner_alt|}}}|center]] {{#if: {{{banner_caption|}}} | <div class="infobox-caption">{{{banner_caption}}}</div> }}</td>
    <td>[[{{{origin}}}]]</td>
   </tr>
   </tr>
   }}
   }}


   <!-- Backwards compatibility: show Origin from |settlement= if |origin= not provided -->
   <!-- Notable characters section (only if any provided) -->
   {{#if: {{{origin|}}} | | {{#if: {{{settlement|}}} |
   {{#if: {{{notable|}}}{{{notable1|}}}{{{notable2|}}}{{{notable3|}}}{{{notable4|}}}{{{notable5|}}} |
   <tr>
   <tr>
     <th scope="row">Origin</th>
     <th class="infobox-section" colspan="2">Notable characters</th>
    <td>[[{{{settlement}}}]]</td>
   </tr>
   </tr>
  }} }}
  {{#if: {{{aliases|}}} |
   <tr>
   <tr>
     <th scope="row">Aliases</th>
     <td colspan="2">
    <td>{{{aliases}}}</td>
      <ul>
        {{#if: {{{notable|}}}  | <li>{{{notable}}}</li> }}
        {{#if: {{{notable1|}}} | <li>[[{{{notable1}}}]]</li> }}
        {{#if: {{{notable2|}}} | <li>[[{{{notable2}}}]]</li> }}
        {{#if: {{{notable3|}}} | <li>[[{{{notable3}}}]]</li> }}
        {{#if: {{{notable4|}}} | <li>[[{{{notable4}}}]]</li> }}
        {{#if: {{{notable5|}}} | <li>[[{{{notable5}}}]]</li> }}
      </ul>
    </td>
   </tr>
   </tr>
   }}
   }}


  {{#if: {{{occupation|}}} |
</table>
  <tr>
    <th scope="row">Occupation</th>
    <td>{{{occupation}}}</td>
  </tr>
  }}
 
  {{#if: {{{affiliation|}}} |
  <tr>
    <th scope="row">Affiliation</th>
    <td>{{{affiliation}}}</td>
  </tr>
  }}


  {{#if: {{{status|}}} |
<includeonly>{{#ifeq:{{NAMESPACE}}| | {{#if:{{{nocat|}}}| | [[Category:Settlements]]}} }}</includeonly>
  <tr>
    <th scope="row">Status</th>
    <td>{{{status}}}</td>
  </tr>
  }}


  <!-- In-game appearance (only if provided) -->
  {{#if: {{{game_image|}}} |
  <tr><th class="infobox-sub" colspan="2">In-game appearance</th></tr>
  <tr>
    <td class="infobox-image mw-no-invert" colspan="2">
      [[File:{{{game_image}}}|{{{game_imagesize|180px}}}|alt={{{game_image_alt|}}}|center]]
      {{#if: {{{game_image_caption|}}} | <div class="infobox-caption">{{{game_image_caption}}}</div> }}
    </td>
  </tr>
  }}
</table>
<includeonly>{{#ifeq:{{NAMESPACE}}| | {{#if:{{{nocat|}}}| | [[Category:Characters]]}} }}</includeonly>
<noinclude>
<noinclude>
<templatedata>
<templatedata>
{
{
   "description": "Character infobox for Mundus (auto-links Race, Nationality, Origin). Enter page names only—no [[brackets]].",
   "description": "Settlement infobox for Mundus. Nation/Province auto-link; enter page names only (no [[brackets]]).",
   "params": {
   "params": {
     "name":        { "label": "Name", "type": "string", "example": "Irian Balewood" },
     "name":        { "label": "Name", "type": "string", "example": "Simonville" },
     "image":        { "label": "Image filename (art)", "description": "Filename only (no \"File:\" prefix).", "type": "string", "example": "IrianBalewood.png" },
     "image":        { "label": "Main image filename", "description": "Coat of arms, flag, or photo. Filename only (no \"File:\" prefix).", "type": "string", "example": "Simonville_CoA.png" },
     "imagesize":    { "label": "Image size", "type": "string", "default": "250px" },
     "imagesize":    { "label": "Main image size", "type": "string", "default": "250px" },
     "image_alt":    { "label": "Image alt text", "type": "string" },
     "image_alt":    { "label": "Main image alt text", "type": "string" },
     "image_caption":{ "label": "Image caption", "type": "string" },
     "image_caption":{ "label": "Main image caption", "type": "string" },
 
    "race":        { "label": "Race (page name only)", "type": "string",
                      "suggestedvalues": ["Humekind","Elvenkind","Landling","Netherkind"] },
 
    "age":          { "label": "Age", "type": "string", "example": "26 cycles" },


     "nationality": { "label": "Nationality (page name only)", "type": "string", "example": "Directionland" },
     "type":         { "label": "Type", "type": "string",
                      "suggestedvalues": ["Duchy","Colony","Outpost","Village","Area","Province","Special"] },


     "origin":      { "label": "Origin (page name only)", "type": "string",
     "nation":      { "label": "Nation (page name only)", "type": "string", "example": "Directionland" },
                      "example": "Simonville", "aliases": ["settlement"] },
    "province":    { "label": "Province (page name only)", "type": "string", "example": "Gandry" },


     "aliases":     { "label": "Aliases", "type": "string", "example": "Enty; The Red Wanderer" },
     "banner":           { "label": "In-game banner image filename", "type": "string", "example": "Simonville_Banner.png" },
     "occupation":   { "label": "Occupation", "type": "string", "example": "Ranger" },
     "banner_imagesize": { "label": "Banner image size", "type": "string", "default": "160px" },
     "affiliation": { "label": "Affiliation", "type": "string", "example": "Order of Simonius" },
     "banner_alt":       { "label": "Banner alt text", "type": "string" },
     "status":       { "label": "Status", "type": "string", "suggestedvalues": ["Alive","Deceased","Missing","Unknown"] },
     "banner_caption":   { "label": "Banner caption", "type": "string" },


     "game_image":       { "label": "In-game image filename", "type": "string", "example": "Irian_ingame.png" },
     "notable":     { "label": "Notable (free text; optional)", "type": "string",
     "game_imagesize":   { "label": "In-game image size", "type": "string", "default": "180px" },
                      "description": "Use for a custom first item or formatted list if you prefer." },
     "game_image_alt":   { "label": "In-game image alt text", "type": "string" },
     "notable1":     { "label": "Notable character 1 (page name)", "type": "string" },
     "game_image_caption":{ "label": "In-game image caption", "type": "string", "example": "In-game model" }
    "notable2":    { "label": "Notable character 2 (page name)", "type": "string" },
     "notable3":     { "label": "Notable character 3 (page name)", "type": "string" },
     "notable4":     { "label": "Notable character 4 (page name)", "type": "string" },
    "notable5":    { "label": "Notable character 5 (page name)", "type": "string" }
   },
   },
   "paramOrder": ["name","image","imagesize","image_alt","image_caption","race","age","nationality","origin","aliases","occupation","affiliation","status","game_image","game_imagesize","game_image_alt","game_image_caption"]
   "paramOrder": ["name","image","imagesize","image_alt","image_caption","type","nation","province","banner","banner_imagesize","banner_alt","banner_caption","notable","notable1","notable2","notable3","notable4","notable5"]
}
}
</templatedata>
</templatedata>
Line 128: Line 99:
==Usage==
==Usage==
<pre>
<pre>
{{Infobox character
{{Infobox settlement
| name           = Irian Balewood
| name     = Simonville
| image           = IrianBalewood.png
| image     = Simonville_CoA.png
| image_caption  = Irian Balewood as depicted by the Lorekeeper.
| type      = Village
| race            = Elvenkind
| nation    = Directionland
| age            = 26 cycles
| province  = Gandry
| nationality    = Directionland
| banner    = Simonville_Banner.png
| origin          = Simonville
| notable1  = Irian Balewood
| aliases        = En​​​​ty
| notable2  = Valmin Thornvalley
| occupation      = Ranger
| affiliation    = [[Order of Simonius]]
| status          = Alive
| game_image      = Irian_ingame.png
| game_image_caption = In-game model
}}
}}
</pre>
</pre>
</noinclude>
</noinclude>