Fatal Error: Cannot locate wp-config.php.
You have set $g2ic_in_wordpress to TRUE, but G2Image cannot locate wp-config.php in any parent directory.'); } } } $wpg2_g2ic = get_option('wpg2_g2ic'); $wpg2_g2paths = get_option('wpg2_g2paths'); $wpg2_options = get_option('wpg2_options'); $g2ic_options['language'] = get_locale(); // Assume WPG2 is active, or we wouldn't be here. $g2ic_options['wpg2_valid'] = TRUE; $g2ic_options['embedded_mode'] = TRUE; $g2ic_options['use_full_path'] = TRUE; // Call g2ic_init with WPG2 URI info $g2ic_options['embed_uri'] = $wpg2_g2paths['g2_embeduri']; $g2ic_options['gallery2_uri'] = $wpg2_g2paths['g2_url']; $g2ic_options['gallery2_path'] = $wpg2_g2paths['g2_filepath']; // Get the configurations options from the WPG2 admin panel if(isset($wpg2_options['g2_tagimgsize'])) $g2ic_options['wpg2_tag_size'] = $wpg2_options['g2_tagimgsize']; if(isset($wpg2_g2ic['g2ic_images_per_page'])) $g2ic_options['images_per_page'] = $wpg2_g2ic['g2ic_images_per_page']; if(isset($wpg2_g2ic['g2ic_display_filenames'])){ if($wpg2_g2ic['g2ic_display_filenames']=='yes') $g2ic_options['display_filenames'] = TRUE; else $g2ic_options['display_filenames'] = FALSE; } if(isset($wpg2_g2ic['g2ic_default_alignment'])) { $g2ic_options['alignment'] = $wpg2_g2ic['g2ic_default_alignment']; $g2ic_options['album_alignment'] = $wpg2_g2ic['g2ic_default_alignment']; } if(isset($wpg2_g2ic['g2ic_custom_class_1'])) $g2ic_options['custom_class_1'] = $wpg2_g2ic['g2ic_custom_class_1']; if(isset($wpg2_g2ic['g2ic_custom_class_2'])) $g2ic_options['custom_class_2'] = $wpg2_g2ic['g2ic_custom_class_2']; if(isset($wpg2_g2ic['g2ic_custom_class_3'])) $g2ic_options['custom_class_3'] = $wpg2_g2ic['g2ic_custom_class_3']; if(isset($wpg2_g2ic['g2ic_custom_class_4'])) $g2ic_options['custom_class_4'] = $wpg2_g2ic['g2ic_custom_class_4']; if(isset($wpg2_g2ic['g2ic_custom_url'])) $g2ic_options['custom_url'] = $wpg2_g2ic['g2ic_custom_url']; if(isset($wpg2_g2ic['g2ic_class_mode'])) $g2ic_options['class_mode'] = $wpg2_g2ic['g2ic_class_mode']; if(isset($wpg2_g2ic['g2ic_sortby'])) $g2ic_options['sortby'] = $wpg2_g2ic['g2ic_sortby']; if(isset($wpg2_g2ic['g2ic_default_album_action'])) $g2ic_options['albuminsert'] = $wpg2_g2ic['g2ic_default_album_action']; else $g2ic_options['albuminsert'] = 'wpg2_album'; if(isset($wpg2_g2ic['g2ic_default_image_action'])) { // For backwards compatibility with old option value in WPG2 G2Image Options tab if ($wpg2_g2ic['g2ic_default_image_action'] == 'wpg2') $g2ic_options['imginsert'] = 'wpg2_image'; else $g2ic_options['imginsert'] = $wpg2_g2ic['g2ic_default_image_action']; } else $g2ic_options['imginsert'] = 'wpg2_image'; } session_start(); if (isset($_SESSION['g2ic_options_array'])) { $g2ic_session_variables = unserialize($_SESSION['g2ic_options_array']); // Unset any variables that we don't want overridden by those stored in // the session variable. These need to be unset so that a user // switching from one platform to another within one browser // session will not have problems because of specific settings from // another platform. unset($g2ic_session_variables['base_path']); unset($g2ic_session_variables['wpg2_valid']); unset($g2ic_session_variables['embedded_mode']); unset($g2ic_session_variables['use_full_path']); unset($g2ic_session_variables['embed_uri']); unset($g2ic_session_variables['gallery2_uri']); unset($g2ic_session_variables['gallery2_path']); unset($g2ic_session_variables['wp_rel_path']); foreach ($g2ic_session_variables as $key=>$value) { $g2ic_options[$key] = $value; } } // Is this a TinyMCE window? if(isset($_REQUEST['g2ic_tinymce'])){ $g2ic_options['tinymce'] = $_REQUEST['g2ic_tinymce']; } // Get the form name (if set) for insertion (not TinyMCE or FCKEditor) if(isset($_REQUEST['g2ic_form'])){ $g2ic_options['form'] = $_REQUEST['g2ic_form']; } // Get the field name (if set) for insertion (not TinyMCE or FCKEditor) if(isset($_REQUEST['g2ic_field'])){ $g2ic_options['field'] = $_REQUEST['g2ic_field']; } foreach ($g2ic_options as $key=>$value) { if (isset($_REQUEST[$key])) { $g2ic_options[$key] = $_REQUEST[$key]; } } if(isset($_SESSION['g2ic_tree_array'])) { if (!isset($_REQUEST['refresh_album_tree']) && ($g2ic_session_variables['current_backend'] == $g2ic_options['current_backend']) && ($g2ic_session_variables['album_sortby'] == $g2ic_options['album_sortby'])) { $g2ic_tree = unserialize($_SESSION['g2ic_tree_array']); } } if(isset($_SESSION['g2ic_items_array'])) { if (($g2ic_session_variables['current_backend'] == $g2ic_options['current_backend']) && ($g2ic_session_variables['current_album'] == $g2ic_options['current_album']) && ($g2ic_session_variables['sortby'] == $g2ic_options['sortby']) && ($g2ic_session_variables['current_page'] == $g2ic_options['current_page']) && ($g2ic_session_variables['images_per_page'] == $g2ic_options['images_per_page'])) { $g2ic_items = unserialize($_SESSION['g2ic_items_array']); $g2ic_totalAvailableDataItems = $_SESSION['g2ic_totalAvailableDataItems_value']; } } // ============================================================== // NOTE for developers: // If you are developing an embedded application for Gallery2 and want to use // this plugin for accessing Gallery2, this is where you'll need // to validate that your ebedded page exists and then get the values from your // embedded application $g2ic_options['gallery2_path'], $g2ic_options['gallery2_uri'], and // $g2ic_options['embed_uri']. Descriptions of these variables are in config.php // // You'll also need to set $g2ic_options['embedded_mode'] to TRUE. // // If you use the full directory path for $g2ic_gallery_path, you'll need to set // $g2ic_options['use_full_path'] to TRUE. If you use a path relative to the root web page, // you'll need to set $g2ic_options['use_full_path'] to FALSE. // // If your embedded application sets its own localization, you'll need to set the // language in $g2ic_options['language']. If you need to load the language file for any // initialization messages (as in the WPG2 code above), you'll need to load it // before those messages appear. If you do load it in your initialization // sequence, set $g2ic_options['language']_loaded to TRUE, so that the language pack won't // get loaded again. // // See http://g2image.steffensenfamily.com for more details. // // ============================================================== // Determine gettext locale if (file_exists('./langs/' . $g2ic_options['language'] . '.mo')) { $locale = $g2ic_options['language']; } else { $locale = 'en'; } // gettext setup require_once('gettext.inc'); T_setlocale(LC_ALL, $locale); // Set the text domain as 'default' T_bindtextdomain('default', 'langs'); T_bind_textdomain_codeset('default', 'UTF-8'); T_textdomain('default'); ?>