Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum https://www.tinywebgallery.com/forum/ |
|
use the same iframe Page on different parent pages https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4029 |
Page 4 of 4 |
Author: | TinyWebGallery [ 21. May 2018, 01:18 ] |
Post subject: | Re: use the same iframe Page on different parent pages |
if you change something to https then you should change everything to https. You can mix this but then you really have to know all the restrictions and how to deal with this. Best, Michael |
Author: | pferdetermine [ 21. May 2018, 10:23 ] |
Post subject: | Re: use the same iframe Page on different parent pages |
I cannot change both websites to https - but why is the content_id and the elements to measure now ignored? How does your plugin handle this now? There must be something different why this goes wrong now. On mobile (iphone) I see the right height - but the WHOLE website is shown and not only the entry-content-class.... ![]() |
Author: | TinyWebGallery [ 21. May 2018, 22:54 ] |
Post subject: | Re: use the same iframe Page on different parent pages |
The whole external workaround is not working as you now mix http and https! As I have said you can do this but you have to really know what you are doing: I have a working example here: http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message#e53 The main problem is that the ai_external.js cannot be loaded because of security reasons if the page is https but the ai_external.js comes from a http page! Best, Michael |
Author: | pferdetermine [ 21. May 2018, 23:16 ] |
Post subject: | Re: use the same iframe Page on different parent pages |
I am a little confused by the documentation: Where do I put the script-part? In the ai_external.js? Today I have only the variables there without the <script>... ? |
Author: | pferdetermine [ 21. May 2018, 23:45 ] |
Post subject: | Re: use the same iframe Page on different parent pages |
The documentation says: Make all settings you like and copy the ai_external.js to your https site --> My ai external looks now as follows and is on https-site (Pferdetermine.de) in the customs-folder: Code: var iframe_id= "pferdetermine"; var updateIframeHeight = "true"; var keepOverflowHidden = "false"; var enable_responsive_iframe = "true"; var hide_page_until_loaded_external = "true"; var onload_show_element_only=".entry-content"; var element_to_measure=".entry-content"; var iframe_hide_elements="#header,.entry-header,.tc-header,.tc-header.clearfix.row-fluid.tc-tagline-on.tc-title-logo-on.tc-shrink-on.tc-menu-on.logo-left.tc-second-menu-in-sn-before-when-mobile,.site-title,.tc-reset-margin-top,.navbar-wrapper,.container outside,.site-description"; /* new*/ var usePostMessage = true; /* This is the difference to example 51 */ var jquery_path = 'jquery.min.js'; var resize_path = 'jquery.ba-resize.min.js'; Copy advanced-iframe/includes/scripts/jquery.min.js to your https site IF you don't have jQuery in the page in the iframe --> That file already exists on the https site... or is it not identical to the one from the http site and do I have to replace it? Copy advanced-iframe/includes/scripts/jquery.ba-resize.min.js to your https site IF you use "resize on element resize" --> That file already exists on the https site... or is it not identical to the one from the http site and do I have to replace it? Include ai_external.js not like described on the "external workaround" tab but directly from your https site --> I have this code now in my https-site-page: Code: <script> var iframe_id= "pferdetermine"; var updateIframeHeight = "true"; var keepOverflowHidden = "false"; var enable_responsive_iframe = "true"; var hide_page_until_loaded_external = "true"; var onload_show_element_only=".entry-content"; var element_to_measure=".entry-content"; var iframe_hide_elements="#header,.entry-header,.tc-header,.tc-header.clearfix.row-fluid.tc-tagline-on.tc-title-logo-on.tc-shrink-on.tc-menu-on.logo-left.tc-second-menu-in-sn-before-when-mobile,.site-title,.tc-reset-margin-top,.navbar-wrapper,.container outside,.site-description"; var usePostMessage = true; var jquery_path = 'jquery.min.js'; </script> <script src="https://pferdetermine.de/wp-content/plugins/advanced-iframe-custom/ai_external.js"></script> It still does not work.... what am I doing wrong? Which part is needed in the ai_external.js and which one on the iframe page? I did the changes for this page: http://www.petra-koepcke.de/termine-reitkurse/ |
Author: | pferdetermine [ 22. May 2018, 00:32 ] |
Post subject: | Re: use the same iframe Page on different parent pages |
Sorry - the ai_external.js obviously looks different. Corrected that one. Now the entry-content ist displayed but I get this error message: ai_external.js:339 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://pferdetermine.de') does not match the recipient window's origin ('http://www.petra-koepcke.de'). resizeLater_pferdetermine @ ai_external.js:339 (anonymous) @ ai_external.js:252 setTimeout (async) aiExecuteWorkaround_pferdetermine @ ai_external.js:252 load (async) addOnloadEvent @ ai_external.js:504 (anonymous) @ ai_external.js:845 and the height is still too small.... Any ideas why? |
Author: | TinyWebGallery [ 22. May 2018, 09:26 ] |
Post subject: | Re: use the same iframe Page on different parent pages |
https://pferdetermine.de/termine-petra-koepcke/ does not contain ai_external.js. so both of your sites are wordpress sites where the plugin is installed? this makes it actually easier as ai_external.js does already exist there. ai_external.js:339 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://pferdetermine.de') does not match the recipient window's origin ('http://www.petra-koepcke.de'). is because you have not set var domainMultisite = true; like shown in my example. you also have to enable this in the administation of your http site because in your ai_external.js you have a wrong domain as the ai_external.js you have generated is not the right one. I also think you don't need var jquery_path = 'jquery.min.js'; var resize_path = 'jquery.ba-resize.min.js'; as you have installed the plugin on the other site as well and jquery is there also. Best, Michael |
Author: | pferdetermine [ 22. May 2018, 20:28 ] |
Post subject: | Re: use the same iframe Page on different parent pages |
I thought that I do not have to do anything inside the admin-part of the plugin... besides saving the settings??? Do I understand you correctly that I have to use now some of the settings in the external workaround of the website petra-koepcke, save the settings.... and then I need to copy that ai_external-file to the https website ? - or not? And in which folder do I have to save it? In the original js-folder and overwrite the original version from the https-website with the new one from the http-website??? or in the customs-folder of the plugin? I get a little mixed up because I have three different files now: two ai_external.js and one config-file that was in the custom-folder of the https-website. I added the var domainMultisite=true on the page inside the script-part - but this did not change a thing up to now (I thought that I do not need that one, because I do not use wp-multisite). so the issue probably is that I still am confused where to get which ai_external from and where to put which version ![]() Can you clarify and help - too confusing for me. I apologize for these stupid questions! |
Author: | TinyWebGallery [ 22. May 2018, 22:28 ] |
Post subject: | Re: use the same iframe Page on different parent pages |
Hi, Normally you don't have 2 ai_external.js. You have the one generated on your parent page. But if you mix http and https the https page the browser is not allowed to load the http js file from a https page. Therefore it makes most sense to configure everything in the administration and use the ai_external.js on the https site. Therefore you can copy this file anywhere on your https page. And before that the configuration file. if you use the ai_external.js from the https site you have to configure everything in the config file (because you can overwrite all settings with this). Then it is important that you enable multi site as in your ai_external.js from the https the https is hardcoded in the file. Best, Michael |
Page 4 of 4 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |