Sitenotice: 11/29/2018: The wiki is back. It turns out, some anti-virus product on my web server had an issue with the latest version of PHP. My server techs have resolved this issue, and things should be working again. During the investigation, I did restore to a backup from September. There is a chance that any changes done since then were lost, but I do not recall any edits. --OS-9 Al

8/30/2016: Massive re-work is being done on the InfoBox Templates. Read that page to keep up with the plan for that, and adding better keyword tags (categories) to all the pages. --OS-9 Al (talk) 15:28, 31 August 2016 (CDT)

Difference between revisions of "Template:InfoBoxTest"

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to: navigation, search
Line 1: Line 1:
Passed in: {{{boxtype}}}
+
<noinclude>This template currently generates the master InfoBox. It is able to create many different types of InfoBoxes.
  
{{#switch: foo | foo = Foo | baz = Baz | Bar }}
+
The only thing unique about the different types of InfoBoxes will be the categories they include, and which fields will be required. i.e., for a software release, we require "year" to know when it came out, but "endyear" makes no sense. For a convention or publication, we might want to require "endyear".
  
{{#switch: {{{boxtype}}} | Convention = Foo | baz = Baz | Bar }}
+
'''boxtype''' is being implemented. It will allow this generic InfoBox to enforce required fields for the different InfoBox types. Thus, if you generate a Publication box, it will display "MISSING END YEAR" if the end year is not entered, and tag the page with "Missing End Year" so all pages that need that can be easily located.
  
{{#switch: {{{boxtype}}} | Publication = Foo | baz = Baz | Bar }}
+
Please do not edit this InfoBox template.
 +
== Usage ==
 +
The parameters you pass in depend on the '''boxtype''' you specify. Some are used by multiple box types, and others are specific to only one. When this is complete, I will revise this help screen to better explain how to use all of this, and it will be really simple.
 +
<pre>{{InfoBox |
 +
| boxtype   = Company, Convention, Hardware, Person, Publication or Software
 +
<!-- All -->
 +
| name      = (else PAGENAME is used)
 +
| photo      = (else PAGENAME.jpg is used)
 +
| caption    = (optional) photo caption or ALT tag
 +
| date      = (optional) Month XX
 +
| year      = #### year released
 +
| notes      = short description
 +
| infosource = where did this information come from
  
{{#switch:{{{{boxtype}}}}
+
<!-- Company, Convention, Publication -->
| Convention
+
| enddate    = (optional)
| Publication =
+
| endyear    =  
| Convention or Publication was chosen
+
 
| DEFAULT
+
<!-- Company, Convention, Person, Publication -->
}}
+
| location  =
  
And test 2:
+
<!-- Hardware -->
 +
| interface  =
  
{{#switch: Convention
+
<!-- Publication -->
| Convention = Was convention
+
| alibris    =
| Publication = Was publication
+
| format    =  
| Convention or Publication was chosen
+
| isbn      =
| DEFAULT
+
| isbn-13    =  
}}
+
| language  =
 +
| pages      =
 +
| volume    =
  
And test 3:
+
<!-- Publication and Software -->
 +
| publisher  =
  
{{#switch: Publication
+
<!-- Software -->
| Convention = Was convention
+
| author    =
| Publication = Was publication
+
| media      = Disk, Tape, ROM-Pak
| DEFAULT
+
| memory    = ##K
 +
| os        = OS-9. CB, ECB, DECB (or RS-DOS?)
 +
| platform  = CoCo 1, CoCo 2, CoCo1/2, or CoCo 3
 +
| requires  =
 +
| videomode  = 32 Text, PMODE 4, 320x250x16, etc.
 +
}}</pre>
 +
</noinclude><includeonly><onlyinclude><!-- START of InfoBox -->{| class="wikitable" style="float:right;" width="300px"
 +
<!-- Heading -->
 +
|+ {{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}
 +
|-
 +
<!-- Common -->
 +
| colspan="2" align="center" |
 +
{{#if: {{{photo|}}} | [[File:{{{photo}}}|300px]] | MISSING PHOTO [[Category: Missing Photo]]}}
 +
<!-- TODO: Caption -->
 +
|-
 +
! scope="row" {{!}} Name
 +
| {{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}
 +
|-
 +
{{#if: {{{date|}}} |
 +
! scope="row" {{!}} Date
 +
{{!}} {{{date}}} [[Category: {{{date}}}]]
 +
{{!}}-
 +
}} <!-- end of if(date) -->
 +
! scope="row" {{!}} Year
 +
| {{#if: {{{year|}}} | {{{year}}} [[Category: {{{year}}}]] | DATE NEEDED [[Category: Missing Year]]}}
 +
|-
 +
<!-- For Conventions and Publications, we require End Year and Location -->
 +
{{#switch:{{{boxtype}}}
 +
| Company
 +
| Convention
 +
| Publication =
 +
{{#if: {{{enddate|}}} |
 +
! scope="row" {{!}} End Date
 +
{{!}} {{{enddate}}} [[Category: {{{enddate}}}]]
 +
{{!}}-
 +
! scope="row" {{!}} End Year
 +
{{!}} {{#if: {{{endyear|}}} | {{{endyear}}} [[Category: {{{endyear}}}]] | YEAR NEEDED [[Category: Missing End Year]]}}
 +
{{!}}-
 +
}}
 +
}} <!-- end of switch(boxtype) -->
 +
<!-- For Company, Convention, Publication and Person, we require Location -->
 +
{{#switch:{{{boxtype}}}
 +
| Company
 +
| Convention
 +
| Person
 +
| Publication =
 +
! scope="row" {{!}} Location
 +
{{!}} {{#if: {{{location|}}} | {{{location}}} [[Category: {{{location}}}]] | LOCATION NEEDED [[Category: Missing Location]]}}
 +
{{!}}-
 
}}
 
}}
 +
<!-- For Hardware, we require Interface -->
 +
{{#ifeq: {{{boxtype}}} | Hardware |
 +
! scope="row" {{!}} Interface
 +
{{!}} {{#if: {{{interface|}}} | {{{interface}}} [[Category: {{{interface}}}]] | INTERFACE NEEDED [[Category: Missing Interface Year]]}}
 +
{{!}}-
 +
}} <!-- end of ifeq(Hardware) -->
 +
<!-- Software -->
 +
{{#ifeq: {{{boxtype}}} | Software |
 +
! scope="row" {{!}} Author(s)
 +
{{!}} {{#if: {{{author|}}} | {{{author}}} | AUTHOR(S) NEEDED [[Category: Missing Author]]}}
 +
{{!}}-
 +
! scope="row" {{!}} Media
 +
{{!}} {{#if: {{{media|}}} | {{{media}}} [[Category: {{{media}}}]] | MEDIA NEEDED [[Category: Missing Media]]}}
 +
{{!}}-
 +
! scope="row" {{!}} Memory
 +
{{!}} {{#if: {{{memory|}}} | {{{memory}}} [[Category: {{{memory}}}]] | MEMORY NEEDED [[Category: Missing Memory]]}}
 +
{{!}}-
 +
! scope="row" {{!}} O.S.
 +
{{!}} {{#if: {{{os|}}} | {{{os}}} [[Category: {{{os}}}]] | O.S. NEEDED [[Category: Missing O.S.]]}}
 +
{{!}}-
 +
! scope="row" {{!}} Platform
 +
{{!}} {{#if: {{{platform|}}} | {{{platform}}} [[Category: {{{platform}}}]] | PLATFORM NEEDED [[Category: Missing Platform]]}}
 +
{{!}}-
 +
! scope="row" {{!}} Publisher
 +
{{!}} {{#if: {{{publisher|}}} | {{{publisher}}} [[Category: {{{publisher}}}]] | PUBLISHER NEEDED [[Category: Missing Publisher]]}}
 +
{{!}}-
 +
! scope="row" {{!}} Requires
 +
{{!}} {{#if: {{{requires|}}} | {{{requires}}} | REQUIREMENTS NEEDED [[Category: Missing Requirements]]}}
 +
{{!}}-
 +
! scope="row" {{!}} Video Mode
 +
{{!}} {{#if: {{{videomode|}}} | {{{videomode}}} [[Category: {{{videomode}}}]] | VIDEO MODE NEEDED [[Category: Missing Video Mode]]}}
 +
{{!}}-
 +
}} <!-- end of ifeq(Software) -->
 +
<!-- Common -->
 +
! scope="row" {{!}} Notes
 +
| {{#if: {{{notes|}}} | {{{notes}}} | NOTES NEEDED [[Category: Missing Notes]]}}
 +
|-
 +
! scope="row" {{!}} Info Source
 +
| {{#if: {{{infosource|}}} | {{{infosource}}} | INFO SOURCE NEEDED [[Category: Missing Info Source]]}}
 +
|-
 +
! scope="row" {{!}} Tags
 +
| {{#if: {{{tags|}}} | {{Tags|{{{tags}}}}} | TAGS NEEDED [[Category: Missing Tags]]}}
 +
|-
 +
| colspan="2" align="center" | <small>[[About the {{#if: {{{boxtype|}}} | {{{boxtype}}} }} Info Box]]</small>
 +
|}
 +
{{#if: {{{format|}}} | [[Category: INFOBOX FORMAT UPDATE NEEDED]]}}<!-- For old pages that just defined "date", but do not have "year", flag them. -->{{#if: {{{date|}}} | {{#if: {{{year|}}} | | [[Category: INFOBOX DATE UPDATE NEEDED]]}} }}</includeonly></onlyinclude>

Revision as of 12:40, 2 September 2016

This template currently generates the master InfoBox. It is able to create many different types of InfoBoxes.

The only thing unique about the different types of InfoBoxes will be the categories they include, and which fields will be required. i.e., for a software release, we require "year" to know when it came out, but "endyear" makes no sense. For a convention or publication, we might want to require "endyear".

boxtype is being implemented. It will allow this generic InfoBox to enforce required fields for the different InfoBox types. Thus, if you generate a Publication box, it will display "MISSING END YEAR" if the end year is not entered, and tag the page with "Missing End Year" so all pages that need that can be easily located.

Please do not edit this InfoBox template.

Usage

The parameters you pass in depend on the boxtype you specify. Some are used by multiple box types, and others are specific to only one. When this is complete, I will revise this help screen to better explain how to use all of this, and it will be really simple.

{{InfoBox |
| boxtype    = Company, Convention, Hardware, Person, Publication or Software
<!-- All -->
| name       = (else PAGENAME is used)
| photo      = (else PAGENAME.jpg is used)
| caption    = (optional) photo caption or ALT tag
| date       = (optional) Month XX
| year       = #### year released
| notes      = short description
| infosource = where did this information come from

<!-- Company, Convention, Publication -->
| enddate    = (optional)
| endyear    = 

<!-- Company, Convention, Person, Publication -->
| location   = 

<!-- Hardware -->
| interface  = 

<!-- Publication -->
| alibris    = 
| format     = 
| isbn       = 
| isbn-13    = 
| language   = 
| pages      = 
| volume     = 

<!-- Publication and Software -->
| publisher  = 

<!-- Software -->
| author     = 
| media      = Disk, Tape, ROM-Pak
| memory     = ##K
| os         = OS-9. CB, ECB, DECB (or RS-DOS?)
| platform   = CoCo 1, CoCo 2, CoCo1/2, or CoCo 3
| requires   = 
| videomode  = 32 Text, PMODE 4, 320x250x16, etc.
}}