Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum https://www.tinywebgallery.com/forum/ |
|
I can not get the auto height to work https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4485 |
Page 1 of 1 |
Author: | jacruztin [ 16. Nov 2017, 20:14 ] |
Post subject: | I can not get the auto height to work |
Hi good day, I explain my problem. I have 3 websites where I want to place an iframe from another site owned by me. In this way: Site1 -> content site4 Site2 -> content site4 Site3 -> content site4 Reading the documentation (FAQ) I find this part that I could not do. Quote: If you want to use the same page in the iframe several times If you have one page you want to show inside several iframes you can do this on the same domain without any restrictions. But if you need to use the external workaround you need to configure this properly to get is work. First I explain the problem: If you have one WordPress installation your need to include the ai_external.js to the page in the iframe. If you now want to show this page in another WordPress installation you also need to include the ai_external.js from there. This means you have now 2 ai_external.js in your remote page. This is actually not a problem but has the following restriction: ai_external.js can be configured by variables you define before the script. And once the first ai_external.js is loaded, the variables are defined. This means that all ai_external.js files have the same configuration! The difference is the url where e.g. the height is sent to. Also only the css changes from the first ai_external.js are used and all scripts send with the same id. This means on all shortcodes you have to use the same id! This scenario works fine if you e.g. want to hide the same elements and use auto height. The small drawback is that the scripts not used currently send requests which don't do anything. I do not know how to do it I have this configuration at this moment, but only the first ai_external.js works. Code: <script> var updateIframeHeight = "true"; var hide_page_until_loaded_external = "true"; var write_css_directly = "true"; var resize_on_element_resize_delay = "100"; var iframe_id = "iframe1"; </script> <script src="https://www.autoscancun.com/wp-content/plugins/advanced-iframe/js/ai_external.js"></script> <script src="https://www.autosyucatan.com/yucatan/wp-content/plugins/advanced-iframe/js/ai_external.js"></script> The ai_external.js that is below does not work. In this case, there are only two sites that I am using as an example but I need that wordpress page to display the automatic height in 5 places. With the width there is no problem, only with the automatic height. I hope you can help me. regards |
Author: | TinyWebGallery [ 16. Nov 2017, 23:11 ] |
Post subject: | Re: I can not get the auto height to work |
Switch to postMessage in the configuration and enable multi site support. Then you only need to include ai_external.js once. Best, Michael |
Author: | jacruztin [ 17. Nov 2017, 02:04 ] |
Post subject: | Re: I can not get the auto height to work |
Excellent thank you very much |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |