Template:Software/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Cleaned up the docs.)
Line 5: Line 5:


{{tl|Software}} is the template that underlies the icon templates. It has 8 main parameters:
{{tl|Software}} is the template that underlies the icon templates. It has 8 main parameters:
*{{Param}} – the way the icon will be displayed.
{| width="100%" class="unsortable" style="overflow: hidden; border-radius:.4em; border:2px solid #525252"
** Do not enter this value if you need a regular icon.
|- bgcolor="#3A3A3A" style="white-space:nowrap"
** Enter 1 to get the name of the game/software with a link to an article about the game/software. Add {{code|.bold}} after the number to make the text bold.
! style="background-color:#4f5559; color:#FFF; width:2%" | {{Dictionary/common|Param}}
*** {{param|1|1}} ► {{hl2|1}}
! style="background-color:#4f5559; color:#FFF; width:16%" | {{Dictionary/common|Desc}}
*** {{param|1|1.bold}} ► {{hl2|1.bold}}
! style="text-align:center" style="background-color:#4f5559; color:#FFF; width:12%" | Value & {{Dictionary/common|Previews}}
** Enter 2 to get the icon and the name after it. Add {{code|.bold}} after the number to make the text bold.
|-
*** {{param|1|2}} ► {{hl2|2}}
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|1}}}}
*** {{param|1|2.bold}} ► {{hl2|2.bold}}
| bgcolor="#3A3A3A" | The way the icon will be displayed. Displays the icon only when not specified.
** Enter 3 to get the same as in the case of the number 1, but with an additional design with colored text.Add {{code|-darker}} after the number to make the background darker to make the text and icon more visible on light background).
| bgcolor="#3A3A3A" |
*** {{param|1|3}} ► {{hl2|3}}
{{param|1}} ► {{hl2}} (without specifying numbers)<br>
*** {{param|1|3-darker}} ► {{hl2|3-darker}}
{{param|1|1}} ► {{hl2|1}}<br>
** Enter 4 to get the same as in the case of the number 2, but with an additional design with colored text. Add {{code|-darker}} after the number to make the background darker to make the text and icon more visible on light background).
{{param|1|1.bold}} ► {{hl2|1.bold}}<br>
*** {{param|1|4}} ► {{hl2|4}}
{{param|1|2}} ► {{hl2|2}}<br>
*** {{param|1|4-darker}} ► {{hl2|4-darker}}
{{param|1|2.bold}} ► {{hl2|2.bold}}<br>
** Enter 3.1 or 4.1 will get the same effect as above, but without the shadow behind the text and icon.
{{param|1|3}} ► {{hl2|3}}<br>
*** {{param|1|3.1}} ► {{hl2|3.1}}
{{param|1|4}} ► {{hl2|4}}<br>
*** {{param|1|4.1}} ► {{hl2|4.1}}
{{ExpandBox|title=Click "Expand" to see more|
** Enter 3.2 or 4.2 will get the same effect as above, but with different drop shadow effect.
{{param|1|3-darker}} ► {{hl2|3-darker}}<br>
*** {{param|1|3.2}} ► {{hl2|3.2}}
{{param|1|3.1}} ► {{hl2|3.1}}<br>
*** {{param|1|4.2}} ► {{hl2|4.2}}
{{param|1|3.2}} ► {{hl2|3.2}}<br>
** Enter "col" (without quotes) to get the color of the game. This is mainly needed for other templates.
{{param|1|4-darker}} ► {{hl2|4-darker}}<br>
** Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "(also in <game icon>)".
{{param|1|4.1}} ► {{hl2|4.1}}<br>
{{Note|<nowiki>however, the {{{1}}} parameter cannot be touched, it should always be "{{{1}}}" in the icon templates!</nowiki>}}
{{param|1|4.2}} ► {{hl2|4.2}}<br>
}}
Enter "col" (without quotes) to get the text color of the game/software.
Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "{{also|{{hl2}}}}".
{{Note|<nowiki>However, the {{{1}}} parameter cannot be touched, it should always be "{{{1}}}" in the icon templates!</nowiki>}}
{{Note|Colored text should be used when appropriate, otherwise it would clutter the page.}}
{{Note|Colored text should be used when appropriate, otherwise it would clutter the page.}}
*{{Param|ico}} – the name of the icon is written here, but only the name itself, without "File:" and square brackets. Recommended name (not required): {{code|file:hl2 icon.png}} for {{t|hl2}}
|-
* {{Param|ico size}} - width of the icon. Should be {{mono|16px}} for most icons, unless it's double, like {{hls}}, in which case it should be {{mono|32px}}, or more. Experimentation may be necessary for non-square icons.
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|name}}}}
| bgcolor="#3A3A3A" | Simply display the name. However this param is also used to add the abbreviation of the game for example (when you create/edit this template).<br>{{Note|it is strongly recommended to write the abbreviation of the game in the parameter {{Param|name0}}, {{Param|name1}}, etc... or {{Param|nameiPadOS}} (if supported, in templates such as {{t|iOS}}.}}
| bgcolor="#3A3A3A" | {{hl2|name}}
|-
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|bold}}}}
| bgcolor="#3A3A3A" | Same as above, with bold text.
| bgcolor="#3A3A3A" | {{hl2|bold}}
|-
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|ico}}}}
| bgcolor="#3A3A3A" | The name of the icon is written here, but only the name itself, without "File:" and square brackets.<br>This same param is also used to display the icon you have specified when you create a new {{T|Software}} template. If the icon doesn't exist, it simply shows red link.
| bgcolor="#3A3A3A" | {{hl2|ico}}
|-
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|ico size}}}}
| bgcolor="#3A3A3A" | Width of the icon. Should be {{mono|16px}} for most icons, unless it's double, like {{hls}}, in which case it should be {{mono|32px}}, or more. Experimentation may be necessary for non-square icons.
{{tip|The software icon should be scaled to be in-line with the text size (using {{mono|{{param|ico size}}}}). While this is nominally "16 pixels tall", high-DPI displays (particulary such as Apple Retina display, or 4K+ displays) will benefit from the file being higher resolutions; 32 or 64 pixels tall is generally sufficient, although any resolution can be used (MediaWiki will downscale the image automatically and only deliver the necessary resolution).}}
{{tip|The software icon should be scaled to be in-line with the text size (using {{mono|{{param|ico size}}}}). While this is nominally "16 pixels tall", high-DPI displays (particulary such as Apple Retina display, or 4K+ displays) will benefit from the file being higher resolutions; 32 or 64 pixels tall is generally sufficient, although any resolution can be used (MediaWiki will downscale the image automatically and only deliver the necessary resolution).}}
*{{Param|link}} – link to the article, External links do not work. If not used, the link will use the {{Param|name}} parameter.<br>Write without the brackets. Underscores and spaces are interchangeable.
| bgcolor="#3A3A3A" | N/A
{{tip|For Wikipedia links, prepend "Wikipedia:" to the page name (ex: [[Wikipedia:Gabe Newell]]). For external links, use {{t|software external}} and add {{param|is outlink}}.}}
|-
*{{Param|name}} – Display name.
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|col}}}}
* {{param|bold|bold}} ► {{hl2|bold}} – Display name with bold text.
| bgcolor="#3A3A3A" | The color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: <span style="color:#ADD8E6;font-weight:bold">#ADD8E6</span>.<br> It's highly recommended that you use brighter color for better readability with dark/black pages, but not too bright or over-saturated.
{{Note|it is strongly recommended to write the abbreviation of the game in the parameter {{Param|name0}}, {{Param|name1}}, etc... or {{Param|nameiPadOS}} (if supported, in templates such as {{t|iOS}}.}}
| bgcolor="#3A3A3A" | {{hl2|col}}
*{{Param|col}} – the color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: <span style="color:#ADD8E6;font-weight:bold">#ADD8E6</span>.<br> It's highly recommended that you use brighter color for better readability with dark/black pages, but not too bright or over-saturated.
|-
*{{Param|addtext}} – additional text that will be written immediately after the icon. It is mainly needed to add other icons.
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|link}}}}
{{Note|Make sure to include {{Code|<nowiki>| addtext = {{{addtext|}}}</nowiki> }} in the icon templates!}}
| bgcolor="#3A3A3A" | Link to the article, if not specified, the link will use the {{Param|name}} parameter.<br>Write without the brackets. Underscores and spaces are interchangeable.
*{{Param|nt}} – this parameter will be used in the {{Param|name<number>}} parameter, some may also have {{Param|name<text>}}, such as {{t|iOS}} and {{t|Mac}}.
{{tip|For Wikipedia links, prepend "WP:" (short for Wikipedia) to the page name (ex: [[WP:Gabe Newell]], or [[Wikipedia:Gabe Newell]]) For external links, use {{t|software external}} and add {{param|is outlink}}.}}
{{Note|Make sure that the {{Code|<nowiki> | nt = {{{nt|}}}</nowiki>}} part must be included on the icon templates for it to work!}}
| bgcolor="#3A3A3A" | N/A
|-
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|addtext}}}}
| bgcolor="#3A3A3A" | Additional text that will be written immediately after the icon. It is mainly needed to add other icons.<br>{{Note|Make sure to include {{Code|<nowiki>| addtext = {{{addtext|}}}</nowiki> }} in the icon templates!}}
| bgcolor="#3A3A3A" | {{code|<nowiki>{{hl2|4|addtext=®}}</nowiki>}} ► {{hl2|4|addtext=®}}
|-
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|nt}}}}
| bgcolor="#3A3A3A" | This parameter will be used in the {{Param|name<number>}} parameter, some software templates may also have {{Param|name<text>}}, such as {{t|iOS}} and {{t|Mac}}.
{{Note|Make sure that the {{Code|<nowiki> | nt = {{{nt|}}}</nowiki>}} part must be included on the icon templates for it to work! This parameters requires text to be displayed using {{Param|1}} to use.}}
| bgcolor="#3A3A3A" | {{hl2|4|nt=0}}
|-
|}
 
=== Result & Copy and Paste ===
=== Result & Copy and Paste ===
In the end, you should get something like this:
In the end, you should get something like this:

Revision as of 09:13, 24 June 2024

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Edit-copy.png
This is a documentation subpage for Template:Software.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Todo: Replace the complicated =suf method translations with /strings and {{autolang}} + {{uselangflags}} one instead.

{{Software}} is the template that underlies the icon templates. It has 8 main parameters:

Parameter Description Value & Previews
{{{1}}} The way the icon will be displayed. Displays the icon only when not specified.

{{{1}}}Half-Life 2 (without specifying numbers)
{{{1|1}}}Half-Life 2
{{{1|1.bold}}}Half-Life 2
{{{1|2}}}Half-Life 2 Half-Life 2
{{{1|2.bold}}}Half-Life 2 Half-Life 2
{{{1|3}}}Half-Life 2
{{{1|4}}}Half-Life 2 Half-Life 2

Click "Expand" to see more 

{{{1|3-darker}}}Half-Life 2
{{{1|3.1}}}Half-Life 2
{{{1|3.2}}}Half-Life 2
{{{1|4-darker}}}Half-Life 2 Half-Life 2
{{{1|4.1}}}Half-Life 2 Half-Life 2
{{{1|4.2}}}Half-Life 2 Half-Life 2

Enter "col" (without quotes) to get the text color of the game/software. Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "(also in Half-Life 2)".

Note.pngNote:However, the {{{1}}} parameter cannot be touched, it should always be "{{{1}}}" in the icon templates!
Note.pngNote:Colored text should be used when appropriate, otherwise it would clutter the page.
{{{name}}} Simply display the name. However this param is also used to add the abbreviation of the game for example (when you create/edit this template).
Note.pngNote:it is strongly recommended to write the abbreviation of the game in the parameter {{{name0}}}, {{{name1}}}, etc... or {{{nameiPadOS}}} (if supported, in templates such as {{iOS}}.
Half-Life 2
{{{bold}}} Same as above, with bold text. Half-Life 2
{{{ico}}} The name of the icon is written here, but only the name itself, without "File:" and square brackets.
This same param is also used to display the icon you have specified when you create a new {{Software}} template. If the icon doesn't exist, it simply shows red link.
Hl2 icon.png
{{{ico size}}} Width of the icon. Should be 16px for most icons, unless it's double, like Half-Life: Source, in which case it should be 32px, or more. Experimentation may be necessary for non-square icons.
Tip.pngTip:The software icon should be scaled to be in-line with the text size (using {{{ico size}}}). While this is nominally "16 pixels tall", high-DPI displays (particulary such as Apple Retina display, or 4K+ displays) will benefit from the file being higher resolutions; 32 or 64 pixels tall is generally sufficient, although any resolution can be used (MediaWiki will downscale the image automatically and only deliver the necessary resolution).
N/A
{{{col}}} The color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: #ADD8E6.
It's highly recommended that you use brighter color for better readability with dark/black pages, but not too bright or over-saturated.
#E6AC39
{{{link}}} Link to the article, if not specified, the link will use the {{{name}}} parameter.
Write without the brackets. Underscores and spaces are interchangeable.
Tip.pngTip:For Wikipedia links, prepend "WP:" (short for Wikipedia) to the page name (ex: WP:Gabe Newell, or Wikipedia:Gabe Newell) For external links, use {{software external}} and add {{{is outlink}}}.
N/A
{{{addtext}}} Additional text that will be written immediately after the icon. It is mainly needed to add other icons.
Note.pngNote:Make sure to include | addtext = {{{addtext|}}} in the icon templates!
{{hl2|4|addtext=®}}Half-Life 2 Half-Life 2®
{{{nt}}} This parameter will be used in the {{{name<number>}}} parameter, some software templates may also have {{{name<text>}}}, such as {{iOS}} and {{Mac}}.
Note.pngNote:Make sure that the | nt = {{{nt|}}} part must be included on the icon templates for it to work! This parameters requires text to be displayed using {{{1}}} to use.
Half-Life 2 HL2

Result & Copy and Paste

In the end, you should get something like this:

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
{{doc|docpage=Template:Hl2/doc}} <includeonly><onlyinclude>{{Software | {{{1}}} | ico = portal2 icon.png <!-- Icons with higher-resolution (256px or more for example) are now supported. User with low DPI monitor will see 16px, but users with 4K/Apple Retina will see 32px or higher, providing better quality. --> | ico size = 16px <!-- Note: This should always be kept at or near 16px, even with higher-res icon, unless the image is wider. For example, a 1:2 aspect ratio would be 32px. --> | link = Portal 2 | name = {{Autolang | Portal 2 | ko = 포탈 2 | zh = 传送门 2 | zh-tw = 傳送門 2 }} <!-- Autolang is now used for translation, which is done automatically by selecting the languages in the language toolbar. Suf-based translation are now deprecated. --> | name0 = portal2 | namePortal 2 = {{Autolang | Portal 2 | ko = 포탈 2 | zh = 传送门 2 | zh-tw = 傳送門 2 }} | namemoddir = portal2 | col = #23B1E5 | addtext = {{{addtext|}}} | nt = {{{nt|}}} }}</onlyinclude></includeonly>

You can also copy and paste the code above to create a new icon template, or to convert old template ({{New icon}}) to {{Software}} and update {{Software}} templates.

Translations

Translations are handled by the {{In text}} Template.

How To Use

This is how the use of the template in articles will look like:

Code Result
{{portal2}} Portal 2
{{portal2|1}} Portal 2
{{portal2|2}} Portal 2 Portal 2
{{portal2|3}} Portal 2
{{portal2|3-darker}} Portal 2
{{portal2|3.1}} Portal 2
{{portal2|3.2}} Portal 2
{{portal2|4}} Portal 2 Portal 2
{{portal2|4-darker}} Portal 2 Portal 2
{{portal2|4.1}} Portal 2 Portal 2
{{portal2|4.2}} Portal 2 Portal 2
{{portal2|ico}} Icon-Portal2.png
{{portal2|col}} #23B1E5
{{portal2|name}} Portal 2
{{portal2|bold}} Portal 2
{{portal2|in}} (in Portal 2)
{{portal2|only}} (only in Portal 2)
{{portal2|since}} (in all games since Portal 2)
{{portal2|not}} (not in Portal 2)
{{portal2|also|addtext=&nbsp;{{csgo}} {{l4d2}}}} (also in Portal 2 Counter-Strike: Global Offensive Left 4 Dead 2)
Template:Software
Logo-template.png
Summary
Aids in the creation of icon templates
Type
Metatemplate
Contributors
N/A
Creation date
04/04/2022
(04 April 2022)
Notes
N/A
Subpages
Documentation
Preload
N/A
Sandbox
Strings
Testcases
N/A
Other
N/A
Revision information
Latest editor
Kr0tchet
Last edited
24/06/2024
20240624091344
Revision size
9233 bytes
9.233 kilobytes
0.009233 megabytes
Technical information
Page identifier
46333
Contains translations
Yes
Uses parser functions?
Yes
Uses variables?
Yes