Error creating thumbnail: File missing Join our Discord!
If you have been locked out of your account you can request a password reset here.

Template:Convert: Difference between revisions

From Internet Movie Firearms Database - Guns in Movies, TV and Video Games
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
<div style="font-size:150%;color:red">'''PLEASE DO NOT USE THIS TEMPLATE UNTIL THE "WORK IN PROGRESS" TAG HAS BEEN REMOVED!!!<br><br> I am still working out the details.'''</div><br> --[[User:Zackmann08|Zackmann08]] 22:37, 29 April 2012 (CDT)
<div style="font-size:150%;color:red">'''PLEASE DO NOT USE THIS TEMPLATE UNTIL THE "WORK IN PROGRESS" TAG HAS BEEN REMOVED!!!<br><br> I am still working out the details.'''</div><br> --[[User:Zackmann08|Zackmann08]] 22:37, 29 April 2012 (CDT)
This template will allow an easy way to convert from kg to lbs or cm to in for gun pages. This will take some time to get working.  
This template will allow an easy way to convert from kg to lbs or cm to in for gun pages. This will take some time to get working.  
the first value given to the template, indicates what unit you are supplying (kg, lbs, g, oz, in, cm, mm). The Second parameter is the value you want to convert.
=Examples=
For example:
<pre>
{{convert|kg|5}}
</pre>
Produces:
{{convert|kg|5}}
<pre>
{{convert|in|5}}
</pre>
Produces:
{{convert|in|5}}
[[Category:Templates]]
[[Category:Templates]]
</noinclude><includeonly>
<!-- ALL LINE BREAKS MUST BE REMOVED FOR TEMPLATE TO PROPERLY WORK!!!!! -->
<!-- ALL LINE BREAKS MUST BE REMOVED FOR TEMPLATE TO PROPERLY WORK!!!!! -->
<!-- kg to lbs -->
</noinclude><includeonly><!-- kg to lbs -->{{#ifeq: {{{1}}}|kg|{{#expr: ({{{2}}}* 2.2046)round2}} lbs ({{{2}}} kg)|}}<!-- lbs to kg -->{{#ifeq: {{{1}}}|lbs|{{{2}}} lbs ({{#expr: ({{{2}}}* 0.45359)round2}} kg)|}}<!-- oz to kg & lbs -->{{#ifeq: {{{1}}}|oz|{{#expr: ({{{2}}}* 0.0625)round2}} lbs ({{#expr: ({{{2}}}* 0.0283495231)round2}} kg)|}}<!-- g to kg & lbs -->{{#ifeq: {{{1}}}|g|{{#expr: ({{{2}}}* 0.00220462262)round2}} lbs ({{#expr: ({{{2}}}* 0.001)round2}} kg)|}}<!-- in to cm-->{{#ifeq: {{{1}}}|in|{{{2}}} in ({{#expr: ({{{2}}}* 2.54)round2}} cm)|}}<!-- cm to in-->{{#ifeq: {{{1}}}|cm|{{#expr: ({{{2}}}* 0.393700787)round2}} in ({{{2}}} cm)|}}<!-- mm to in & cm-->{{#ifeq: {{{1}}}|g|{{#expr: ({{{2}}}* 0.0393700787)round2}} in ({{#expr: ({{{2}}}* 0.1)round2}} cm)|}}</includeonly>
{{#ifeq: {{{1}}}|kg|{{#expr: ({{{2}}}* 2.2046)round2}} lbs ({{{2}}} kg)|}}
<!-- lbs to kg -->
{{#ifeq: {{{1}}}|lbs|{{{2}}} lbs ({{#expr: ({{{2}}}* 0.45359)round2}} kg)|}}
<!-- oz to kg & lbs -->
{{#ifeq: {{{1}}}|oz|{{#expr: ({{{2}}}* 0.0625)round2}} lbs ({{#expr: ({{{2}}}* 0.0283495231)round2}} kg)|}}
<!-- g to kg & lbs -->
{{#ifeq: {{{1}}}|g|{{#expr: ({{{2}}}* 0.00220462262)round2}} lbs ({{#expr: ({{{2}}}* 0.001)round2}} kg)|}}
<!-- in to cm-->
{{#ifeq: {{{1}}}|in|{{{2}}} in ({{#expr: ({{{2}}}* 2.54)round2}} cm)|}}
<!-- cm to in-->
{{#ifeq: {{{1}}}|cm|{{#expr: ({{{2}}}* 0.393700787)round2}} in ({{{2}}} cm)|}}
<!-- mm to in & cm-->
{{#ifeq: {{{1}}}|g|{{#expr: ({{{2}}}* 0.0393700787)round2}} in ({{#expr: ({{{2}}}* 0.1)round2}} cm)|}}
</includeonly>

Revision as of 03:29, 3 May 2012


Error creating thumbnail: File missing

Work In Progress

This article is still under construction. It may contain factual errors. See Template talk:Convert for current discussions. Content is subject to change.

PLEASE DO NOT USE THIS TEMPLATE UNTIL THE "WORK IN PROGRESS" TAG HAS BEEN REMOVED!!!

I am still working out the details.


--Zackmann08 22:37, 29 April 2012 (CDT)

This template will allow an easy way to convert from kg to lbs or cm to in for gun pages. This will take some time to get working.

the first value given to the template, indicates what unit you are supplying (kg, lbs, g, oz, in, cm, mm). The Second parameter is the value you want to convert.

Examples

For example:

{{convert|kg|5}}

Produces: 11.02 lbs (5 kg)

{{convert|in|5}}

Produces: 5 in (12.7 cm)