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

AI Standalone unclear dox
https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4501
Page 1 of 1

Author:  marcverkade [ 19. Dec 2017, 06:35 ]
Post subject:  AI Standalone unclear dox

Hai Michael,

I have read the standalone external workaround docs over and over again and am not sure what to do...
Do I need both the .js AND the .php settings files or only one of the 2?

IN the docs you talk about a .js file but then supply a .php file...
Both have different variable names like keepOverflowHidden and keep_overflow_hidden or iFrame_id or id...
I am lost again...

Auto height using the external workaround
This example shows how the external workaround is used with the standalone version. One important difference to the Wordpress version is the usage of the external workaround. In the wordpress version the ai_external is generated with the settings from the database while for the standalone version the file standalone-ai_external.js has to be used and the configuration has to be made before you include the file! Examples of the external workaround can also be found for Wordpress here. The following features are shown:

The following page is included: ../example/example_standalone.html
Auto height on a different domain
Modification of the css on a different domain. Only #iframe-right is shown and the text color was changed.
Resize on element resize on a different domain
The settings file is: standalone-advanced-iframe-settings4.php

$iframeStandaloneOptions = array(
'id' => 'advanced_iframe',
'name' => 'advanced_iframe',
'scrolling' => 'no',
'width' => '950',
'height' => '200px',
'src' => '../example/example_standalone.html',
);
The settings for the external workaround are stored in a file called: standalone-ai_external_config_4.js

var iframe_id="advanced_iframe";
var updateIframeHeight = "true";
var keepOverflowHidden = "false";
var hide_page_until_loaded_external = "true";
var onload_show_element_only = "#iframe-right";
var iframe_content_id = "#iframe-right";
var iframe_content_styles = "float:none;height:auto;color:#ff0000;";
var resize_on_element_resize = "#iframe-right";
var resize_on_element_resize_delay = "50";
var domain_advanced_iframe = '../';
This is the code you need to include into your external file:

<script src="../standalone/standalone-ai_external_config_4.js"></script>
<script src="../standalone/standalone-ai_external.js"></script>

Author:  TinyWebGallery [ 19. Dec 2017, 18:52 ]
Post subject:  Re: AI Standalone unclear dox

The standalone version has an example page in the folder you can simply use as a template. There are 5 or so examples present.

Don't mix attributes from the shortcode ( keep_overflow_hidden ) with javascript (keepOverflowHidden ) variables!

The javascript variables you need are all documented on the external workaround tab -> show me all the parameters! There is a full list.

Best, Michael

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