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.
No edit summary |
m (Weird that the comment offsets the entire infobox template, adding 2 new lines fixes the bug.) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 56: | Line 56: | ||
| bgcolor="#3A3A3A" align="center" | {{Code|style=2|{{Param|link}}}} | | 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. | | 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 {{ | {{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" | N/A | ||
|- | |- | ||
Line 67: | Line 71: | ||
{{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.}} | {{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}} | | 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-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 | |||
|} | |} | ||
Line 72: | Line 100: | ||
In the end, you should get something like this: | In the end, you should get something like this: | ||
{{CodeBlock|src=[[Template:Portal2]]|lines= | {{CodeBlock|src=[[Template:Portal2]]|lines=26|<nowiki>{{doc|docpage=Template:Hl2/doc}} | ||
<includeonly><onlyinclude>{{Software | <includeonly><onlyinclude>{{Software | ||
| {{{1}}} | | {{{1}}} | ||
Line 85: | Line 113: | ||
| zh-tw = 傳送門 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 | | name0 = portal2 | ||
| namePortal 2 = {{#switch: {{language}} | | namePortal 2 = {{#switch: {{language}} | ||
Line 102: | Line 132: | ||
=== Translations === | === Translations === | ||
Translations are handled | Translations are handled on the [[/strings]] page. | ||
===How To Use=== | ===How To Use=== |
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