Template:Pagecover/doc: Difference between revisions

m
1 revision imported
sims>LostInRiverview
mNo edit summary
m (1 revision imported)
 
(16 intermediate revisions by 5 users not shown)
Line 7:
 
;Code
The fullfollowing is the ''basic code'' of the template, isincluding providedits here,most forcommon easyuses. Simply copy-and-paste: this code onto the page and fill in the parameters to use it.
<code><pre>
{{Pagecover
|image = =
|name pagetype =
|pagetypesubtitle =
|subtitleheight =
|widthoffset =
|toc generation =
|
}}
</pre></code>
 
 
;Parameters and functions
The following is the ''"noname"'' version of the template, with the title box removed so that the template only displays an image. This code can be used to add a pagecover without a title, and only relevant parameters have been included here.
* ''<Image> · Mandatory'' - The image selected should be close to, if not as large as, 670px (width) by 300px (height). Images smaller than 670 x 300px are stretched to fit, and images larger than 670 x 300px are cropped. The maximum height of the image may need to be adjusted if large amounts of text are included in the Subtitle parameter.
 
* <Name> · Optional - The name shown on the title line of the cover can be changed by filling in this parameter. If the parameter is left empty, the name used defaults to the name of the page the template is used on.
<code><pre>
* <pagetype> · Optional - This text appears right-aligned on the top level of the cover, to the left of any game icons (see below). This field can be filled in to describe the type of article the cover is being used on. If left blank, nothing will appear for this parameter.
{{Pagecover
* <subtitle> · Optional - This text appears directly below the title line. The text is a larger font size than the text used for <pagetype>.
|image =
* <width> · Optional - The horizontal width of the template (in pixels) can be set with this parameter. By default, the normal width is 670px.
|noname = yes
* <toc> · Optional - This parameter can be used to create a right-aligned table of contents on the page. By default, the table of contents is left-aligned (note that this has changed from earlier versions of the template - see the change log for details).
|width =
|height =
|offset =
|generation =
|backgroundcolor =
}}
</pre></code>
 
 
The following is the ''full code'' for the template, excluding <noname>. The full code may be useful in limited circumstances but most of the time all the parameters aren't needed at the same time. Simply copy-and-paste this code to use it on a page.
 
<code><pre>
{{Pagecover
|image =
|name =
|pagetype =
|subtitle =
|width =
|height =
|offset =
|toc =
|generation =
|backgroundcolor =
|align =
|
}}
</pre></code>
 
;Mandatory parameter
* ''<Imageimage> · Mandatory'' - The image selected should be close to, if not as large as, 670px690px (width) by 300px (height). Images smaller than 670690 x 300px are stretched to fit, and images larger than 670690 x 300px are cropped. The maximum height of the image may need to be adjusted if large amounts of text are included in the Subtitle parameter.
 
;Useful parameters
These parameters aren't necessary for the template to be useable, but they increase its usefulness. These parameters are frequently used when the template is added to a page.
 
* <pagetype> · Optional - This text appears right-aligned on the top level of the cover, to the left of any game icons (see below). This field can be filled in to describe the type of article the cover is being used on. If left blank, nothing will appear for this parameter.
* <subtitle> · Optional - This text appears directly below the title line. The text is a larger font size than the text used for <pagetype>.
* <height> - The vertical width of the template (in pixels) can be set with this parameter. Note that changing this setting will not change the size of the image used in the template, so if the height is set too large there may be empty space at the bottom of the template. Height is set to 300px by default.
* <offset> - The image used within the template can be moved "up" by filling this parameter (in pixels). Use the preview button to check the offset before publishing, as setting the offset too high might show an empty space below the image. There is no offset by default.
* <generation> - This parameter colors the template background based on the generation specified. Currently, Gens 1 - 4 (The Sims through The Sims 4) are included; "TS#" or "The Sims #" (e.g. TS2, The Sims 3) will complete this parameter. If not specified, the template will default to a gray color.
* <backgroundcolor> - If the article in question is not part of an easily-defined game generation, a custom color can be added to the text box instead. '''note:''' the background color will override the generation color, if one is chosen.
* <noname> - If this parameter is filled with any non-empty characters, the gray text box and all text included in it will not be displayed. You can use this parameter to display a large image box without the text on top of it. ''Note that filling this parameter makes all other parameters redundant except <image>, <height>, <width>, <offset>, <generation>, and <toc>.''
 
Additionally, if the template is being used on a page for game features that span multiple titles, game icons can be included, by appending the appropriate vgcode (as found in [[Template:Era]]) to the template. This parameter does not have a name. Presently the template can accommodate up to eight icons.
 
;Additional parameters
The template can be further customized on a case-by-case basis by using the following parameters. These parameters may not be needed under every circumstance.
 
* <Namename> · Optional - The name shown on the title line of the cover can be changed by filling in this parameter. If the parameter is left empty, the name used defaults to the name of the page the template is used on.
* <width> · Optional - The horizontal width of the template (in pixels) can be set with this parameter. Setting this parameter also changes the size of the image used in the template. By default, the normal width is 670px690px.
* <toc> · Optional - This parameter can be used to create a right-aligned table of contents on the page. By default, the table of contents is left-aligned (note that this has changed from earlier versions of the template - see the change log for details).
* <align> - This parameter determines how the "text box" on the template will be aligned. The box is right-aligned by default; acceptable parameters are 'right', 'left', 'center' or 'centre'.
 
;Samples
<code><pre>
{{Pagecover
|image = Riverview12.jpg
|pagetype = Neighborhood
|name = Riverview
|generation = TS3
|subtitle = Along the banks of the Simomon River lies the sleepy town of Riverview. Many have moved to this serene little town to escape the clamor of city life. Will the current residents let the newcomers in on the town’s little secrets or will they do their best to keep their dirt from being unearthed?
|TS3}}
Line 44 ⟶ 94:
|pagetype=Neighborhood
|name=Riverview
|generation=TS3
|subtitle=Along the banks of the Simomon River lies the sleepy town of Riverview. Many have moved to this serene little town to escape the clamor of city life. Will the current residents let the newcomers in on the town’s little secrets or will they do their best to keep their dirt from being unearthed?
|TS3}}
Line 50 ⟶ 101:
{{Pagecover
|name = Alien abduction
|image = Alien_Abduction_In_The_Sims_3Alien_Abduction_In_The_Sims_4.jpgpng
|pagetype = In-game event
|TS1|BO|TS2|TS2C|TS3S|TS4GTW}}
</pre></code>
...produces:
{{Pagecover
|name=Alien abduction
|image=Alien_Abduction_In_The_Sims_4.png
|image=Alien_Abduction_In_The_Sims_3.jpg
|pagetype=In-game event
|TS1TSLL|BO|TS2|TS2C|TS3S|TS4GTW}}
;Guidelines
;Attribution and Credit
This template is versatile and can be customized on a case-by-case basis. However, it is not useful in all circumstances. When considering whether or not to add this template to a page, consider the following:
This template is based off of a series of templates from the [[w:c:arresteddevelopment|''Arrested Development Wiki'']], including: [[w:c:arresteddevelopment:Template:Appearances]], [[w:c:arresteddevelopment:Template:NewCharacter]], and others of a similar design. Revision histories for each of those templates is available on the Arrested Development wiki.
#This template requires a ''large, high-quality'' image. Small images will be stretched and distorted and will not look good, and low-quality images will be displayed prominently, which is not ideal. Even if other pages of the same "type" have a pagecover, it may not be practical to add a pagecover to an article if an adequate image doesn't exist.
#The height of the image shown in the cover is directly proportional to the width set in the parameters. This is a fundamental trait for the template to display correctly, so editors planning to add a pagecover will need to work around this. To do this, the parameters <height> and <offset> can be used to change the vertical size of the cover itself (while not changing the image size), and to adjust whether the image is moved up or down within the cover.
#Articles should almost never have more than one pagecover. The page cover should almost always be at the very top of the article, above all templated messages, infobox and content. Articles with pagecover should not use {{t|Era}} icons. Era icons can be displayed on the pagecover by including the appropriate game abbreviations to a blank parameter at the end of the template.
#Pagecovers are not used on articles about canon Sims or families, for stylistic purposes. Pagecovers can be used within the fanon namespace freely.
 
;Change log (to track major changes to this template)
* 4 April 2013 - Template created
* 25 July 2013 - Template can now have a variable (left/right) width. Template also no longer applies right-aligned table of contents, but can be made to display a right-aligned toc if the <toc> templateparameter contains 'right'.
* 22 August 2013 - Fixed a bug where the cover image would re-size incorrectly if a non-default width is used. Images should now "scale" properly in these cases, but it may affect previous uses of the template with non-default widths.
* 13 February 2014 - Added <offset> and <height> parameters. Offset will move an image "up" within the template itself, while height adjusts the vertical size of the template. Note that adjusting the height will not adjust the size of the image.
* 20 December 2014 - Added <noname> parameter. When filled with a non-empty character, parameter will remove the gray text box from in front of the image, allowing a display of the image and bounding box alone.
* 10 April 2015 - Template updated to match the new wiki-wide theme. Three new parameters were added; <generation>, <backgroundcolor> and <align>.
 
;Attribution and Credit
This template is originally based off of a series of templates from the [[w:c:arresteddevelopment|''Arrested Development Wiki'']], including: [[w:c:arresteddevelopment:Template:Appearances]], [[w:c:arresteddevelopment:Template:NewCharacter]], and others of a similar design. Revision histories for each of those templates is available on the Arrested Development wiki. The original source template has been modified and adapted to [[w:c:Sims|''The Sims Wiki'']]; the template's revision history and list of contributors is available [http://sims.wikia.com/wiki/Template:Pagecover?action=history here].
 
''The text of this template is licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-ShareAlike 3.0 (CC-by-SA)] license. Please review the CC-by-SA license text for more information.''
<noinclude>[[Category:Template documentation]]</noinclude>