$value){ $wpg2_g2path[$key] = $value; } // Update G2 Paths & Validate if ($wpg2_g2path['g2_url']) { $slash = DIRECTORY_SEPARATOR; $wpg2base = 'wp-content'.$slash.'plugins'.$slash.'wpg2'; @include_once(ABSPATH . $wpg2base . $slash . 'g2embeddiscoveryutilities.class'); $wpg2_g2path['g2_url'] = G2EmbedDiscoveryUtilities::normalizeG2Uri($wpg2_g2path['g2_url']); } $slash = DIRECTORY_SEPARATOR; $doubleslash = $slash.$slash; $wpg2_g2path['g2_filepath'] = str_replace($doubleslash,$slash,$wpg2_g2path['g2_filepath']); $wpg2_g2path['g2_filepath'] = str_replace($doubleslash,$slash,$wpg2_g2path['g2_filepath']); $wpg2_g2path['g2_filepath'] = str_replace('/', DIRECTORY_SEPARATOR, $wpg2_g2path['g2_filepath']); update_option('wpg2_g2paths', $wpg2_g2path); } // Verify WPG2 Internal g2_embeduri setting & Revalidate wpg2_template_page(); wpg2_validate('silent'); } //Get Current Gallery2 Plug-in Options $wpg2_option = get_option('wpg2_options'); $wpg2_g2path = get_option('wpg2_g2paths'); // Validate Paths To Help Pin Point Errors. if (!$validate_err) { if (!$wpg2_g2path['g2_url']) { $valmessage = ''.__('Validation Error: URL to your Gallery2 is Missing.','wpg2').''; $validate_err=1; } } if (!$validate_err) { if ($wpg2_g2path['g2_url']) { $ret = wpg2_validateuri($wpg2_g2path['g2_url'].'embed.php'); if ($ret) { // Return the Error $valmessage = ''.__('Possible Validation Problem with Gallery2 URL:').$ret.''; $validate_warning=1; } } } if (!$validate_err) { if (!file_exists( $wpg2_g2path['g2_filepath'].'embed.php' ) ) { $valmessage = ''.__('Validation Error: WPG2 plugin cannot locate the Gallery2 file ','wpg2').$wpg2_g2path['g2_filepath'].'embed.php'.''; $validate_err=1; } } ?>

' . __('WPG2 Paths Status: ', 'wpg2') . '' . __('Valid', 'wpg2') . ''; else echo '

' . __('WPG2 Paths Status: ', 'wpg2') . '' . __('Warning ', 'wpg2') . '

'.$valmessage; } else { echo '

' . __('WPG2 Paths Status: ', 'wpg2') . '' . __('Invalid', 'wpg2') . '

'.$valmessage; } echo '
'; echo ''; if ($validate_err && !$wpg2_g2path['g2_url']) { // Turn On the Auto Configuration Option echo '

'. __('WPG2 Automatic Configuration from Gallery2 URL', 'wpg2').'

'; echo '
'; echo '
'. __("Gallery2 URL:", "wpg2").''; echo '
'; echo __("Enter your Gallery2 URL by navigating to your Gallery2 Home Page and copy/paste the URL from the browser window into this field.", "wpg2"); echo '
'; ?>






Example: /home/username/public_html/gallery2/', 'wpg2') ?>



$value){ $wpg2_option[$key] = $value; } update_option('wpg2_options', $wpg2_option); ?>



/>

$value){ $wpg2_option[$key] = $value; } update_option('wpg2_options', $wpg2_option); ?>


/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>

/>
/>
/>
/>
/>
/>

$value){ $wpg2_option[$key] = $value; } update_option('wpg2_options', $wpg2_option); ?>


/>

$value){ $wpg2_option[$key] = $value; } update_option('wpg2_options', $wpg2_option); ?>

/>
/>
(N/A when using Custom wpg2header)
Stylesheet Elements to be dynamically added to the Wordpress Header prior to </head>', 'wpg2') ?>

(N/A when using Custom wpg2header)
Styling Elements to be dynamically added to the Wordpress Header after <body>', 'wpg2') ?>

(N/A when using Custom wpg2footer)
Styling Elements to be dynamically added to the Wordpress Footer prior to </body>', 'wpg2') ?>

$value){ $wpg2_option[$key] = $value; } update_option('wpg2_options', $wpg2_option); ?>