Template:CrewInfobox: Difference between revisions

From LoadingReadyWiki
Jump to navigationJump to search
m Remove duplicate background-color entry, fix "Online" section not displaying when only Mastodon and/or YouTube links were provided, standardise formatting
Here's to hoping this doesn't break everything. Reworked the whole thing with automatic first video detection, hiding of table rows as well as cells, adding DB section, probably other things
Line 1: Line 1:
<div class="infobox" style="background-color:#FFFFFF; border:solid 1px #999999; width:275px; margin:auto; float:right;">
<div class="infobox" style="background-color:#FFFFFF; border:solid 1px #999999; width:274px; margin-left:1em; float:right;">
{| style="padding:2px; margin:auto; font-size:85%;" cellspacing="0"
{| style="padding:2px; margin:auto; font-size:85%; width:274px;" cellspacing="0"
|<div class="crewname" style="border:solid 5px #5282ff; background-color:#180094; color:#FFFFFF; font-size:150%; text-align:center;">'''{{{Name|{{PAGENAME}}}}}'''</div>
| style="border:solid 5px #5282ff; background-color:#180094; color:#FFFFFF; font-size:150%; text-align:center;" |'''{{{Name|{{PAGENAME}}}}}'''
|-  
|- style="text-align:center;"
|[[Image:{{{Picture|Image.jpg}}}|center|200px|{{{Name}}}]]
| [[Image:{{{Picture|Image.jpg}}}|center|200px|{{{Name|{{PAGENAME}}}}}]]<br/>{{ #if: {{{Picture|}}} | {{{PicDesc}}} | Image Needed }}
<center>{{{PicDesc|Image Needed}}}</center>
|-
|-
|{{ #if: {{{DOB|}}} | '''Date of Birth:''' {{{DOB|}}} |}}
{{ #if: {{{DOB|}}}<noinclude>show</noinclude> | {{!}} '''Date of Birth:''' {{{DOB}}}
|-
{{!-}} }}
|{{ #if: {{{Family|}}} | '''Family:''' {{{Family|}}} |}}
{{ #if: {{{Family|}}}<noinclude>show</noinclude> | {{!}} '''Family:''' {{{Family}}}
|- style="background-color:#5282ff;"
{{!-}} }} {{ #if: {{{Duties|}}}{{{RecurringCharacters|}}}{{ #ifexpr: {{ #ask: [[AppearanceBy::{{PAGENAME}}]][[Category:Videos||LRRcasts||LoadingReadyLive]]|format=count}} > 0 | show }}<noinclude>show</noinclude> | {{!-}} style="background-color:#5282ff; text-align:center;"
|<center>'''LRR'''</center>
{{!}} '''LRR'''
|-
{{!-}}
|{{ #if: {{{Duties|}}} | '''Duties:''' {{{Duties|}}} |}}
{{ #if: {{{Duties|}}}<noinclude>show</noinclude> | {{!}} '''Duties:''' {{{Duties}}}
|-
{{!-}} }}
|'''First Appearance:''' [[{{{First|}}}]] ({{#show: {{{First|}}} |?ReleaseDate}}{{#show: {{{First|}}} |?AirDate}})
{{ #ifexpr: {{ #ask: [[AppearanceBy::<includeonly>{{PAGENAME}}</includeonly><noinclude>+</noinclude>]][[Category:Videos||LRRcasts||LoadingReadyLive]]|format=count}} > 1 | {{!}} '''First Appearance:''' {{ #ask: [[AppearanceBy::<includeonly>{{PAGENAME}}</includeonly><noinclude>+</noinclude>]]|?ReleaseDate=|sort=ReleaseDate|order=asc,asc|format=list|limit=1|searchlabel=}}
|-
{{!-}}
|'''Last Appearance:''' {{ #if: {{{Appearance|}}} | {{#ask:
{{!}} '''Last Appearance:''' {{ #ask: [[AppearanceBy::<includeonly>{{PAGENAME}}</includeonly><noinclude>+</noinclude>]]|?ReleaseDate=|sort=ReleaseDate|order=desc,asc|format=list|limit=1|searchlabel=}}
[[AppearanceBy::{{{Appearance}}}]]
{{!-}} | {{!}} '''Only Appearance:''' {{ #ask: [[AppearanceBy::{{PAGENAME}}]]|?ReleaseDate=|format=list|searchlabel=}}
|?ReleaseDate=
{{!-}} }}
|sort = ReleaseDate
{{ #if: {{{RecurringCharacters|}}}<noinclude>show</noinclude> | {{!}} '''Recurring Characters:''' {{{RecurringCharacters}}}
|order=desc
{{!-}} }} }}
|format=list
{{ #if: {{{DBDuties|}}}{{ #ifexpr: {{ #ask: [[AppearanceBy::{{PAGENAME}}]][[Category:Desert Bus]]|format=count}} > 0 | show }}<noinclude>show</noinclude> | {{!-}} style="background-color:#5282ff; text-align:center;"
|limit = 1
{{!}} '''Desert Bus'''
|default=
{{!-}}
|searchlabel=
{{ #if: {{{DBDuties|}}}<noinclude>show</noinclude> | {{!}} '''Duties:''' {{{DBDuties}}}
|
{{!-}} }}
}} | {{#ask:
{{ #ifexpr: {{ #ask: [[AppearanceBy::<includeonly>{{PAGENAME}}</includeonly><noinclude>+</noinclude>]][[Category:Desert Bus]]|format=count}} > 0 | {{!}} '''First Appearance:''' {{ #ask: [[AppearanceBy::<includeonly>{{PAGENAME}}</includeonly><noinclude>+</noinclude>]][[Category:Desert Bus]]|?ReleaseDate=|sort=ReleaseDate|order=asc,asc|format=list|limit=1|searchlabel=}}
[[AppearanceBy::{{PAGENAME}}]]
{{!-}}
|?ReleaseDate=
{{!}} '''Last Appearance:''' {{ #ask: [[AppearanceBy::<includeonly>{{PAGENAME}}</includeonly><noinclude>+</noinclude>]][[Category:Desert Bus]]|?ReleaseDate=|sort=ReleaseDate|order=desc,asc|format=list|limit=1|searchlabel=}}
|sort = ReleaseDate
{{!-}} }} }}
|order=desc
{{ #if: {{{Website|}}}{{{Twitter|}}}{{{Mastodon|}}}{{{Instagram|}}}{{{Twitch|}}}{{{YouTube|}}}<noinclude>show</noinclude> | {{!-}} style="background-color:#5282ff; text-align:center;"
|format=list
{{!}} '''Online'''
|limit = 1
{{!-}}
|default=
{{ #if: {{{Website|}}}<noinclude>show</noinclude> | {{!}} '''Website:''' {{{Website}}}
|searchlabel=
{{!-}} }}
|
{{ #if: {{{Twitter|}}}<noinclude>show</noinclude> | {{!}} '''Twitter:''' {{{Twitter}}}
}} }}
{{!-}} }}
|-
{{ #if: {{{Mastodon|}}}<noinclude>show</noinclude> | {{!}} '''Mastodon:''' {{{Mastodon}}}
|{{ #if: {{{RecurringCharacters|}}} | '''Recurring Characters:''' {{{RecurringCharacters|}}} |}}
{{!-}} }}
|- style="background-color:#5282ff; {{ #if: {{{Website|}}}{{{Twitter|}}}{{{Twitch|}}}{{{Mastodon|}}}{{{YouTube|}}} || display: none }}"
{{ #if: {{{Instagram|}}}<noinclude>show</noinclude> | {{!}} '''Instagram:''' {{{Instagram}}}
|<center>'''Online'''</center>
{{!-}} }}
|-
{{ #if: {{{Twitch|}}}<noinclude>show</noinclude> | {{!}} '''Twitch:''' {{{Twitch}}}
|{{ #if: {{{Website|}}} | '''Website:''' {{{Website|}}} |}}
{{!-}} }}
|-
{{ #if: {{{YouTube|}}}<noinclude>show</noinclude> | {{!}} '''YouTube:''' {{{YouTube}}}
|{{ #if: {{{Twitter|}}} | '''Twitter:''' {{{Twitter|}}} |}}
{{!-}} }} }}
|-
|{{ #if: {{{Twitch|}}} | '''Twitch:''' {{{Twitch|}}} |}}
|-
|{{ #if: {{{Mastodon|}}} | '''Mastodon:''' {{{Mastodon|}}} |}}
|-
|{{ #if: {{{YouTube|}}} | '''YouTube:''' {{{YouTube|}}} |}}
|}
|}
</div>
</div>
{{ #if: {{{Picture|}}} || <includeonly>[[Category:Pages Needing Images]]</includeonly> }}
 
<noinclude><center>This template should be linked just above the first paragraph on pages that represent [[:Category:People|people]] (or [[:Category:Puppets|puppets]], see [[#Further Categories|the last section]]).</center>
<!-- The space at the beginning of the following line is what makes this a code box - it's not a typo! -->
<nowiki>{{CrewInfobox
|Name=
|Picture=
|PicDesc=
|DOB=
|Family=
|Duties=
|RecurringCharacters=
|DBDuties=
|Website=
|Twitter=
|Mastodon=
|Instagram=
|Twitch=
|YouTube=
}}</nowiki>
 
This template automatically hides elements and even whole sections if you leave parameters blank or omit them entirely, so do not provide placeholder values.
It has also now been updated to automatically identify not just the latest appearance but the first one too, so the <code>First</code> and <code>Appearance</code> parameters are no longer required.
__NOTOC__
== General Parameters ==
* <code>Name</code> should only be provided with a value if you want to use something other than the page title.
* <code>Picture</code> should be a filename for an image of the person. If not provided then the placeholder image will be used instead, and <code>PicDesc</code> will be ignored and replaced with "Image Needed".
* <code>PicDesc</code> can be provided to add a caption below the image.
* <code>DOB</code> is the date of birth in "Month Day, Year" format. You don't have to provide all of these if they are not known.
* <code>Family</code> is mainly for the purposes of listing related pages in the format "Name (relation)".
 
== LRR Properties ==
* <code>Duties</code> - The subject's duties at LRR. If provided, the page is added to the [[:Category:Crew|Crew]] category.
* <code>RecurringCharacters</code> - Names of, or links to pages for, characters this person regularly plays.
 
== Desert Bus Properties ==
* <code>DBDuties</code> - The subject's duties at Desert Bus. If provided, the page is added to the [[:Category:Desert Bus Volunteers|Desert Bus Volunteers]] category.
 
== Social Medias ==
Each parameter should be a link to the social media page in question, with the name set to their handle on that platform.
 
== Further Categories ==
All pages are added to the [[:Category:People|People]] category, unless you provide a non-blank value for <code>isPuppet</code>, in which case the page will be added to the [[:Category:Puppets|Puppets]] category instead.</noinclude>
 
{{ #if: {{{Picture|}}} || <includeonly>[[Category:Pages Needing Images]]</includeonly> }}{{ #if: {{{Duties|}}} || <includeonly>[[Category:Crew]]</includeonly> }}{{ #if: {{{DBDuties|}}} || <includeonly>[[Category:Desert Bus Volunteers]]</includeonly> }}{{ #if: {{{isPuppet|}}} | <includeonly>[[Category:Puppets]]</includeonly> | <includeonly>[[Category:People]]</includeonly> }}

Revision as of 00:28, 29 September 2019

CrewInfobox
CrewInfobox
CrewInfobox

Image Needed
Date of Birth: {{{DOB}}}
Family: {{{Family}}}
LRR
Duties: {{{Duties}}}
First Appearance: A Brief History of Lame (24 October 2003)
Last Appearance: The Long Game - Archipelago - Session 02 (26 November 2026)
Recurring Characters: {{{RecurringCharacters}}}
Desert Bus
Duties: {{{DBDuties}}}
First Appearance: Desert Bus for Hope 1 (22 November 2007)
Last Appearance: Desert Bus for Hope 2026 (23 October 2026)
Online
Website: {{{Website}}}
Twitter: {{{Twitter}}}
Mastodon: {{{Mastodon}}}
Instagram: {{{Instagram}}}
Twitch: {{{Twitch}}}
YouTube: {{{YouTube}}}
This template should be linked just above the first paragraph on pages that represent people (or puppets, see the last section).
{{CrewInfobox
|Name=
|Picture=
|PicDesc=
|DOB=
|Family=
|Duties=
|RecurringCharacters=
|DBDuties=
|Website=
|Twitter=
|Mastodon=
|Instagram=
|Twitch=
|YouTube=
}}

This template automatically hides elements and even whole sections if you leave parameters blank or omit them entirely, so do not provide placeholder values. It has also now been updated to automatically identify not just the latest appearance but the first one too, so the First and Appearance parameters are no longer required.

General Parameters

  • Name should only be provided with a value if you want to use something other than the page title.
  • Picture should be a filename for an image of the person. If not provided then the placeholder image will be used instead, and PicDesc will be ignored and replaced with "Image Needed".
  • PicDesc can be provided to add a caption below the image.
  • DOB is the date of birth in "Month Day, Year" format. You don't have to provide all of these if they are not known.
  • Family is mainly for the purposes of listing related pages in the format "Name (relation)".

LRR Properties

  • Duties - The subject's duties at LRR. If provided, the page is added to the Crew category.
  • RecurringCharacters - Names of, or links to pages for, characters this person regularly plays.

Desert Bus Properties

  • DBDuties - The subject's duties at Desert Bus. If provided, the page is added to the Desert Bus Volunteers category.

Social Medias

Each parameter should be a link to the social media page in question, with the name set to their handle on that platform.

Further Categories

All pages are added to the People category, unless you provide a non-blank value for isPuppet, in which case the page will be added to the Puppets category instead.