This module allows you to add the Google Currency Converter in a module position.
The module makes use of the Currency Converter from Google Finance. (Scroll to the bottom right and you'll see the Currency Converter.)
Unique Features
- Performs currency conversion by connecting in real-time at the backend to the Currency Converter from Google Finance. So you get the most up-to-date currency rate as provided by Google Finance.
- Uses AJAX to display the result - no reloading of pages required!
- Full CSS support! This means that you can set the font family, font size, foreground and background color of the input field, submit button, etc.
- The module can be included in a content item! (see below for details)
- Available for all Joomla versions: Joomla 1.0.x, native 1.5.x, 1.6.x, 1.7.x and 2.5.x!
Complete list of Currencies supported by Google
Note: If your currency is not listed below, you may want to try the Yahoo Currency Converter which provides 62 more currencies than Google. View the additional currencies provided by Yahoo.
- AED - United Arab Emirates Dirham (AED)
- ANG - Netherlands Antillean Guilder (ANG)
- ARS - Argentine Peso (ARS)
- AUD - Australian Dollar (AUD)
- BDT - Bangladeshi Taka (BDT)
- BGN - Bulgarian Lev (BGN)
- BHD - Bahraini Dinar (BHD)
- BND - Brunei Dollar (BND)
- BOB - Bolivian Boliviano (BOB)
- BRL - Brazilian Real (BRL)
- BWP - Botswanan Pula (BWP)
- CAD - Canadian Dollar (CAD)
- CHF - Swiss Franc (CHF)
- CLP - Chilean Peso (CLP)
- CNY - Chinese Yuan (CNY)
- COP - Colombian Peso (COP)
- CRC - Costa Rican Colon (CRC)
- CZK - Czech Republic Koruna (CZK)
- DKK - Danish Krone (DKK)
- DOP - Dominican Peso (DOP)
- DZD - Algerian Dinar (DZD)
- EEK - Estonian Kroon (EEK)
- EGP - Egyptian Pound (EGP)
- EUR - Euro (EUR)
- FJD - Fijian Dollar (FJD)
- GBP - British Pound Sterling (GBP)
- HKD - Hong Kong Dollar (HKD)
- HNL - Honduran Lempira (HNL)
- HRK - Croatian Kuna (HRK)
- HUF - Hungarian Forint (HUF)
- IDR - Indonesian Rupiah (IDR)
- ILS - Israeli New Sheqel (ILS)
- INR - Indian Rupee (INR)
- JMD - Jamaican Dollar (JMD)
- JOD - Jordanian Dinar (JOD)
- JPY - Japanese Yen (JPY)
- KES - Kenyan Shilling (KES)
- KRW - South Korean Won (KRW)
- KWD - Kuwaiti Dinar (KWD)
- KYD - Cayman Islands Dollar (KYD)
- KZT - Kazakhstani Tenge (KZT)
- LBP - Lebanese Pound (LBP)
- LKR - Sri Lankan Rupee (LKR)
- LTL - Lithuanian Litas (LTL)
- LVL - Latvian Lats (LVL)
- MAD - Moroccan Dirham (MAD)
- MDL - Moldovan Leu (MDL)
- MKD - Macedonian Denar (MKD)
- MUR - Mauritian Rupee (MUR)
- MVR - Maldivian Rufiyaa (MVR)
- MXN - Mexican Peso (MXN)
- MYR - Malaysian Ringgit (MYR)
- NAD - Namibian Dollar (NAD)
- NGN - Nigerian Naira (NGN)
- NIO - Nicaraguan Cordoba (NIO)
- NOK - Norwegian Krone (NOK)
- NPR - Nepalese Rupee (NPR)
- NZD - New Zealand Dollar (NZD)
- OMR - Omani Rial (OMR)
- PEN - Peruvian Nuevo Sol (PEN)
- PGK - Papua New Guinean Kina (PGK)
- PHP - Philippine Peso (PHP)
- PKR - Pakistani Rupee (PKR)
- PLN - Polish Zloty (PLN)
- PYG - Paraguayan Guarani (PYG)
- QAR - Qatari Rial (QAR)
- RON - Romanian Leu (RON)
- RSD - Serbian Dinar (RSD)
- RUB - Russian Ruble (RUB)
- SAR - Saudi Riyal (SAR)
- SCR - Seychellois Rupee (SCR)
- SEK - Swedish Krona (SEK)
- SGD - Singapore Dollar (SGD)
- SKK - Slovak Koruna (SKK)
- SLL - Sierra Leonean Leone (SLL)
- SVC - Salvadoran Colon (SVC)
- THB - Thai Baht (THB)
- TND - Tunisian Dinar (TND)
- TRY - Turkish Lira (TRY)
- TTD - Trinidad and Tobago Dollar (TTD)
- TWD - New Taiwan Dollar (TWD)
- TZS - Tanzanian Shilling (TZS)
- UAH - Ukrainian Hryvnia (UAH)
- UGX - Ugandan Shilling (UGX)
- USD - US Dollar (USD)
- UYU - Uruguayan Peso (UYU)
- UZS - Uzbekistan Som (UZS)
- VEF - Venezuelan Bolivar (VEF)
- VND - Vietnamese Dong (VND)
- XOF - CFA Franc BCEAO (XOF)
- YER - Yemeni Rial (YER)
- ZAR - South African Rand (ZAR)
- ZMK - Zambian Kwacha (ZMK)
Note that Google did not release any API for the Google Currency Converter (There are some APIs for Google Finance, but not for the Google Currency Converter).
Latest Version
v1.0.9 (for Joomla 1.0), v1.5.9 (for Joomla 1.5), v1.6.9 (for Joomla 1.6), v1.7.9 (for Joomla 1.7), v2.5.9 (for Joomla 2.5)
Released Apr 6, 2012
Thanks to Pongdej, the latest version can now handle the following 2 cases:
- 25,000 will now be correctly handled as 25000
- Any empty spaces after a number will be automatically trimmed and handled correctly
Live Demo
There are four demos available:
- Google Currency Converter as module. It's the first module on the left.
- Google Currency Converter in content item - sample 1: using the default style with minimum width.
- Google Currency Converter in content item - sample 2: using the same style as the Google Finance.
- Google Currency Converter in content item - sample 3: using the one-line version
If you prefer to use the Currency Converter from Yahoo Finance as oppose to Google Finance, here it is:
Yahoo Currency Converter - AJAX version
Including this module in Content Item or Article
Since this is a standard Joomla module, you can easily include this module into a content item or article .
You can take a look at the demo here.
- For Joomla 1.0.x, please refer to:
How to include modules in Content item (for Joomla 1.0.x)? - For Joomla 1.5.x, 1.6.x, 1.7.x and 2.5.x, instructions as follows:
- Install the Modules Anywhere plugin: http://extensions.joomla.org/extensions/core-enhancements/embed-a-include/6402
- In your article, simply add the tag
- If you do not want the Google Currency Converter to appear anywhere in the module position
- You can make sure the module position is empty (i.e. don't select any module position)
- Or you can select Module Assignment to "No pages"
{module Google Currency Converter}
and the module will appear in your article!
Tips and Techniques
Download
Joomla 1.5.x: mod_googlecurrencyconverter_v1.5.9.zip
Joomla 1.6.x: mod_googlecurrencyconverter_v1.6.9.zip
Joomla 1.7.x: mod_googlecurrencyconverter_v1.7.9.zip
Joomla 2.5.x: mod_googlecurrencyconverter_v2.5.9.zip
How to install
- Download and install the "Google Currency Converter" module.
- Make sure the module is published / enabled.
- Select a module position where you want to place the module.
That's it! You're now ready to use the Google Currency Converter right inside your Joomla website!
Parameters
You can set the following in the Parameters page:
- Use which method to retrieve data: There are now three methods to retrieve data from Google Finance.
- The default method uses fread().
- You can also use file_get_contents(). Note that file_get_contents() is only available in PHP5 and above.
- Use the cURL library. For this method, you need to make sure your PHP has the cURL library installed.
- Currency From: This is the default "currency from" that will be displayed when the module is first loaded.
- Currency To: This is the default "currency to" that will be displayed when the module is first loaded.
- Label for Submit Button: Default is "Convert". You may change this to your language.
- Use CSS for highlight: When this is set to "No", result will be highlighted in the default yellow background. If you do not not like the default yellow background color and wish to change this to some other color, change this to "Yes". However, when you set this to "Yes", you need to define the color in the .css file of your template. Please see below for details.
- Layout style: There are three layout styles to choose from:
Use the default method fread() first. If it doesn't work, then try file_get_contents(), and then the cURL library.
Style 1: | This one has the minimum width, and is ideal when you are positioning it in the left or right column. |
Style 2: | This is the same layout as used in Google Finance. |
Style 3: | This one shows everything in one line. Ideal for use in top or bottom banner-type module position, or in content item. |
Styling the Module using CSS
You can set the style of every item within the Google Currency Converter to the exact format you want through CSS. This means that you can set the font family, font size, foreground and background color of the input field, pulldown menu, submit button, etc.
For example, if you're using the default Joomla 1.5 template, define the following style in <joomla root folder>/templates/rhuk_milkyway/css/template.css
. If you're using the default Joomla 1.0 template, define the following style in <joomla root folder>/templates/rhuk_solarflare_ii/css/template_css.css
.
- Input Box
- Submit Button
- The options of the pulldown menu (i.e. the list of currencies)
- The selected option of the pulldown menu (i.e. the selected currency)
- Input Label (the text "Convert" and "Into")
- The result
- The highlight for the result. Note: Don't forget to set the "Use CSS" to "Yes" in the Parameters page in order to change the background color of the highliglht.
- Use this if you wish to set the background color of the entire module block:
div.googlecurrency input.inputbox { font-family: Verdana; font-size: 12pt; font-style: italic; }
div.googlecurrency input.button { font-family: Verdana; font-size: 10pt; }
div.googlecurrency option { font-family: Verdana; font-size: 10pt; }
div.googlecurrency select { font-family: Verdana; font-size: 10pt; }
div.googlecurrency .input_label { font-family: Verdana; font-size: 12pt; }
div.googlecurrency .result { font-family: Verdana; font-size: 12pt; }
div.googlecurrency .highlight { color: #333366; background-color: #0033ff; }
div.googlecurrency { background: #33FF66; }
Version History
- v1.0.2 (for Joomla 1.0) and v1.5.2 (for Joomla 1.5)
Released August 28, 2008 - v1.0.4 (for Joomla 1.0) and v1.5.4 (for Joomla 1.5)
Released May 6, 2009 - v1.0.5 (for Joomla 1.0) and v1.5.5 (for Joomla 1.5)
Released May 7, 2009 - v1.0.6 (for Joomla 1.0) and v1.5.6 (for Joomla 1.5)
Released August 31, 2009 - v1.0.7 (for Joomla 1.0) and v1.5.7 (for Joomla 1.5)
Released May 16, 2010 - v1.0.8 (for Joomla 1.0), v1.5.8 (for Joomla 1.5), v1.6.8 (for Joomla 1.6) and v1.7.8 (for Joomla 1.7)
Released Dec 5, 2011 - Native version of the Google Currency Converter for Joomla 1.6 and 1.7!
- Addition of more than 30 new currencies by Google! View the list of new currencies here.
- v1.0.8 (for Joomla 1.0), v1.5.8 (for Joomla 1.5), v1.6.8 (for Joomla 1.6), v1.7.8 (for Joomla 1.7), v2.5.8 (for Joomla 2.5)
Released Jan 26, 2012
Bug Fix. When you set the default "currency from" and "currency to", in the parameters page, these options will now be correctly displayed in the frontend. Thanks to Pablo for pointing this out.
fixed the undefined variables in mod_googlecurrencyconverter_lib.php
Notice: Undefined index: process on line 12
Notice: Undefined index: a on line 21
Notice: Undefined index: process on line 22
Notice: Undefined index: use_css on line 44
Enable support for css styles for result.
Added support for retrieving google currency data using file_get_contents() or fread(). So for those people with no cURL library, you can now use the module using file_get_contents() or fread().
This is in response to the Morton's post titled "more than one google converters".
This new version allows you to display two or more google currency converters all on the same page, each with different currency_from and currency_to.
Native version of the Google Currency Converter for Joomla 2.5!
Comments
I want to use this plug in within an article. Can you tell me what the code is for joomla 1.7. I can't seem to see it anywhere!!
Sorry for the late reply.
For joomla 1.5, 1.6, 1.7 and 2.5, the easiest way to put the Google Currency Converter into the article is as follows:
1) Install the Modules Anywhere plugin
http://extensions.joomla.org/extensions/core-enhancements/embed-a-include/6402
2) In your article, simply add the tag
{module Google Currency Converter}
and the module will appear in your article!
3) If you do not want the Google Currency Converter to appear anywhere in the module position
a) You can make sure the module position is empty (i.e. don't select any module position)
b) Or you can select Module Assignment to "No pages"
Please give it a try and let me know if it works for you.
Regards,
/kksou
Sorry for the late reply. Not sure why your comment never reach me. (The system is supposed to send an alert to me everytime there's a new comment.)
I can see your point as very valid. I've thought about this earlier too. But I have some "user interface" issue.
1) I can add a global switch in the parameter area that allows administrator to set the number of decimals. However, for some currencies, it makes sense to ignore the decimals. But for currencies like Euro or USD, I think you will need at least 2 decimals. So global switch doesn't seem to work.
2) For the same currencies, some users prefer to ignore the decimals, while others will want to have precise decimals. So how do you cater for individual preference? cookies? individual settings for each currencies?
See, it becomes so complicated that I decide to use the KISS principle. Just like my other plugin, googleMaps, I decide to keep it simple. There are many other plugins and modules in joomla.org that provide users with very complicated settings. Will just let the users have the freedom of choice to pick the other they like.
Regards,
/kksou
Thanks in advance for your great work!
The google currency conversion is obtained from the following website:
http://www.google.com/finance/converter
As you can see, your currency is currently not provided by Google.
The Yahoo Currency Converter has a lot more currencies. But I just checked them:
http://finance.yahoo.com/currency-converter
Yahoo doesn't provide your currency too! So there's not much I can do because for both my modules, the conversion are done through Google or Yahoo.
Please keep checking with these two websites. If you see your currency appearing there, let me know and I'll add that to the module.
Regards,
/kksou
Thanks for a great extension. I was wondering twi things:
* Is it possible to make the minimum width layout even smaller, as it is bigger than the column width on my template?
* is it possible to have, instead of having "1" as the default value ("convert 1 USD into...."), another predefined value, like: "convert 85 USD into...")
Thanks a lot in advance
Ben
For (1), please refer to the following article: Google Currency Converter - changing the width of the pulldown currency menu
http://www.kksou.com/php-gtk2/Joomla-Tips-Techniques/Google-Currency-Converter-changing-the-width-of-the-pulldown-currency-menu.php
For (2): Edit the file: mod_googlecurrencyconverter_lib.php
in the folder: /modules/mod_googlecurrencyconverter
In line 60, you will see: if ($str_a=='') $str_a = '1';
Change '1' to whatever value you desired.
Let me know if the above works, ok?
Regards,
/kksou
Thank you for the great extention, I really like it a lot! I have a problem with the labels tough, as I use cyrillic symbols. On initial loading of the module everything is fine and the characters are displayed as they should be, but as I click the submit button and the calculation initiates, all labels become a huge mess of random symbols. I tried to convert all .php files in UTF-8 encoding but with no success. Do you have any idea why is this happening? You can try labelling for example the submit button to ??????? in order to see the result.
Thank you in advance for your answer!
Best regards,
Georgi
I'm trying to install into a j2.5x site. The basic free installer works, but I would like to remove that backlink.
thanks
Have just emailed you one more copy of the installer for the registered version.
Please give it a try one more time and let me know if it works, ok?
Regards,
/kksou
I removed the ALLOW_FURL_OPEN= OFF from my php.ini, but still don't see results
Thought you mentioned in your email that the free version works?
Regards,
/kksou
People have been using this module since 2008, and you're the first one that reported such an issue.
If you look at the source code, this is really a very light module. There's nothing in the code that writes to your disk space.
May I know how do you know that it's this module using that 870 mb of disk space? What is the filename of this 50MB? And where does it write to?
Also, it seems like you have been using this module and it works fine for earlier versions. Is the 2.5 version the only one giving the problem?
Regards,
/kksou
RSS feed for comments to this post