PDA

View Full Version : Universal Currency Converter Module


Graham
09-17-2004, 10:48 AM
Hi,

Need some help installing this module to my site, Iīve done the easy bit as you can see:
http://villasolrealestate.com/index.php?page=converter ,this is the input part, when you make a convert it then takes you the xe.com page which is the output. Its possible to show the output results in the same place by placing some code between the Header and Footer Variables! does anyone know what it would be? here are the installation instruction:

This is accomplished by adding two hidden variables to your page that will control the output page's "header" (everything above the currency conversion results) and "footer" (everything below). These tags should contain all of the HTML you would normally use to build a web page.

For example, the header variable should contain the <HTML>, <HEAD>, and <BODY> tags. In addition, the footer variable should contain the </BODY> and <HTML> tags. Stated another way, the header and footer tags taken together should comprise a valid HTML document.

The use of the header and footer variables is detailed below.

Header and Footer Variables
======================



<FORM METHOD=POST ACTION="http://www.xe.com/ucc/convert.cgi">

Beneath this line, cut and paste the following two lines:


<INPUT TYPE="hidden" NAME="Header" VALUE=" ">

<INPUT TYPE="hidden" NAME="Footer" VALUE=" ">



Here's what you need to know to use these variables properly:


The variable names "Header" and "Footer" are case-sensitive. Don't change this or the customization won't work.


The blank spaces between the quotes in the VALUE=" "> tags are where you put your header and footer HTML code. However, make sure you read the next step before you start coding..


Use square brackets instead of angle brackets inside the header and footer HTML code. The converter will automatically convert square brackets to angle brackets when generating output. If you don't replace the angle brackets in your form, you will your disrupt the hidden variable tags! (Right?)


To intentionally produce square brackets in the output page (i.e. to override the program's square-bracket-to-angle-bracket translation), preface the bracket character with a backslash (e.g. \[ yields [ ).


Don't use the " and ' characters in your HTML string. (They can cause problems as well.) For double quotes, use the sequence \DQ and use \SQ for the single quote character. The converter will automatically convert these codes to double and single quotes on the output page.


Don't forget that if you're referencing graphics on the results page, you'll have to use their full Internet URL path -- remember, the results page is generated by our server, but your graphics don't live here. In fact, you may want to consider using full absolute URL references in all your converter-related pages, just so you don't forget.

58sniper
09-17-2004, 01:23 PM
Basically, they're telling you you have to insert all of the HTML code from your vB page into those two variables. The result is that you still end up at their site, just with your code. I think they're on crack.

Personally, I'd find another solution, or maybe do something with an iframe. And BTW - that code they gave you has got to be some of the worst code I've ever seen. I hope you don't plan on trying to get it to validate (http://validator.w3.org/check?uri=http://villasolrealestate.com/index.php?page=converter) without a LOT of work.

Our Sponsors
 

Graham
09-17-2004, 02:19 PM
I wouldnīt know where to start by placing all the HTML and basically Donīt think it would work, The Iframe thing might be an idea but that would probably place there whole page in the module :(

Anyone have any more ideas or know of another Currency Converter out there?

58sniper
09-17-2004, 04:51 PM
Well, you could (theoretically), put that the code they gave you into an external html file, and put an iframe in the module that calls that page. It SHOULD then just bring up the results page in that iframe.

But like I said, if it we me, I'd try to find a better solution. The problem is that a LOT of those content "providers" use TERRIBLE code. Symantec, Trend Micro, etc. Trying to get it to validate is almost impossible.

Our Sponsors
 

diades
02-17-2005, 04:44 PM
Hi

With regard to Symantec, I have re-written the js file (now kept locally) that creates the markup for the virus feed to conform to w3c for xhtml (with the permission of Symantec) and also to conform with the style of the forum. If any one is interested I will post it.