Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 23. Nov 2024, 03:14

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 24. Apr 2015, 19:31 
Offline
User avatar

Joined: 13. Apr 2015, 18:55
Posts: 52
Hai Michael,

I am struggling with the map_parameter_to_url feature of advanced iFrame.
I have read the helpfile and I am sure this is what i need, but I do not understand how to do what I need.

For example:
The main site is available at www.mysite.com
The iFrame at this page is pointing to www.myiframesite.com

Now I want to use a parameter to extend the iFrame source URL so I can navigate dynamically to URL in the iFrame.

For example, when I enter www.mysite.com?extra=shoppingcart
The page www.mysite.com is loaded but I want the iFrame on this page to point to www.myiframesite.com/shoppingcart

I thought I could do this by 'specifying only 1 parameter' as mentioned in the help...
show=http%3A%2F%2Fwww.myiframesite.com%2Fparam=extra
But how to add this as shortcode to Advanced iFrame?
Can you be so kind to provide the correct shortcode to do this.

p.s. In general I find the help information as provided by Advanced iFrame very difficult to understand, but that is probably just me...

From the helpfile : Map parameter to url
You can map an url parameter value pair to an url or pass the url directly which should be opened in the iframe. If you e.g. have a page with the iframe and you like to have different content in the iframe depending on an url parameter than this is the setting you have to use. You have to specify this setting in the following syntax "parameter|value|url" e.g. "show|1|http://www.tinywebgallery.com". If you than open the parent page with ?show=1 than http://www.tinywebgallery.com is opened inside the iframe. You can also specify several mappings by separating them by ','. You can also only specify 1 parameter here! The value of this paramter is than used as iframe url. e.g. show=http%3A%2F%2Fwww.tinywebgallery.com%3Fparam=value. You need to encode the url if you pass it in the url. Especially ? (%3F) and & (%26)! Please note that because of security reason only whitelisted chars [a-zA-Z0-9/:?&.] are allowed. Encoded parameters in the passed urls are not supported because all input is decoded and checked. If no parameter/value pair does match the normal src attribute of the configuration is used. Shortcode attribute: map_parameter_to_url=""

_________________
Greetings from sunny Curaçao!


Top
 Profile  
 
PostPosted: 24. Apr 2015, 20:15 
Offline
User avatar

Joined: 13. Apr 2015, 18:55
Posts: 52
Hai Michael,

I made some progress...

I tried this iFrame code in the page http://webshop.extravestiging.nl/extravestiging-webshop :
[advanced_iframe securitykey="mykey" use_shortcode_attributes_only="true" src="http://webshop.extravestiging.nl/webshop/" width="100%" height="600" scrolling="no" id="EVWebshop" name="EVWebshop" url_forward_parameter="ALL" hide_page_until_loaded="true" show_iframe_loader="true" auto_zoom="same" enable_responsive_iframe="true" onload_resize="true" onload_resize_delay="200" map_parameter_to_url="page" add_iframe_url_as_param="same"]

I have added the following shortcodes as found in Example 32.
map_parameter_to_url="page"
add_iframe_url_as_param="same"

Somehow, the 'src' URL is not added to the page and the URL below fails with an 404:
http://webshop.extravestiging.nl/extravestiging-webshop?page=assortiment/extravestiging-brood
I thought this should map the iFrame URL to http://webshop.extravestiging.nl/webshop/assortiment/extravestiging-brood

But when I specify the complete URL, it does work:
http://webshop.extravestiging.nl/extravestiging-webshop/?page=http://webshop.extravestiging.nl/webshop/assortiment/extravestiging-brood

Any clue why i have to specify the complete URL and why the original source URL is not added/prefixed?

Next I tried to use the remote feature (Example 33)
I added these shortcodes:
map_parameter_to_url="page"
add_iframe_url_as_param="remote"
add_iframe_url_as_param_prefix="webshop.extravestiging.nl/webshop/"

it seems that add_iframe_url_as_param_prefix is not working here since it is not added as a prefix of the page-variable.
The URL below fails with a 404.
http://webshop.extravestiging.nl/extravestiging-webshop?page=assortiment/extravestiging-brood

But again specifying the complete URL is working.
http://webshop.extravestiging.nl/extravestiging-webshop/?page=http://webshop.extravestiging.nl/webshop/assortiment/extravestiging-brood

What am i doing wrong here? I want the URL http://webshop.extravestiging.nl/extravestiging-webshop?page=assortiment/extravestiging-brood to work and let the iframe point to
http://webshop.extravestiging.nl/webshop/assortiment/extravestiging-brood

The current shortcode on the page is now set to 'remote' with the parameter add_iframe_url_as_param_prefix="webshop.extravestiging.nl/webshop/" added.

As said, I am really trying here but find the documentation a bit hard to understand...

Regards, Marc

_________________
Greetings from sunny Curaçao!


Top
 Profile  
 
PostPosted: 26. Apr 2015, 21:31 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Mapping
www.mysite.com?extra=shoppingcart
to
www.myiframesite.com/shoppingcart

is not supported. With this feature you can only map one parameter to another like
www.mysite.com?extra=shoppingcart

www.myiframesite.com/?extra=shoppingcart
or
www.myiframesite.com/?extranew=shoppingcart

Your feature would have to be implemented.

Best, Michael


Top
 Profile  
 
PostPosted: 28. Apr 2015, 15:35 
Offline
User avatar

Joined: 13. Apr 2015, 18:55
Posts: 52
Oh, bummer...

I think it would be a nice feature to have since you can make the webpages dynamic in the iFrame woudn't you think so?
Can you add this as a 'feature request'?

For now I have to stick with the full URL for now and hope you find time to implement this.
http://webshop.extravestiging.nl/extravestiging-webshop/?page=http://webshop.extravestiging.nl/webshop/assortiment/extravestiging-brood

Regards, Marc

_________________
Greetings from sunny Curaçao!


Top
 Profile  
 
PostPosted: 28. Apr 2015, 16:04 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I have already extended the src attribute for 6.4 a lot.
there you can use:

- {site}: the url to the wordpress root
- {host}: the current host from the request
- {port}: the current port from the request
- {userid}: the id of the current user
- {username}: the username of the current user
- {useremail}: the e-mail of the current user
- {adminmail}: the e-mail of the wordpress admin
- {userinfo-X}: extract attribute X from get_currentuserinfo. E.g. {userinfo-display_name}. See here for details.
- {usermeta-X}: extract key X from get_user_meta. E.g. {usermeta-last_name}. See here for details.
- {urlpathX}: the Xth path element from the front. The first path element would be {urlpath1}
- {urlpath-X}: the Xth path element from behind. The last path element would be {urlpath-1}

So query-X would be another option.

Best, Michael


Top
 Profile  
 
PostPosted: 28. Apr 2015, 16:18 
Offline
User avatar

Joined: 13. Apr 2015, 18:55
Posts: 52
Hai Michael,

I see, but this will be translated in the shortcode and thus will be static for that page.
It would be nice that you can deeplink the iFrame using a parameter in the main page URL.

iFrame_URL_parameter="page"
iFrame_URL_root_url="http://www.my-iframe-domain.com/"

When the main page is called like 'www.mydomain.com?page="assortiment-bread"'
The src translates in http://www.my-iframe-domain.com/assortiment-bread

or... When iFrame_URL_root_url is not set:"
Call the page like 'www.mydomain.com?page="http://www.my-iframe-domain.com/assortiment-bread"'
But this is already possible...

Hope this can make 6.4...
Regards, Marc

_________________
Greetings from sunny Curaçao!


Top
 Profile  
 
PostPosted: 28. Apr 2015, 16:25 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I know. this is why I have written query-X would be an option. so you could e.g. use {query-page} in the url.
But if this would be a feature for 6.5 as 6.4 is already feature complete right now.

Best, Michael


Top
 Profile  
 
PostPosted: 28. Apr 2015, 16:33 
Offline
User avatar

Joined: 13. Apr 2015, 18:55
Posts: 52
Aha, that is what you meant.
That would be great, for now I am rescued and will wait for 6.5
Thanx for all your hard work!
Regards, Marc

_________________
Greetings from sunny Curaçao!


Top
 Profile  
 
PostPosted: 16. Jun 2015, 18:49 
Offline

Joined: 15. Jun 2015, 06:34
Posts: 3
I just wanted to add my +1 to this. I am looking for this exact same feature for my project and would love to see it implemented.


Top
 Profile  
 
PostPosted: 16. Jun 2015, 23:57 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Please check 6.4. I have already included this in the final pro version of 6.4.

Best, Michael


Top
 Profile  
 
PostPosted: 10. Aug 2015, 19:09 
Offline
User avatar

Joined: 13. Apr 2015, 18:55
Posts: 52
Hai Michael,

Thanx for the feature, this rocks!

map_parameter_to_url="page" add_iframe_url_as_param="remote" add_iframe_url_as_param_prefix="examples.tinywebgallery.com/example33/"
regards, Marc

_________________
Greetings from sunny Curaçao!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 46 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy