curreX is an AJAX powered Currency Conversion widget which can be run in your WordPress sidebar(s). The widget is very simple and does exactly what it’s supposed to do. It accepts a currency value (integer or decimal) and a source & destination currency and gives you the converted rate once you hit the Convert button.
- It can convert between 144 world currency formats.
- The conversion rates are fetched in real-time from Yahoo! Finance prior to every calculation.
- 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.
- Performs client-side validation of the amount entered – thus cutting out chances of entering an erroneous value and crashing the calculator midway while performing a conversion.
Installation couldn’t get any easier. Once downloaded, simply…
- Unzip the archive.
- Copy the extracted folder named curreX into your WordPress plug-ins folder.
- Activate the plug-in from the Plug-in Manager in WordPress.
- Visit the Sidebar Widgets page under Presentation menu (for upto WordPress 2.3.x) OR the Widgets section under Design menu (for WordPress 2.5.x) to drag & drop the widget onto any sidebar you desire.
- Configure the widget as you like (Source / Destination Currecy, Decimal Precision etc.) and Save changes.
- Does this plug-in work with a non widget enabled theme?
As of version 0.7, it does. One should place a call to the function
show_currex( default_from, default_to, decimal_places, (optional) type, (optional) title )in an appropriate place in the file sidebar.php for the non widget enabled theme.
The default_from and default_to here are 3 character shortened codes for the source and destination currencies. These 3 character codes can be found in the dropdown currency selection boxes of curreX, stated beside each currency.
decimal_places is an integer which denotes the precision (number of digits to display after the decimal point) of the conversion result.
title specifies the title to display embedded in the Flash widget. This parameter is optional too and if omitted, no title will be displayed in the widget. This parameter is directly related the the type of the widget, and if flash isn’t the chosen type has no effect on the display anywhere. This feature is meant to act as a replacement for the default title field of a WordPress widget. I don’t recommend using both together – as it’ll be pointless and redundant.
A typical call to this function with source currency as US Dollars, destination currency as Thai Baht and precision set to 2 decimal places looks like,
<? show_currex( "USD", "THB", 2, 'flash', 'Currency Exchange' ); ?>
NOTE: Any version prior to 0.7 works only with widget enabled themes.