Google Currency Converter - AJAX version
Written by kksou   
Tuesday, 26 August 2008

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.)


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.6 (for Joomla 1.0) and v1.5.6 (for Joomla 1.5)
Released August 31, 2009

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().

Live Demo

There are four demos available:

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)
Prefer Yahoo Finance?

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 with the use of {mosloadposition} (for Joomla 1.0.x) or {loadposition} (for Joomla 1.5.x).

You can take a look at the demo here.

Download

How to install

  1. Download and install the "Google Currency Converter" module.
  2. Make sure the module is published / enabled.
  3. 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:

  1. 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.

    Use the default method fread() first. If it doesn't work, then try file_get_contents(), and then the cURL library.

  2. Currency From: This is the default "currency from" that will be displayed when the module is first loaded.
  3. Currency To: This is the default "currency to" that will be displayed when the module is first loaded.
  4. Label for Submit Button: Default is "Convert". You may change this to your language.
  5. 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.
  6. Layout style: There are three layout styles to choose from:
  7. Style 1 This one has the minimum width, and is ideal when you are positioning it in the left or right column.
    Goolge Currency Converter - Style 1
    Style 2 This is the same layout as used in Google Finance.
    Goolge Currency Converter - Style 2
    Style 3 This one shows everything in one line. Ideal for use in top or bottom banner-type module position, or in content item.
    Goolge Currency Converter - Style 3

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.

  1. Input Box
  2. div.googlecurrency input.inputbox {
    	font-family: Verdana;
    	font-size: 12pt;
    	font-style: italic;
    }
    
  3. Submit Button
  4. div.googlecurrency input.button {
    	font-family: Verdana;
    	font-size: 10pt;
    }
    
  5. The options of the pulldown menu (i.e. the list of currencies)
  6. div.googlecurrency option {
    	font-family: Verdana;
    	font-size: 10pt;
    }
    
  7. The selected option of the pulldown menu (i.e. the selected currency)
  8. div.googlecurrency select {
    	font-family: Verdana;
    	font-size: 10pt;
    }
    
  9. Input Label (the text "Convert" and "Into")
  10. div.googlecurrency .input_label {
    	font-family: Verdana;
    	font-size: 12pt;
    }
    
  11. The result
  12. div.googlecurrency .result {
    	font-family: Verdana;
    	font-size: 12pt;
    }
    
  13. 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.
  14. div.googlecurrency .highlight {
    	color: #333366;
    	background-color: #0033ff;
    }
    
  15. Use this if you wish to set the background color of the entire module block:
  16. 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
  • 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.

  • v1.0.4 (for Joomla 1.0) and v1.5.4 (for Joomla 1.5)
    Released May 6, 2009
  • 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

  • v1.0.5 (for Joomla 1.0) and v1.5.5 (for Joomla 1.5)
    Released May 7, 2009
  • Enable support for css styles for result.



User reviews   Average user ratings:    4.5   (from 7 users)
  1. ssnobben
    October 03, 2008 1:26am
    Like it a lot!

    This is a real nice converter with many options! Simple but nice and powerful.

    Good work as always kksou!!

  2. phil
    May 07, 2009 4:59pm
    Excellent!!!

    This is excellent. I just have one question that I hope you can help me with. I am using a template with a module box that is set as -box box-grey

    When I use the currenct converter the highlighted result makes it so that I cannot read the result. Please can you advise where I find the css to edit as per the instructions above.

    I cannot locate the css for the template that I am using (it's a JoomlaShine template).

    Please can you advise me where I can find this as I cannot locate it! I have checked all of the css files that I can find relating to my template.

    Your help would be greatly appreciated :)

  3. phil
    May 08, 2009 3:45pm
    Excellent Support Also :)

    Highly recommend this - very fast, really great support also provided by kksou

    Many thanks!!

  4. mahp
    June 11, 2009 3:29am
    Error

    What is it error:
    Google Currency Converter
    Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/searest/public_html/modules/mod_googlecurrencyconverter/mod_googlecurrencyconverter_lib.php on line 148

  5. El Severo
    July 21, 2009 4:10am
    Conflict with SlideShow Pro [J 1.5 Module]

    I've installed Google Currency Converter - AJAX version to one of my project web sites and if I enable this module the slide show doesn't work anymore [does not display the pictures / the module slide show module disappears].

    Does anybody knows how to fix this?

    Thank you!

  6. El Severo
    September 02, 2009 3:47am
    Conflict with SlideShow Pro [J 1.5 Module]

    Hi there,
    This J module rocks but could you please check to see the conflict between SlideShow Pro and Google Currency Converter ?

    Thank you!

  7. robert
    January 13, 2010 4:43am
    Nothing Happends?

    Nothing happends when i klick on Convert?
    Only the spider loads and loads and loads...
    Joomla 1.5.15, latest Google Currency Converter
    Is ther a fix?

Note: You have to be a registered member to leave a comment. Free registration here.

 
< Prev   Next >

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2009. kksou.com. All Rights Reserved