Template:Img item: Difference between revisions

From PZwiki
mNo edit summary
m (Automated {{Languages}} removal.)
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>[[File:<!--
<noinclude>
{{Deprecated}}
{{Documentation}}
[[Category:Templates]]
</noinclude><includeonly>{{#ifeq:{{{2|}}}|name<!--


##########################
##########################
##       IMAGE        ##
##   NAME & LINK ONLY  ##
##########################
##########################


-->{{#if: {{{img|}}}|{{{img}}}|{{#switch: {{{item}}}<!--
-->|[[<!--


##   AMMO  ##
## LINK  ##


-->
-->{{#if:{{{link|}}}|{{{link}}}|{{Img_item/link|item={{{1|{{{item}}}}}}}}{{#switch:{{#titleparts: {{FULLPAGENAME}} | | -1 }}| af = /af | cs = /cs| de = /de| es = /es| fr = /fr| hu = /hu| it = /it| ja = /ja| ko = /ko| nl = /nl| no = /no| pl = /pl| pt = /pt| pt-br = /pt-br| ru = /ru| th = /th| tr = /tr| uk = /uk| zh-hans = /zh-hans| zh-hant = /zh-hant| #default = }}}}|<!--
| Bullets9mm|9mm Rounds|9mm Round = 40calAmmoBox
| Bullets9mmBox|Box of 9mm Bullets = HandgunAmmoBox
| 9mmClip|9mm Magazine = BerettaClip
| Bullets45|.45 Auto|.45 Auto Round = 40calAmmoBox
| Bullets45Box|Box of .45 Auto Bullets|Box of .45 Auto Rounds = HandgunAmmoBox
| 45Clip|.45 Auto Magazine = BerettaClip
| Bullets44|.44 Magnum Bullets|.44 Magnum Round = 40calAmmoBox
| Bullets44Box|Box of .44 Magnum Bullets|Box of .44 Magnum Rounds = HandgunAmmoBox
| 44Clip|.44 Magazine = BerettaClip
| Bullets38|.38 Special Bullets|.38 Special Round = 40calAmmoBox
| Bullets38Box|Box of .38 Special Bullets|Box of .38 Special Rounds = HandgunAmmoBox
| ShotgunShells|Shotgun Shells = ShotgunAmmo
| ShotgunShellsBox|Box of Shotgun Shells = ShotgunAmmoBox
| 223Bullets|.223 Ammo|.223 Ammo Round = RifleAmmo223loose
| 223Box|Box of .223 Bullets|Box of .223 Rounds = RifleAmmo223
| 223Clip|.223 Magazine = BerettaClip
| 308Bullets|.308 Ammo|.308 Round = RifleAmmo308loose
| 308Box|Box of .308 Bullets|Box of .308 Rounds = RifleAmmo308
| 308Clip|.308 Magazine = BerettaClip
| 556Bullets|.556 Ammo|.556 Round = RifleAmmo308loose
| 556Box|Box of .556 Bullets|Box of .556 Rounds = RifleAmmo308
| 556Clip|.556 Magazine = BerettaClip
| M14Clip|.308 Magazine = BerettaClip<!--


##   FIREARMS  ##
## NAME  ##


-->
-->{{#if:{{{name|}}}|{{{name}}}|{{Translation|{{Img_item/name|item={{{1|{{{item}}}}}}}}}}}}]]<!--
| VarmintRifle|MSR700 Rifle|Varmint Rifle = LeverActionRifle
| HuntingRifle|MSR788 Rifle|Hunting Rifle = RifleHunting
| Shotgun|JS-2000 Shotgun|Shotgun = Shotgun2
| DoubleBarrelShotgun|Double Barrel Shotgun = ShotgunDoublebarrel
| DoubleBarrelShotgunSawnoff|Sawn Off Double Barrel Shotgun|Sawed-off Double Barrel Shotgun = ShotgunDoublebarrel
| ShotgunSawnoff|Sawn Off JS-2000 Shotgun|Sawed-off JS-2000 Shotgun|Sawn Off Shotgun|Sawed-off Shotgun = Shotgun
| Pistol|M9 Pistol = HandGun3
| Pistol2|M1911 Pistol = HandGun2
| Pistol3|D-E Pistol = HandGun
| Revolver|M625 Revolver = Revolver
| Revolver_Long|Magnum = RevolverLong
| Revolver_Short|M36 Revolver = RevolverShort
| AssaultRifle|M16 Assault Rifle = AssaultRifle
| AssaultRifle2|M14 Single Shot Assault Rifle = AssaultRifle2<!--
 
##  FABRIC  ##
 
-->
| Cotton|cotton = Rag
| Denim|denim = DenimStrips
| Leather|leather = LeatherStrips
| #default = image
}}}}.png|{{{size|32px}}}|link=<!--
 
##########################
##        LINK          ##
##########################
 
-->{{#if:{{{link|}}}|{{{link}}}|{{#switch: {{{item}}}<!--
 
##  AMMO  ##
 
-->
| Bullets9mm|9mm Rounds = 9mm Round
| Bullets9mmBox|Box of 9mm Bullets|Box of 9mm Rounds = 9mm Round
| 9mmClip|9mm Magazine = 9mm Magazine
| Bullets45|.45 Auto|.45 Auto Round = .45 Auto Round
| Bullets45Box|Box of .45 Auto Bullets|Box of .45 Auto Rounds = .45 Auto Round
| 45Clip|.45 Auto Magazine = .45 Auto Magazine
| Bullets44|.44 Magnum Bullets|.44 Magnum Round = .44 Magnum Round
| Bullets44Box|Box of .44 Magnum Bullets|Box of .44 Magnum Rounds = .44 Magnum Round
| 44Clip|.44 Magazine = .44 Magazine
| Bullets38|.38 Special Bullets|.38 Special Round = .38 Special Round
| Bullets38Box|Box of .38 Special Bullets|Box of .38 Special Rounds = .38 Special Round
| ShotgunShells|Shotgun Shells = Shotgun Shells
| ShotgunShellsBox|Box of Shotgun Shells = Shotgun Shells
| 223Bullets|.223 Ammo|.223 Round = .223 Round
| 223Box|Box of .223 Bullets|Box of .223 Rounds = .223 Round
| 223Clip|.223 Magazine = .223 Magazine
| 308Bullets|.308 Ammo|.308 Round = .308 Round
| 308Box|Box of .308 Bullets|Box of .308 Rounds = .308 Round
| 308Clip|.308 Magazine = .308 Magazine
| 556Bullets|.556 Ammo|.556 Round = .556 Round
| 556Box|Box of .556 Bullets|Box of .556 Rounds = .556 Round
| 556Clip|.556 Magazine = .556 Magazine
| M14Clip|.308 Magazine = .308 Magazine<!--
 
##  FIREARMS  ##
 
-->
| VarmintRifle|MSR700 Rifle|Varmint Rifle = MSR700 Rifle
| HuntingRifle|MSR788 Rifle|Hunting Rifle = MSR788 Rifle
| Shotgun|JS-2000 Shotgun|Shotgun = JS-2000 Shotgun
| DoubleBarrelShotgun|Double Barrel Shotgun = Double Barrel Shotgun
| DoubleBarrelShotgunSawnoff|Sawn Off Double Barrel Shotgun|Sawed-off Double Barrel Shotgun = Sawed-off Double Barrel Shotgun
| ShotgunSawnoff|Sawn Off JS-2000 Shotgun|Sawed-off JS-2000 Shotgun|Sawn Off Shotgun|Sawed-off Shotgun = Sawed-off JS-2000 Shotgun
| Pistol|M9 Pistol = M9 Pistol
| Pistol2|M1911 Pistol = M1911 Pistol
| Pistol3|D-E Pistol = D-E Pistol
| Revolver|M625 Revolver = M625 Revolver
| Revolver_Long|Magnum = Magnum
| Revolver_Short|M36 Revolver = M36 Revolver
| AssaultRifle|M16 Assault Rifle = M16 Assault Rifle
| AssaultRifle2|M14 Single Shot Assault Rifle = M14 Single Shot Assault Rifle<!--
 
##  FABRIC  ##
 
-->
| Cotton|cotton = Ripped Sheets
| Denim|denim = Denim Strips
| Leather|leather = Leather Strips
| #default =
}}}}|<!--


##########################
##########################
##       NAME         ##
## IMAGE, LINK & NAME ##
##########################
##########################


-->{{#if:{{{name|}}}|{{{name}}}|{{#switch: {{{item}}}<!--
-->|[[File:<!--


##   AMMO  ##
## IMAGE  ##


-->
-->{{#if: {{{img|{{{icon|}}}}}}|{{{img|{{{icon|}}}}}}|{{Img item/icon|item={{{1|{{{item}}}}}}}}}}.png|{{{size|32px}}}|link=<!--
| Bullets9mm|9mm Rounds|9mm Round = 9mm Round
| Bullets9mmBox|Box of 9mm Bullets|Box of 9mm Rounds = Box of 9mm Rounds
| 9mmClip|9mm Magazine = 9mm Magazine
| Bullets45|.45 Auto|.45 Auto Round = .45 Auto Round
| Bullets45Box|Box of .45 Auto Bullets|Box of .45 Auto Rounds = Box of .45 Auto Rounds
| 45Clip|.45 Auto Magazine = .45 Auto Magazine
| Bullets44|.44 Magnum Bullets|.44 Magnum Round = .44 Magnum Round
| Bullets44Box|Box of .44 Magnum Bullets|Box of .44 Magnum Rounds = Box of .44 Magnum Rounds
| 44Clip|.44 Magazine = .44 Magazine
| Bullets38|.38 Special Bullets = .38 Special Rounds
| Bullets38Box|Box of .38 Special Bullets|Box of .38 Special Rounds = Box of .38 Special Rounds
| ShotgunShells|Shotgun Shells = Shotgun Shells
| ShotgunShellsBox|Box of Shotgun Shells = Box of Shotgun Shells
| 223Bullets|.223 Ammo|.223 Round = .223 Round
| 223Box|Box of .223 Bullets|Box of .223 Rounds = Box of .223 Rounds
| 223Clip|.223 Magazine = .223 Magazine
| 308Bullets|.308 Ammo|.308 Round = .308 Round
| 308Box|Box of .308 Bullets|Box of .308 Rounds = Box of .308 Rounds
| 308Clip|.308 Magazine = .308 Magazine
| 556Bullets|.556 Ammo = .556 Round
| 556Box|Box of .556 Bullets|Box of .556 Rounds = Box of .556 Rounds
| 556Clip|.556 Magazine = .556 Magazine
| M14Clip|.308 Magazine = .308 Magazine<!--


##   FIREARMS  ##
## LINK  ##


-->
-->{{#if:{{{link|}}}|{{{link}}}|{{Img_item/link|item={{{1|{{{item}}}}}}}}{{#switch:{{#titleparts: {{FULLPAGENAME}} | | -1 }}| cs = /cs| de = /de| es = /es| fr = /fr| hu = /hu| it = /it| ja = /ja| ko = /ko| nl = /nl| no = /no| pl = /pl| pt = /pt| pt-br = /pt-br| ru = /ru| th = /th| tr = /tr| uk = /uk| zh-hans = /zh-hans| zh-hant = /zh-hant| #default = }}}}|<!--
| VarmintRifle|MSR700 Rifle|Varmint Rifle = MSR700 Rifle
| HuntingRifle|MSR788 Rifle|Hunting Rifle = MSR788 Rifle
| Shotgun|JS-2000 Shotgun|Shotgun = JS-2000 Shotgun
| DoubleBarrelShotgun|Double Barrel Shotgun = Double Barrel Shotgun
| DoubleBarrelShotgunSawnoff|Sawn Off Double Barrel Shotgun|Sawed-off Double Barrel Shotgun = Sawed-off Double Barrel Shotgun
| ShotgunSawnoff|Sawn Off JS-2000 Shotgun|Sawed-off JS-2000 Shotgun|Sawn Off Shotgun|Sawed-off Shotgun = Sawed-off JS-2000 Shotgun
| Pistol|M9 Pistol = M9 Pistol
| Pistol2|M1911 Pistol = M1911 Pistol
| Pistol3|D-E Pistol = D-E Pistol
| Revolver|M625 Revolver = M625 Revolver
| Revolver_Long|Magnum = Magnum
| Revolver_Short|M36 Revolver = M36 Revolver
| AssaultRifle|M16 Assault Rifle = M16 Assault Rifle
| AssaultRifle2|M14 Single Shot Assault Rifle = M14 Single Shot Assault Rifle<!--


##   FABRIC  ##
## NAME  ##


-->
-->{{#if:{{{name|}}}|{{{name}}}|{{Translation|{{Img_item/name|item={{{1|{{{item}}}}}}}}}}}}]]}}</includeonly>
| Cotton|cotton = Ripped Sheets
| Denim|denim = Ripped Denim
| Leather|leather = Ripped Leather
| #default =
}}}}]]</includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 14:18, 3 March 2024

Imbox content.png
This template is deprecated.
This template will eventually be removed.
[view] [edit] [history] [purge] Template documentation
The {{Img item}} template is used to generate an item image by simply knowing the display name or item ID.

Editing

To add new definitions or edit an existing one, please go to the following subpages:

Usage

{{Img item
|item = <!-- or {{{1}}} (first anonymous parameter) -->
|size = <!-- optional -->
|icon = <!-- or |img = --> <!-- optional -->
|link = <!-- optional -->
|name = <!-- optional -->
}}

Image.png

Parameters

item
Determines the item image, name, and link. Can be the item's display name, item ID (without module) or previous names (so long as there are no conflicts). Can be replaced with the first anonymous parameter. Default: File:image.png
size
The size of the image. This can be left blank unless needed to be customized. Default: 32px
icon
Manually set the image to be displayed. This will normally be left blank. Can be replaced with img.
link
Manually set the link for the image. This will normally be left blank.
name
Manually set the "name" to show when hovering over. This will normally be left blank.

Anonymous parameters

See more: Anonymous parameters
{{{1}}}
Alternative to item, for simplified markup. Determines the item image, name, and link. Can be the item's display name, item ID (without module) or previous names (so long as there are no conflicts). Default: File:image.png
{{{2}}}
Adding "name" will remove the image and only display the name and link. Alternative to using {{Img item/link}} and {{Img item/name}}.

Examples

Type Produces Explanation
{{Img item|item=ShotgunShellsBox|size=32px}}
Box of Shotgun Shells Using the item ID with the item and size parameters.
{{Img item|ShotgunShellsBox}}
Box of Shotgun Shells The markup can be simplified by removing the item and size parameters, and just including the item ID as the first anonymous parameter. This produces the same result as the above example.
{{Img item|icon=Chainsaw_Model|size=64px|name=Zombie slayer|link=Zombie}}
Zombie slayer The icon, size, name and link can be manually adjusted. Here it's showing the Chainsaw model as the icon at size 64px, "Zombie slayer" as the name, and Zombie as the link.
{{Img item|ShotgunShellsBox|name}}
Box of Shotgun Shells Using just the first and second anonymous parameters, with the second being "name", display just the indexed name and link.
Documentation transcluded from Template:Img item/doc.
Editors can experiment in this template's sandbox (create)