Unitary: An Ajax based Units Converter Sidebar Widget for WordPress

A brief intro…

This sidebar widget serves as a quick Units Conversion tool – i.e. perform conversions Unitary Screenshotbetween various units of length, area, volume, speed etc., while sitting smugly in the sidebar of widget enabled WordPress blogs. This widget came in rapid succession of curreX (the Currency Converter) and the idea came off a comment by David Bradley at the Weblog Tools Collection blog. Since I’m fairly new to WordPress widget development, I thought why not try my hands at this… and here I am with the first stable release of the same.

Just of a side-note, my venture into the whole PHP-JavaScript-AJAX scene is quite recent. Till now I’d limited myself to mainstream coding on .NET. I find this all new journey really enlightening and am pretty proud of myself at having been able to churn out perfectly working some cool-tools, starting entirely from scratch. Thanks to all those who’ve provided me with ample encouragement to take a steady step in this direction. Once again, as always, I am not perfect. I cannot stress on the fact how important your comments & feedback are in order for me to carry on further with such development work.

Current Version

  • 0.5


  • Converts between hundreds of common & uncommon Units of Length, Area, Volume, Weight / Mass, Speed etc. More unit types to be announced in future.
  • Operates in Basic and Extended mode (which can be set from the Sidebar Widgets Control Panel of WordPress). The Basic mode limits the conversions to the more common & well-known units – thus making it more intuitive and user-friendly. However, the Extended mode makes available for conversions, a far wider array of units (including loads of lesser-known ones). This is meant for blogs which cater to a more scientifically advanced audience.
  • Precision (number of digits after Decimal Point) can be fixed for the converted results.
  • It employs an AJAX back-end, i.e. the conversions are performed without having to refresh the whole page, making the tool really lightweight & fast. Looks cool too.



[download id=”4″]


Installation couldn’t get any easier. Once downloaded, simply…

  1. Copy the extracted folder named curreX into your WordPress plug-ins folder.
  2. Activate the plug-in from the Plug-in Manager in WordPress.
  3. Visit the Sidebar Widgets page under Presentation menu to drag & drop the widget onto any sidebar you desire.

That’s it!

Showcase (the widget in action)

Subversion Repository

Change Log

  • Version 0.5 (2007-03-22)
    • Fixed an Internet Explorer specific bug that caused the units selection drop-down boxes to become blank (unfilled with any unit data) when a unit type was chosen from the first drop-down. The widget now works uniformly across both Internet Explorer & Firefox. All thanks to Náiron J. C. G for the IE-DOM+JavaScript based solution.
  • Version 0.4 (2007-03-15)
    • Fixed a minor bug that caused incorrect version reporting in WordPress plug-ins management panel.
  • Version 0.3 (2007-03-15)
    • Made minor adjustments in the layout of the plug-in resulting in smoother cross-browser rendering.
    • Renamed a bunch of plug-in related variables to avoid name collision with other plug-ins.
  • Version 0.2 (2007-03-14)
    • Included prototype.js with this distribution – as the plug-in wasn’t functioning properly on non-prototype based themes.
    • Fixed minor layout problems of fixed width form fields which was causing the layout to be distorted under different resolutions (read Sidebar width).

Please Note

I offer support for my plug-ins via the Chaos Laboratory Support Forum only. I will NOT respond to support queries left in the comment section below and, in most cases, will also not publish them. Of course, if you’d like to say something nice or helpful, then feel free to leave a comment!


158 Responses to “Unitary: An Ajax based Units Converter Sidebar Widget for WordPress

  • This is great! Thanks for feeling so inspired by my post. I’ll test it and install just as soon as I can.

    Thanks again

    Dave Bradley

  • David: No problem at all 🙂 Rather it’ll feel good if you actually find this tool useful. If you encounter any bugs while testing and/or want to see some feature added to it, do write back.

    P.S. As of now the only working conversions are for Units of Length, Area, Volume, Weight / Mass & Speed. I’ll gradually add in more to it. I also plan to add in an minimalistic expression evaluator that’d take in figures like 2.48e 5 and be able to use them for conversions directly.

  • Is there a method for implementing the php without using the widgets plugin? I don’t want to screw up my non-widgets-enabled sidebar?

    Any help gratefully received


  • Yup sure.. just gimme some time and I’ll make a port of it for inclusion in normal web-pages i.e. as a non-WordPress widget implementation. Will let you know at this email once I’m done.


  • Now, that’s service! I’ll watch out for it, thanks


  • How are you getting on with porting it? If it’s a real struggle I could probably just widgetize my sidebar

    Be good to have this running this week, as it’s Pi Day on Wednesday.


  • Trying my best 😀 I’m not very experienced at WP Plug-ins though I found coding widgets to be very easy.. I should be able to come up with some update by tomorrow… Thanks for dropping by 🙂


  • You know, the service round here is exceptional. m^e is cordon bleu when it comes down to it.


  • Once again, thank you David for those kind words and of course for that wonderful review you’ve published…

    Best Regards,

  • Hello,

    Thanks for sharing your new plugin with us and for taking the time to keep it updated.

    Have a little problem: I wanted to see if I could use it on my recipe site, but the drop-down menus are blank. What do I need to do?

    Thanks again,


  • Hi there gestroud,
    By the drop-down boxes, do you mean the ones where the units of conversion are supposed to appear? If so, can you please tell me what browser you’re using? If it’s Internet Explorer, I believe the plug-in might have a slight problem with it 😀 I noticed it just today, shortly after you posted your comment.

    David Bradley has got the plug-in installed at the Significant Figures blog. I went and checked there first with Firefox and it worked fine. Then on a hunch, I checked again with IE and I found that when you select the type of conversion from the first drop-down, the units didn’t appear in the unit selection drop-downs. This is surely a bug and it’s IE specific. I’ll come up with a fix sometime during the later part of today.

    Meanwhile, it’d be great if you can tell which browser you are using – so that I can be sure of the problem.


  • gestroud & David: The IE bug in the plug-in has been fixed and it should now work uniformly across both IE & FF. Please download the latest release and overwrite the earlier one.


  • Your conversor is very good. I’ll use.
    Thanks for use my innerHTML solution 🙂

  • Micox: Not really !! Rather a great many thanks to you for I’d be at a total loss on what to do, hadn’t it been for your super-easy solution. I tried my level best with whatever knowledge of PHP JS DOM I have but couldn’t figure out how to fix this problem. A Google search brought me to your page – and the moment I saw it I knew I’d hit a gold-mind 😀

    Best Regards,

  • Idetrorce
    9 years ago

    very interesting, but I don’t agree with you

  • Idetrorce: Sorry, but what don’t you agree with?? 😮

  • The great plagin. Thanks

  • David
    8 years ago

    I installed the plugin but the conversion was extremely slow and I could never get the results. Any suggestions?


  • Yes! Nice work! I found this!

Trackbacks & Pings