Could really do with ability to expose to block administration. Have also tried putting this into views without success.

CommentFileSizeAuthor
#3 currency-335866-2.patch8.17 KBchaps2
#2 currency-335866.patch7.87 KBchaps2

Comments

kbahey’s picture

Status: Active » Closed (duplicate)
chaps2’s picture

Version: master » 6.x-1.x-dev
Component: Miscellaneous » Code
Status: Closed (duplicate) » Needs work
StatusFileSize
new7.87 KB

Here's a basic views 2 implementation. It's designed to show current exchange rates rather than act as a conversion form although that functionality could be fairly easily added.

As ever with views you get great flexibility. Both "from" and "to" currencies can be set as either arguments or filters. Filters can be used to display a set list of exchange rates or exposed to allow user selection of currencies. You can even have mutliple "from" currencies and multiple "to" currencies and use the grouped table display for a handy lookup. Obviously you can create as many block views as you like.

It uses the currency_api_convert function for all exchange rate lookups so the update frequency setting is respected.

Andy

chaps2’s picture

StatusFileSize
new8.17 KB

New patch with a couple of tweaks to a) pick up currency arguments set using php and b) display the currency name in argument title substitution.

kbahey’s picture

Status: Needs work » Fixed

Committed to the -dev version.

Should be in the downloadable tarball in about 9 hours from now.

Please test and re-open the issue if there are still problems.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

theorichel’s picture

Well I have installed it, but is there supposed to bne a block view in the Views list or should I create one from scratch (in that case I have failed, the block just doesnt appear). Is there some Views code for this block that I coud import?

Much obliged,
thanks

Theo Richel