Advanced iFrame Pro Standalone

Overview

This is the standalone version of the Advanced iFrame Pro. It has all main features like the Wordpress version but can be used without a Wordpress installation. The configuration of Wordpress with the administration backend and the use of shortcodes moved into a settings file.

Please read the quick start guide at: documentation/Advanced iFrame Pro attribute help.htm
You find also all available settings there!

Requirements

Installation

Upload the content of this zip file anywhere to your webserver and keep the current structure of the zip file. The additional files you need for the standalone version are in the folder "standalone":

Usage

To include the iframe to you page you first have to include the following scripts : e.g.
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="../js/ai.js"></script>
Then include the file 'standalone-advanced-iframe.php' at the place you want to include the iframe
include 'standalone-advanced-iframe.php';

This creates an iframe with the settings found in standalone-advanced-iframe-settings.php.

There are 2 additional settings you can set:

If you used lazy loading you need to include the scripts before you include standalone-advanced-iframe.php because an additional jQuery plugin is loaded dynamically and jQuery has to be loaded before. Also make sure that you only include jQuery once!

e.g.

$site_url = 'http://www.yourdomain.com/path-to-advanced-iframe-parent-folder/advanced-iframe';
$ai_settings_file = 'standalone-advanced-iframe-settings2.php';
include '../../advanced-iframe/standalone/standalone-advanced-iframe.php';

All possible settings are listed at Advanced iFrame Pro attribute help.

You can use any of the examples of the pro demo. Simply use the shortcode attributes without the security_code and the use_shortcode_only. For examples how to use the external workaround please see the next section!

Working examples can be found at standalone-example.php. Please check the source of this page for details.

External workaround

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!
So please check especially "How to configure the workaround to work with different settings for different iframes" -> Show me the parameters. It is important that the variable domain_advanced_iframe which points to the root of the plugin has to be set! The following example enables the auto height and keeps the iframe hidden until fully loaded:
var domain_advanced_iframe = 'http://www.yourdomain.com/advanced/iframe/root';
var updateIframeHeight = 'true';
var hide_page_until_loaded_external = 'true';
<script src="http://www.yourdomain.com/path/standalone/standalone-ai_external.js"></script>

The recommended way to set the variables, is to place them into a seperate config file and include dem before the script. Than you are able to change the settings from your system anytime. This would then e.g. look like this:

<script src="http://www.yourdomain.com/path/standalone/standalone-ai_external_config_4.js"></script>
<script src="http://www.yourdomain.com/path/standalone/standalone-ai_external.js"></script>

Using the alternative way by using standalone-ai_external.js?configid=4 does also work but than the config file has to be in the main directory of the plugin.

Working examples can be found at standalone-example.php. Please check the source of this page for details.

Area selector

Advanced iframe pro also has an included area selector for the "Show only a part of the iframe" feature
includes/advanced-iframe-area-selector.html
Please ignore the warnings that you should open the file in Wordpress. The attributes in the shortcode you see there can be used 1:1 in a settings file!

More help

This file does contain the basic information how to use the plugin standalone. For more information please check the following sources:

Have fun using Advanced iFrame Pro
Michael