Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
[bbcode] xe.com currency convertor (lite) Details »»
[bbcode] xe.com currency convertor (lite)
Version: 1.00, by alkatraz alkatraz is offline
Developer Last Online: Apr 2013 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 12-09-2004 Last Update: 12-09-2004 Installs: 5
 
No support by the author.

Not really a hack, but a quick solution to a problem I always have on my forums. If this shouldn't be here feel free to move it, I searched and didn't find anything that did any type of currency conversion.
*If anyone knows how to make the currency conversion automatic please create a full hack for it! (My coding knowledge is next to nothing) I've started the Modification Request for a full featured convertor.


Description:
My members are always asking "what's that in US dollars?" or "how much is $__ in Canadian dollars?" Someone will go to xe.com for them and post up the currency conversion.

Now you can use this bbcode to specify USD or CAN and it will display a link that will open a new window with the converted currency.

Currency conversion is done by XE on the fly so the rates are always acurate. XE.com is the most popular currency conversion site out there, to my knowledge.


Usage:

[CAD]18.49[/CAD] typed inside a post results in,

$18.49 CAD. [Convert to USD.]


Example:

I'm looking for [USD]15,000[/USD]

I'm looking for $15,000 USD. [Convert to CAD.]

* Click on the link, it opens a new window with the converted currency.


Installation:
Download the TXT document attached.
Just 2 BBCodes to add, should only take a minute
Please click Install if you use it.


Updates:
* Found a way to make link open a new window (not a popup) that calculates the currency without having to press the go button. Updated instructions.


Customization:
I've set this up for CAD to USD and USD to CAN, but you can put whatever currency codes you want.

You can either make additional bb codes for new currency codes or you simply replace the currency codes I've used. Just do a search and replace on instructions doc for "CAD" then "USD" and that should do it.

I've changed the code to open a new window with the currency already converted but you can change it so it opens a popup where some options can be changed. IE: with the popup, you can use a currency selector instead of the fixed currency selection.
Full instructions on XE's popup convertor:
http://www.xe.com/pca/customize.htm


Support:
It's a BB Code, there's nothing to support!


Suggestions
Post them here

There are so many possibilities for this script in the right hands. I'm not a programmer by any means, this is just a simple bbcode and I don't think there's much else I can do to this with my skill level.

I've started a modification request here for a much more integrated hack. Feel free to add to it, hopefully someone can help us out.

:up:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-10-2004, 07:25 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this adjust for any currency rate changes that come along?
Reply With Quote
  #3  
Old 12-10-2004, 07:27 AM
alkatraz alkatraz is offline
 
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 384
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup, the currency conversion is done by XE on the fly. XE.com is the most popular currency conversion site out there, to my knowledge.
Reply With Quote
  #4  
Old 12-10-2004, 07:43 AM
Mephisteus's Avatar
Mephisteus Mephisteus is offline
 
Join Date: Dec 2001
Location: The Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you use a popup blocker, this thing aint gonna work. Any way to work around that? Other then that, nice work. Maybe its an idea to have it submit the go button aswell. Work around the regular stuff, and make the code [xe=USD] so it is of more use. Or a drop down list thing instead of a simple link to convert to a currency

So many possibilities
Reply With Quote
  #5  
Old 12-10-2004, 07:49 AM
alkatraz alkatraz is offline
 
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 384
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So many possibilities in the right hands. I'm not a programmer by any means, this is just a simple bbcode and I don't think there's much else I can do to this with my skill level.

I've started a modification request here for a much more integrated hack. Feel free to add to it, hopefully someone can help us out.


Quote:
If you use a popup blocker, this thing aint gonna work. Any way to work around that? Other then that, nice work. Maybe its an idea to have it submit the go button aswell. Work around the regular stuff,
Yup popup blockers going to stop it. The xe.com convertor is a tool for webmasters they list on their website, there's other ways to integrate it but this is the only way that didn't require file coding. (which I'm not skilled enough to do)

Quote:
and make the code [xe=USD]
I thought of that idea too, but that would only specify the "from" currency option and not the "to" currency. You would have to program an if statement that would change both to and from based on the [xe=USD or CAD] option.

One solution to that would be to usd [cad=USD] and [usd=CAD] tags then you could have [cad=___] and put whatever 3 letter code in you wanted. Might add that later
Reply With Quote
  #6  
Old 12-10-2004, 09:08 AM
alkatraz alkatraz is offline
 
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 384
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

* Found a way to make link open a new window (not a popup) that calculates the currency without having to press the go button. Updated instructions.
Reply With Quote
  #7  
Old 12-13-2004, 01:51 AM
SuperGLS SuperGLS is offline
 
Join Date: Nov 2004
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good stuff. Definately good for worldwide car sites like mine.

I made some easy changes to include KRW (Korean Won) to USD and AUD (Australian dollars) to USD.

Thanks.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:32 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04561 seconds
  • Memory Usage 2,259KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete