Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
ort_currency_convert: Currency converter
This is a tiny plugin that allows you to convert an amount of money from one currency to another.
The exchange rate is obtained live from http://www.webservicex.net//CurrencyConvertor.asmx (there’s a test page here – look down for “Test”).
The plugin was developed by Juan Tommasone and updated by Alan Tafel , both students in the Instituto de Tecnología ORT for the course Seminario de Tecnología y Aplicaciones where I teach.
You can download the plugin here
Documentation can be found in the Resources site
Last edited by baby (2008-11-24 06:59:06)
Mariano Absatz – El Baby
I don’t suffer from insanity. I enjoy every minute of it.
Offline
#2 2007-12-27 01:11:53
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: ort_currency_convert: Currency converter
Mariano, Juan Tommasone
More interesting work! Seems to do the underlying conversion fine.
A couple of thoughts on implementation of the test page and results…
- Typing in an unknown currency symbol leads to a confusing error message. Might be useful to either validate the input symbol or format a more informative error message if any arises.
- A good result leads to browser-handled XML output. Whilst this is fine for the plugin it leads to results that look out-of-character (so to speak) for the rest of the page.
Regards,
— Steve
Offline
Re: ort_currency_convert: Currency converter
net-carver wrote:
- Typing in an unknown currency symbol leads to a confusing error message. Might be useful to either validate the input symbol or format a more informative error message if any arises.
- A good result leads to browser-handled XML output. Whilst this is fine for the plugin it leads to results that look out-of-character (so to speak) for the rest of the page.
I don’t understand exactly what you mean by this… I could easily add class & wraptag if you think that would help…
WRT the error handling, I’ll try to add it (though I’m leaving on vacation and will probably not be able to do it before mid-January.
Mariano Absatz – El Baby
I don’t suffer from insanity. I enjoy every minute of it.
Offline
#4 2007-12-28 06:25:56
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: ort_currency_convert: Currency converter
baby wrote:
I don’t understand exactly what you mean by this
If you go to the demonstration page you posted and put a non-existent currency in — say GPB instead of GBP — you’ll see.
I’m simply suggesting that if this were made into a public facing service, the large error message (which seems to have a lot of debug info in it) be pruned down to one line. Something like ‘Unknown currency: GPB’ might be better.
— Steve
Offline
#5 2008-10-26 09:19:24
- Jaro
- Member
- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: ort_currency_convert: Currency converter
Is it possible to modify the plugin to use only 2 numbers after the decimal point? So instead of 12.123 USD it would show only 12.12 USD?
Offline
Re: ort_currency_convert: Currency converter
Will look into it (as well as net-carver’s zillion years old report)…
Thanx
Mariano Absatz – El Baby
I don’t suffer from insanity. I enjoy every minute of it.
Offline
Re: ort_currency_convert: Currency converter
ort_currency_convert version 1.1-r460 is available for download
With the help of Alan Tafel (another student), we incorporated net-carver’s suggestion about error handling and added support for a new precision attribute to control the precision of the result as per Jaro’s request. The default value for precision is 2.
Regards.
Last edited by baby (2008-11-24 07:47:23)
Mariano Absatz – El Baby
I don’t suffer from insanity. I enjoy every minute of it.
Offline
Re: ort_currency_convert: Currency converter
Could you post an example implementation?
Offline