Template:Software/doc: Difference between revisions
Jump to navigation
Jump to search
Tip:This template now supports icons with 32px or larger, this meant that users can upload a large icon (128px for example) directly, without having to downscale the icon to 16px, as the MediaWiki software will do this automatically.
With the higher resolution icon available, these will benefits most 4K and Apple Retina display, and won't look blurry. See File:Icon-HL2.png.
(Created page with "==How To Create A New Icon Template== Template:New_icon is the template that underlies the icon templates. It has five parameters: *{{{p}}} - the way the icon will be disp...") |
m (Weird that the comment offsets the entire infobox template, adding 2 new lines fixes the bug.) |
||
(108 intermediate revisions by 11 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{doc|0}}</noinclude> | |||
{{Tip|This template now supports icons with 32px or larger, this meant that users can upload a large icon (128px for example) directly, without having to downscale the icon to 16px, as the MediaWiki software will do this automatically.<br>With the higher resolution icon available, these will benefits most 4K and Apple Retina display, and won't look blurry. See [[:File:Icon-HL2.png]].}} | |||
<div style="display:flex;"><div style="flex:1;"> | |||
=== | {{tl|Software}} is the template that underlies the icon templates. It has 8 main parameters: | ||
{| width="100%" class="unsortable" style="overflow: hidden; border-radius:.4em; border:2px solid #525252" | |||
|- bgcolor="#3A3A3A" style="white-space:nowrap" | |||
! style="background-color:#4f5559; color:#FFF; width:2%" | {{Dictionary/common|Param}} | |||
! style="background-color:#4f5559; color:#FFF; width:16%" | {{Dictionary/common|Desc}} | |||
! style="text-align:center" style="background-color:#4f5559; color:#FFF; width:12%" | Value & {{Dictionary/common|Previews}} | |||
|- | |||
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|1}}}} | |||
| bgcolor="#3A3A3A" | The way the icon will be displayed. Displays the icon only when not specified. | |||
| bgcolor="#3A3A3A" | | |||
{{param|1}} ► {{hl2}} (without specifying numbers)<br> | |||
{{param|1|1}} ► {{hl2|1}}<br> | |||
{{param|1|1.bold}} ► {{hl2|1.bold}}<br> | |||
{{param|1|2}} ► {{hl2|2}}<br> | |||
{{param|1|2.bold}} ► {{hl2|2.bold}}<br> | |||
{{param|1|3}} ► {{hl2|3}}<br> | |||
{{param|1|4}} ► {{hl2|4}}<br> | |||
{{ExpandBox|title=Click "Expand" to see more| | |||
{{param|1|3-darker}} ► {{hl2|3-darker}}<br> | |||
{{param|1|3.1}} ► {{hl2|3.1}}<br> | |||
{{param|1|3.2}} ► {{hl2|3.2}}<br> | |||
{{param|1|4-darker}} ► {{hl2|4-darker}}<br> | |||
{{param|1|4.1}} ► {{hl2|4.1}}<br> | |||
{{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.}} | |||
|- | |||
| 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).}} | |||
| bgcolor="#3A3A3A" | N/A | |||
|- | |||
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|col}}}} | |||
| 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. | |||
| bgcolor="#3A3A3A" | {{hl2|col}} | |||
|- | |||
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|link}}}} | |||
| 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. | |||
{{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 {{param|extlink}}.}} | |||
| bgcolor="#3A3A3A" | N/A | |||
|- | |||
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|extlink}}}} | |||
| bgcolor="#3A3A3A" | External link, for example: <nowiki>https://developer.valvesoftware.com/</nowiki><br>{{Important|This param can not be used with {{param|link}}!}} | |||
| 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}} | |||
|} | |||
=== | {{tl|Software}} also supports 3 more icons: | ||
{| width="100%" class="unsortable" style="overflow: hidden; border-radius:.4em; border:2px solid #525252" | |||
|- bgcolor="#3A3A3A" style="white-space:nowrap" | |||
{| style="background: | ! style="background-color:#4f5559; color:#FFF; width:2%" | {{Dictionary/common|Param}} | ||
| | ! style="background-color:#4f5559; color:#FFF; width:16%" | {{Dictionary/common|Desc}} | ||
! style="text-align:center" style="background-color:#4f5559; color:#FFF; width:12%" | Value & {{Dictionary/common|Previews}} | |||
|- | |- | ||
| | | bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|ico1}} ~ {{param|ico3}}}} | ||
| bgcolor="#3A3A3A" | The name of the icon is written here, but only the name itself, without "File:" and square brackets. | |||
| bgcolor="#3A3A3A" | N/A | |||
|- | |- | ||
| | | bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|ico1 size}} ~ {{param|ico3 size}}}} | ||
| bgcolor="#3A3A3A" | Width of the icon. | |||
| bgcolor="#3A3A3A" | N/A | |||
|- | |- | ||
| | | bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|ico1 name}} ~ {{param|ico3 name}}}} | ||
| bgcolor="#3A3A3A" | Name of the icon. | |||
| bgcolor="#3A3A3A" | N/A | |||
|- | |- | ||
| | | bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|IcoEnable1}} ~ {{param|IcoEnable3}}}} | ||
| bgcolor="#3A3A3A" | Show/Hide the icon, default is yes. | |||
| bgcolor="#3A3A3A" | N/A | |||
|} | |} | ||
=== Result & Copy and Paste === | |||
In the end, you should get something like this: | |||
{{CodeBlock|src=[[Template:Portal2]]|lines=26|<nowiki>{{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 = {{#switch: {{language}} | |||
| #default = Portal 2 | |||
| ko = 포탈 2 | |||
| zh = 传送门 2 | |||
| zh-tw = 傳送門 2 | |||
}} | |||
<!-- Switch parser function are now used for translation. | |||
The template will automatically translate when you select different languages in the language toolbar. | |||
Suf-based translation and suf parameters are now deprecated. --> | |||
| name0 = portal2 | |||
| namePortal 2 = {{#switch: {{language}} | |||
| #default = Portal 2 | |||
| ko = 포탈 2 | |||
| zh = 传送门 2 | |||
| zh-tw = 傳送門 2 | |||
}} | |||
| namemoddir = portal2 | |||
| col = #23B1E5 | |||
| addtext = {{{addtext|}}} | |||
| nt = {{{nt|}}} | |||
}}</onlyinclude></includeonly></nowiki>}} | |||
You can also copy and paste the code above to create a new icon template, or to convert old template ({{T|New icon}}) to {{T|Software}} and update {{T|Software}} templates. | |||
=== Translations === | |||
Translations are handled on the [[/strings]] page. | |||
===How To Use=== | |||
This is how the use of the template in articles will look like: | |||
{| class="sortable" style="overflow: hidden; border-radius:.4em; border:2px solid #525252" | |||
|- bgcolor="#3A3A3A" style="white-space:nowrap" | |||
! style="background-color:#4E3E25" | Code | |||
! style="background-color:#4E3E25" | Result | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}}} | |||
| {{ portal2 }} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|1}} | |||
| {{portal2|1}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|2}} | |||
| {{portal2|2}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|3}} | |||
| {{portal2|3}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|3-darker}} | |||
| {{portal2|3-darker}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|3.1}} | |||
| {{portal2|3.1}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|3.2}} | |||
| {{portal2|3.2}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|4}} | |||
| {{portal2|4}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|4-darker}} | |||
| {{portal2|4-darker}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|4.1}} | |||
| {{portal2|4.1}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|4.2}} | |||
| {{portal2|4.2}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|ico}} | |||
| {{portal2|ico}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|col}} | |||
| {{portal2|col}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|name}} | |||
| {{portal2|name}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|bold}} | |||
| {{portal2|bold}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|in}} | |||
| {{portal2|in}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|only}} | |||
| {{portal2|only}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|since}} | |||
| {{portal2|since}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|not}} | |||
| {{portal2|not}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|also|addtext{{=}}&nbsp;{{tlf|csgo}} {{tlf|l4d2}}}} | |||
| {{portal2|also|addtext= {{csgo}} {{l4d2}}}} | |||
|}</div> | |||
<div>{{infobox template | |||
| summary = Aids in the creation of icon templates | |||
| type = Metatemplate | |||
| creationdate = 04/04/2022<br><small>(04 April 2022)</small> | |||
| translation = Yes | |||
| parser = Yes | |||
| var = Yes | |||
}}</div></div> |
Latest revision as of 06:35, 28 July 2025

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.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

With the higher resolution icon available, these will benefits most 4K and Apple Retina display, and won't look blurry. See File:Icon-HL2.png.
{{Software}}
is the template that underlies the icon templates. It has 8 main parameters:
{{Software}}
also supports 3 more icons:
Result & Copy and Paste
In the end, you should get something like this:
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 on the /strings page.
How To Use
This is how the use of the template in articles will look like:
Template:Software
Summary
Aids in the creation of icon templates
Type
Metatemplate
Contributors
N/A
Creation date
04/04/2022
(04 April 2022)
(04 April 2022)
Notes
N/A
Subpages
Documentation
Preload
N/A
Sandbox
Strings
Testcases
N/A
Other
N/A
Revision information
Latest editor
N0one
Last edited
28/07/2025
20250728063516
20250728063516
Revision size
11016 bytes
11.016 kilobytes
0.011016 megabytes
11.016 kilobytes
0.011016 megabytes
Technical information
Page identifier
46333
Contains translations
Yes
Uses parser functions?
Yes
Uses variables?
Yes