Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

URL parameter integration
https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=3912
Page 1 of 1

Author:  ideenstart [ 5. Aug 2015, 18:26 ]
Post subject:  URL parameter integration

I hope what I need is possible ...

Our Wordpress site is called from another page with an URL that contains a parameter (zip code).
I need to hand over this parameter to an iframe-URL on my site.


To make it a bit more clearly:
An external website contains a form field where a zip code has to be entered.
If the URL matches, our WP website is opened in a new tab.
Our website gets called with an URL like this http://www.example.de/?zipcode=47800
So the zip code entered on the other website is handed over to us.

Our website contains a small iframe that starts some kind of order process.
The page inside the iframe contains a form, which first field is the zip code.
And the URL parameter has to be integrated into the iframe-URL, so this field inside the iframe can be prefilled with the zip code.

The "prefill" is not my problem - I just need to integrate the zip code URL parameter into the iframe URL.

For this iframe I didn't use the advance iframe license/plugin till now, cause I implemented it a long time ago and it just works fine so far ;-)
That's why the actual shortcode looks like this:
[iframe src="https://www.example.de/index.php?action=step1&calculator=gas" width="100%" height="237" scrolling="no"]

You see there are already 2 parameters in the iframe URL ("action" & "calculator").
The zip-code would be the third parameter.

How can I add this zip code URL parameter to the AIP iframe URL ?
How do I need to modify the shortcode ?

Any ideas ???

Thanks in advance!
Tom

Author:  TinyWebGallery [ 5. Aug 2015, 21:07 ]
Post subject:  Re: URL parameter integration

You simply need advanced iframe. There this is a normal feature (URL forward parameters) to pass parent parameters to the iframe.

Best, Michael

Author:  ideenstart [ 5. Aug 2015, 23:52 ]
Post subject:  Re: URL parameter integration

Hi Michael !

I know I need the pro version - it's already installed - I just said I didn't use it yet for THIS iframe ;-)

So I changed the shortcode to [advanced_iframe securitykey="mykey" src="https://www.example.de/index.php?action=step1&calculator=gas" width="100%" height="237" scrolling="no"]

But all trials of getting the URL integrated had failed - only due to a small mistyping ... :roll:
Like you know sometimes "sieht man den Wald vor Bäumen nicht" ;-)

This shortcode works like a charm: [advanced_iframe securitykey="mykey" src="https://www.example.de/index.php?action=step1&calculator=gas&zip={query-zip}" width="100%" height="237" scrolling="no"]

Thanks again for your ongoing work on this great plugin !!!

Kind regards
Tom

Author:  TinyWebGallery [ 6. Aug 2015, 00:06 ]
Post subject:  Re: URL parameter integration

:). Even url_forward_parameter="zip" should work...

Best Michael

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/