Airtight Interactive for NextGEN Gallery. Go to Gallery->FlashViewer to change the options. Author: Boris Glumpler Author URI: http://travel-junkie.com/ Version: 1.2 Copyright 2008 by Alex Rabe & Airtight Interactive & Boris Glumpler This script is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA **************************************************************************** **************************************************************************** SimpleViewer/TiltViewer/Autoviewer may be used in any kinds of personal and/or commercial projects. Please ensure that the SimpleViewer/TiltViewer/Autoviewer download link in the bottom right corner is clearly visible. SimpleViewer/TiltViewer may not be redistributed or resold to other companies or third parties. Specifically, SimpleViewer/TiltViewer/Autoviewer may not be redistributed as part of a content management system or online hosting solution See more at http://www.airtightinteractive.com/ */ //################################################################# // Stop direct call if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die(__('You are not allowed to call this page directly.', 'nggflash')); } if (!class_exists('nggflashloader')) { class nggflashloader { function nggflashloader() { // Get some constants first $this->define_constants(); $this->load_options(); $this->load_dependencies(); // Init options & tables during activation & deregister init option register_activation_hook( dirname(__FILE__) . '/nggflashviewer.php', array(&$this, 'activate') ); if ( function_exists('register_uninstall_hook') ) register_uninstall_hook( dirname(__FILE__) . '/admin/install.php', 'nggflash_uninstall' ); // make it multilingual add_action('init', array(&$this, 'load_textdomain') ); } function define_constants() { // Pre-2.6 compatibility if ( !defined('WP_CONTENT_URL') ) define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // define URL define('NGGFLASHVIEWER_URLPATH', WP_CONTENT_URL.'/plugins/'.plugin_basename( dirname(__FILE__)).'/' ); // look for viewers define('SIMPLEVIEWER_EXIST', file_exists (dirname(__FILE__).'/flash/viewer.swf')); define('TILTVIEWER_EXIST', file_exists (dirname(__FILE__).'/flash/TiltViewer.swf')); define('AUTOVIEWER_EXIST', file_exists (dirname(__FILE__).'/flash/autoviewer.swf')); define('PCVIEWER_EXIST', file_exists (dirname(__FILE__).'/flash/pcviewer.swf')); } function load_dependencies() { if ( is_admin() ) { require_once (dirname (__FILE__) . '/admin/admin.php'); $this->nggflashAdminPanel = new nggflashAdminPanel(); } else { require_once (dirname (__FILE__).'/lib/shortcodes.php'); require_once (dirname (__FILE__).'/lib/functions.php'); } } function load_textdomain() { if (function_exists('load_plugin_textdomain')) { load_plugin_textdomain('nggflash','wp-content/plugins/'.dirname(plugin_basename(__FILE__)).'/langs'); } } function load_options() { // Load the options $this->options = get_option('ngg_fv_options'); } function activate() { include_once (dirname (__FILE__) . '/admin/install.php'); ngg_fv_default_options(); } } // Let's get the show on the road global $nggflash; $nggflash = new nggflashloader(); } ?>