__construct(); } /** * nggOptions::__construct() * * @return void */ function __construct() { // same as $_SERVER['REQUEST_URI'], but should work under IIS 6.0 $this->filepath = admin_url() . 'admin.php?page=' . $_GET['page']; //Look for POST updates if ( !empty($_POST) ) $this->processor(); } /** * Save/Load options and add a new hook for plugins * * @return void */ function processor() { global $ngg, $nggRewrite; $old_state = $ngg->options['usePermalinks']; $old_slug = $ngg->options['permalinkSlug']; if ( isset($_POST['irDetect']) ) { check_admin_referer('ngg_settings'); $ngg->options['irURL'] = ngg_search_imagerotator(); update_option('ngg_options', $ngg->options); } if ( isset($_POST['updateoption']) ) { check_admin_referer('ngg_settings'); // get the hidden option fields, taken from WP core if ( $_POST['page_options'] ) $options = explode(',', stripslashes($_POST['page_options'])); if ($options) { foreach ($options as $option) { $option = trim($option); $value = isset($_POST[$option]) ? trim($_POST[$option]) : false; // $value = sanitize_option($option, $value); // This does stripslashes on those that need it $ngg->options[$option] = $value; } // do not allow a empty string if ( empty ( $ngg->options['permalinkSlug'] ) ) $ngg->options['permalinkSlug'] = 'nggallery'; // the path should always end with a slash $ngg->options['gallerypath'] = trailingslashit($ngg->options['gallerypath']); $ngg->options['imageMagickDir'] = trailingslashit($ngg->options['imageMagickDir']); // the custom sortorder must be ascending $ngg->options['galSortDir'] = ($ngg->options['galSort'] == 'sortorder') ? 'ASC' : $ngg->options['galSortDir']; } // Save options update_option('ngg_options', $ngg->options); // Flush Rewrite rules if ( $old_state != $ngg->options['usePermalinks'] || $old_slug != $ngg->options['permalinkSlug'] ) $nggRewrite->flush(); nggGallery::show_message(__('Update Successfully','nggallery')); } if ( isset($_POST['clearcache']) ) { check_admin_referer('ngg_settings'); $path = WINABSPATH . $ngg->options['gallerypath'] . 'cache/'; if (is_dir($path)) if ($handle = opendir($path)) { while (false !== ($file = readdir($handle))) { if ($file != '.' && $file != '..') { @unlink($path . '/' . $file); } } closedir($handle); } nggGallery::show_message(__('Cache cleared','nggallery')); } if ( isset($_POST['createslugs']) ) { check_admin_referer('ngg_settings'); include_once (dirname (__FILE__) . '/upgrade.php'); ngg_rebuild_unique_slugs::start_rebuild(); } do_action( 'ngg_update_options_page' ); } /** * Render the page content * * @return void */ function controller() { // get list of tabs $tabs = $this->tabs_order(); ?>

type="text" size="35" name="gallerypath" value="options['gallerypath']; ?>" />
type="checkbox" name="deleteImg" value="1" options['deleteImg']); ?> />
options['usePermalinks']); ?> />

options['useMediaRSS']); ?> />
(CoolIris) options['usePicLens']); ?> />

options['activateTags']); ?> />

[]

Manage Gallery .', 'nggallery') ?>

x
options['thumbfix']); ?> />
%
[]

x
%
options['imgBackup'] == 1) ? ' checked ="chechked"' : ''; ?>/>
options['imgAutoResize'] == 1) ? ' checked ="chechked"' : ''; ?>/>

[]

options['galNoPages']); ?> />
options['galShowSlide']); ?> />

options['galImgBrowser']); ?> />
options['galHiddenImg']); ?> />
options['galAjaxNav']); ?> />






[]

%GALLERY_NAME%

[]
get_var("SELECT MIN(pid) FROM $wpdb->nggpictures"); $imageURL = ($imageID) ? $imageURL = '' : ''; ?>

Manage Gallery . This action cannot be undone.', 'nggallery') ?>

options['wmPos']); ?> /> options['wmPos']); ?> /> options['wmPos']); ?> />
options['wmPos']); ?> /> options['wmPos']); ?> /> options['wmPos']); ?> />
options['wmPos']); ?> /> options['wmPos']); ?> /> options['wmPos']); ?> />
x px
y px



nggallery/fonts','nggallery'); ?>
px
%
 

x
jQuery Cycle

3.17 . JW Image Rotator from Jeroen Wijering.

options['irURL']) && ($ngg->options['enableIR'] == '1')) { ?>


here and upload it to your Upload folder (Default is wp-content/uploads).','nggallery'); ?>

options['enableIR']); ?> />

options['irShuffle']); ?> />
options['irLinkfromdisplay']); ?> />
options['irShownavigation']); ?> />
options['irShowicons']); ?> />
options['irWatermark']); ?> />
options['irKenburns']); ?> />
options['irXHTMLvalid']); ?> />
[]
read()) !== false) { if (preg_match('|^\.+$|', $file)) continue; if (is_dir($plugin_root.'/'.$file)) { $plugins_subdir = @ dir($plugin_root.'/'.$file); if ($plugins_subdir) { while (($subfile = $plugins_subdir->read()) !== false) { if (preg_match('|^\.+$|', $subfile)) continue; if (preg_match('|\.ttf$|', $subfile)) $ttf_fonts[] = "$file/$subfile"; } } } else { if (preg_match('|\.ttf$|', $file)) $ttf_fonts[] = $file; } } } return $ttf_fonts; } function ngg_search_imagerotator() { global $wpdb; $upload = wp_upload_dir(); // look first at the old place and move it to wp-content/uploads if ( file_exists( NGGALLERY_ABSPATH . 'imagerotator.swf' ) ) @rename(NGGALLERY_ABSPATH . 'imagerotator.swf', $upload['basedir'] . '/imagerotator.swf'); // This should be the new place if ( file_exists( $upload['basedir'] . '/imagerotator.swf' ) ) return $upload['baseurl'] . '/imagerotator.swf'; // Find the path to the imagerotator via the media library if ( $path = $wpdb->get_var( "SELECT guid FROM {$wpdb->posts} WHERE guid LIKE '%imagerotator.swf%'" ) ) return $path; // maybe it's located at wp-content if ( file_exists( WP_CONTENT_DIR . '/imagerotator.swf' ) ) return WP_CONTENT_URL . '/imagerotator.swf'; // or in the plugin folder if ( file_exists( WP_PLUGIN_DIR . '/imagerotator.swf' ) ) return WP_PLUGIN_URL . '/imagerotator.swf'; // this is deprecated and will be ereased during a automatic upgrade if ( file_exists( NGGALLERY_ABSPATH . 'imagerotator.swf' ) ) return NGGALLERY_URLPATH . 'imagerotator.swf'; return ''; } /**********************************************************/ // taken from WP Core function ngg_input_selected( $selected, $current) { if ( $selected == $current) return ' selected="selected"'; } function ngg_input_checked( $checked, $current) { if ( $checked == $current) return ' checked="checked"'; } ?>