Weight converter

Author: George Ornbo Source: Github

Compatibility

  • ExpressionEngine Version 1.6.x (1.x.x releases), ExpressionEngine Version 2.0.x (2.x.x releases)
  • PHP 5.x

License

Weight Converter is free for personal and commercial use.

If you use it commercially a donation of $10 is suggested. You can send donations here.

Weight Converter is licensed under a Open Source Initiative - BSD License license.

Installation

For EE 1.6.x the file pi.weight_converter.php must be placed in the /system/plugins/ folder in your ExpressionEngine installation.

For EE 2.0.0 the weight_converter folder must be placed in the /system/expressionengine/third_party/ folder in your ExpressionEngine installation.

Name

Weight Converter

Synopsis

Converts a number from one weight to another

Description

The plugin converts a number from one weight to another. It is possible to specify the number of decimals, the decimal separator and the thousands separator.

{exp:weight_converter from="kg" to="lb"}1.345{/exp:weight_converter}

Parameters

from
  • lb - Pounds
  • g - Grams
  • kg - Kilograms
  • oz - Ounzes
  • st - Stones
  • short_ton - Short Ton (UK)
  • long_ton - Long Ton (US)

The Unit to convert from. Use syntax as above eg for stone use “st”:

to
  • lb - Pounds
  • g - Grams
  • kg - Kilograms
  • oz - Ounzes
  • st - Stones
  • short_ton - Short Ton (UK)
  • long_ton - Long Ton (US)

The Unit to convert to. Use syntax as above eg for stone use “st”:

decimals

The number of decimal places to show. Default: 2.

dec_point

The character to use for the decimal point. Default: .

thousands_sep

The character to use for thousands separator. Default: SPACE

Examples

Convert from kg to lbs

{exp:weight_converter from="kg" to="lb"}2.1234{/exp:weight_converter}

Convert from g to st with one decimal place

{exp:weight_converter from="kg" to="lb" decimals="1"}2.1234{/exp:weight_converter}

You can open a ticket over at Lighthouse. As this is free software the response time can vary.

# Ticket Milestone Created at Updated at Status

Comments

blog comments powered by Disqus

Donations

Most of my software is free but I still need to eat and keep the wife happy.

If you use any software commercially please consider giving a donation.

Make a donation via PayPal