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 25. Nov 2024, 09:49

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  [ 4 posts ] 
Author Message
PostPosted: 11. Nov 2016, 19:16 
Offline

Joined: 11. Nov 2016, 19:11
Posts: 2
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.

This is not working for me, it only works for the 1st line in the code.
<script src="http://gibsonsflooring.com/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>
<script src="http://carpetsplus.in/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>
I have 100 websites, do I need to add 100 of these?


Top
 Profile  
 
PostPosted: 12. Nov 2016, 02:19 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
No - you can switch the communication to postMessage. Check the external workaround tab. In the pro version also there is a multisite switch. then a * is used that means that the domain of the message is not checked.
then you only need to include one ai_external.js if all have the same config. In 7.3 there is also a config switcher in the js folder where you could specify special configurations depending on a parameter. see js/ai_config_switcher_template.js.

Best,
Michael


Top
 Profile  
 
PostPosted: 14. Nov 2016, 18:38 
Offline

Joined: 11. Nov 2016, 19:11
Posts: 2
thanks for your reply :D

I am having trouble figuring out where to include the ai_external.js.. (((then you only need to include one ai_external.js if all have the same config.)))
I did this: ...(((you can switch the communication to postMessage. Check the external workaround tab. In the pro version also there is a multisite switch. then a * is used that means that the domain of the message is not checked.)))

I just want to add one iFrame to many different websites with different domain names and have auto-height work.


Top
 Profile  
 
PostPosted: 14. Nov 2016, 21:36 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Include it to the page in the iframe. Optimal before the </body> so a footer.php works fine.

Have you found the 2 settings on the advanced tab?

Here you find the examples for post message:
http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message

+
var domainMultisite = true;
in your case

But if you enable this is in the administration it is much easier.

Best, Michael


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 50 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