Esempio n. 1
0
 public static function outputGallery($gallery, $ignoreQuery = false)
 {
     global $LANG, $i18n_gallery_pic_used;
     include_once GSPLUGINPATH . 'i18n_gallery/helper.php';
     if (function_exists('i18n_load_texts')) {
         i18n_load_texts('i18n_gallery');
     } else {
         i18n_merge('i18n_gallery', substr($LANG, 0, 2)) || i18n_merge('i18n_gallery', 'en');
     }
     $pic = @$gallery['pic'];
     if (!$ignoreQuery && isset($_GET['pic']) && !$i18n_gallery_pic_used) {
         if (strpos($_GET['pic'], ':') === false) {
             $pic = intval($_GET['pic']);
             $i18n_gallery_pic_used = true;
         } else {
             if (substr($_GET['pic'], 0, strrpos($_GET['pic'], ':')) == $gallery['name']) {
                 $pic = intval(substr($_GET['pic'], strrpos($_GET['pic'], ':') + 1));
                 $i18n_gallery_pic_used = true;
             }
         }
     }
     $plugins = i18n_gallery_plugins();
     $plugin = @$plugins[$gallery['type']];
     if ($plugin) {
         call_user_func_array($plugin['content'], array($gallery, $pic));
     }
 }
Esempio n. 2
0
                    $name = @$_POST['post-name'];
                } else {
                    $msg = i18n_r('i18n_gallery/SAVE_FAILURE');
                }
            }
        } else {
            $gallery = return_i18n_gallery(@$_GET['name']);
        }
    }
}
$settings = i18n_gallery_settings();
$w = intval(@$settings['adminthumbwidth']) > 0 ? intval($settings['adminthumbwidth']) : I18N_GALLERY_DEFAULT_THUMB_WIDTH;
$h = intval(@$settings['adminthumbheight']) > 0 ? intval($settings['adminthumbheight']) : I18N_GALLERY_DEFAULT_THUMB_HEIGHT;
$viewlink = function_exists('find_i18n_url') ? find_i18n_url('index', null) : find_url('index', null);
$viewlink .= (strpos($viewlink, '?') === false ? '?' : '&') . 'name=' . $name . '&preview-gallery';
$plugins = i18n_gallery_plugins();
$plugins = subval_sort($plugins, 'name');
// default gallery type
if (!@$gallery['type']) {
    $gallery['type'] = @$settings['type'] ? $settings['type'] : I18N_GALLERY_DEFAULT_TYPE;
}
?>
		<h3 class="floated" style="float:left"><?php 
$name ? i18n('i18n_gallery/EDIT_HEADER') : i18n('i18n_gallery/CREATE_HEADER');
?>
</h3>

		<div class="edit-nav" >
      <p>
<?php 
if (count($languages) > 0) {