Page 1 of 1

Unit converter tag

PostPosted: 30 Apr 2013, 10:29
by YorkshirePudding
Ok this is an idea I once had while on another diet forum. Its possible I just like it because I think I'm a little discalculic and would make my life easier :P

Lots of nationalities on here and different measurment preferences. Kg, stone and lbs, lbs.. any others I've not thought of? :P So maybe it is a useful idea here.

What I thought would be cool is if there was a custom tag you could use when writing weights. When you use it the server would only display the weight in the format that each user had specified. I have no idea if this would slow things down too much.

So for example: I log on one day and type "Yippee, another {7lb} gone!"
But to someone with preferences set to kg would see "Yippee, another {3.1kg} gone!"

Or alternatively the server does nothing automatically but the tag is a link of some sort which when clicked on opens up a small popup with a list of the conversions:
----
7lb
0 st 7lb
3.1kg
----

Re: Unit converter tag

PostPosted: 30 Apr 2013, 11:14
by Moogie
I can have a look at if this might be possible with bbcode somehow, but can't make any promises ;)

Actually, if you install the Google toolbar it can do these conversions in the text for you. When I hover my mouse over the measurements in your post a little google tooltip pops up and gives me the KG equivalent!

Re: Unit converter tag

PostPosted: 30 Apr 2013, 11:41
by Moogie
Testing... 10kg


EDIT: not there yet... working on it!

Re: Unit converter tag

PostPosted: 30 Apr 2013, 12:02
by Moogie
Okay, got something relatively basic set up, but it might help a bit. Not quite so automated as you wanted, but you can now use:

Code: Select all
[weight=lb]5[/weight]
[weight=kg]10[/weight]


To give the following results:
5lb
10kg

Re: Unit converter tag

PostPosted: 30 Apr 2013, 19:07
by carorees
Now if I could get everyone reporting their progress in the monthly weigh in to use this it would make my life so much easier!

Can you do one for inches/cm too?

Re: Unit converter tag

PostPosted: 30 Apr 2013, 20:23
by Moogie
Code: Select all
[measure=inches]5[/measure]
[measure=cm]10[/measure]


To give the following results:
5 inches
10 cm

Re: Unit converter tag

PostPosted: 30 Apr 2013, 20:45
by deMuralist
So Caroline if at the first post where we are to report our progress you added these and explained how to use them, I bet at least most would do it.

I am actually clueless as to what it is doing and how to get it to do it.

Re: Unit converter tag

PostPosted: 30 Apr 2013, 22:25
by carorees
Moogie, you're a genius! :star: This is so helpful!