Example #1
0
    A copy of the license is in the root folder of this plugin.

    See README.HTML for installation info.
    See CHANGELOG.HTML for a history of changes.
*/
// ====( Version Info )
$g2ic_version_text = '3.0.3';
$g2ic_version_array = array(3, 0, 3);
// ====( Initialization Code )
require_once 'init.php';
session_start();
g2ic_get_request_and_session_options();
list($g2ic_album_info, $g2ic_gallery_items) = g2ic_get_gallery_items();
$g2ic_imginsert_options = g2ic_get_imginsert_selectoptions();
// ====( Main HTML Generation Code )
echo g2ic_make_html_header();
echo '        <table>' . "\n";
echo '            <tr>' . "\n";
echo '                <td width="200px" valign="top">' . "\n";
echo g2ic_make_html_album_tree($g2ic_options['root_album']);
echo '                </td>' . "\n";
echo '                <td valign="top">' . "\n";
echo '                    <div class="main">' . "\n";
if ($g2ic_options['wpg2_valid']) {
    echo g2ic_make_html_wpg2_album_insert_button();
}
if ($g2ic_options['drupal_g2_filter']) {
    echo g2ic_make_html_drupal_album_insert_button();
}
if (empty($g2ic_gallery_items)) {
    echo g2ic_make_html_empty_page();
Example #2
0
/**
 * Initialize the emedded functions of Gallery2
 *
 * Exit on Fatal Error
 *
 * @param array $option The GalleryEmbed options array
 * @param boolean $embedded_mode Whether to perform embedded GalleryEmbed init, or standalone init.
 */
function g2ic_init($option, $embedded_mode)
{
    // Initialise GalleryAPI
    if ($embedded_mode) {
        $error = GalleryEmbed::init(array('g2Uri' => $option['g2Uri'], 'embedUri' => $option['embedUri'], 'fullInit' => true));
    } else {
        $error = GalleryEmbed::init(array('g2Uri' => $option['g2Uri'], 'embedUri' => $option['g2Uri'], 'fullInit' => true));
    }
    if ($error) {
        print g2ic_make_html_header();
        print T_('<h3>Fatal Gallery2 error:</h3><br />Here\'s the error from G2:') . ' ' . $error->getAsHtml() . "\n";
        print "</body>\n\n";
        print "</html>";
        die;
    }
    return;
}