_x_ * resized files are created when one changes the dimensions of an image * in the image manager selection dialog - the image is scaled when the * user clicks the ok button. */ $IMConfig['resized_prefix'] = '.resized'; // ------------------------------------------------------------------------- /** * Resized Directory * * Resized images may also be stored in a directory, except in safe mode. */ $IMConfig['resized_dir'] = '.resized'; /** * Full options * * Determines whether the user is given options for padding, * background/padding colour, margin, border and border colour. */ $IMConfig['show_full_options'] = true; // ------------------------------------------------------------------------- /** * Allow New Directories * * * Possible values: true, false * * TRUE - Allow the user to create new sub-directories in the * $IMConfig['base_dir']. * * FALSE - No directory creation. * * NOTE: If $IMConfig['safe_mode'] = true, this parameter * is ignored, you can not create directories * * DEFAULT: for demo purposes we turn this off. */ $IMConfig['allow_new_dir'] = true; // ------------------------------------------------------------------------- /** * Allow Uploads * * Possible values: true, false * * TRUE - Allow the user to upload files. * * FALSE - No uploading allowed. * * DEFAULT: for demo purposes we turn this off. */ $IMConfig['allow_upload'] = true; // ------------------------------------------------------------------------- /** * Validate Images * * Possible values: true, false * * TRUE - If set to true, uploaded files will be validated based on the * function getImageSize, if we can get the image dimensions then * I guess this should be a valid image. Otherwise the file will be rejected. * * FALSE - All uploaded files will be processed. * * NOTE: If uploading is not allowed, this parameter is ignored. */ $IMConfig['validate_images'] = true; // ------------------------------------------------------------------------- /** * Default Thumnail. * * The default thumbnail if the thumbnails can not be created, either * due to error or bad image file. */ $IMConfig['default_thumbnail'] = 'img/default.gif'; // ------------------------------------------------------------------------- /** * Thumbnail dimensions. */ $IMConfig['thumbnail_width'] = 96; $IMConfig['thumbnail_height'] = 96; // ------------------------------------------------------------------------- /** * Editor Temporary File Prefix. * * Image Editor temporary filename prefix. */ $IMConfig['tmp_prefix'] = '.editor_'; $IMConfig['ViewMode'] = 'thumbs'; //////////////////////////////////////////////////////////////////////////////// // ================== END OF CONFIGURATION ======================= // //////////////////////////////////////////////////////////////////////////////// // Standard PHP Backend Data Passing // if data was passed using xinha_pass_to_php_backend() we merge the items // provided into the Config require_once(realpath(dirname(__FILE__) . '/../../contrib/php-xinha.php')); if($passed_data = xinha_read_passed_data()) { $IMConfig = array_merge($IMConfig, $passed_data); $IMConfig['backend_url'] .= xinha_passed_data_querystring() . '&'; } // Deprecated config passing, don't use this way any more! elseif(isset($_REQUEST['backend_config'])) { if(get_magic_quotes_gpc()) { $_REQUEST['backend_config'] = stripslashes($_REQUEST['backend_config']); } // Config specified from front end, check that it's valid session_start(); $secret = $_SESSION[$_REQUEST['backend_config_secret_key_location']]; if($_REQUEST['backend_config_hash'] !== sha1($_REQUEST['backend_config'] . $secret)) { die("Backend security error."); } $to_merge = unserialize($_REQUEST['backend_config']); if(!is_array($to_merge)) { die("Backend config syntax error."); } $IMConfig = array_merge($IMConfig, $to_merge); $IMConfig['backend_url'] .= "backend_config=" . rawurlencode($_REQUEST['backend_config']) . '&'; $IMConfig['backend_url'] .= "backend_config_hash=" . rawurlencode($_REQUEST['backend_config_hash']) . '&'; $IMConfig['backend_url'] .= "backend_config_secret_key_location=" . rawurlencode($_REQUEST['backend_config_secret_key_location']) . '&'; } define('IMAGE_CLASS', $IMConfig['IMAGE_CLASS']); define('IMAGE_TRANSFORM_LIB_PATH', $IMConfig['IMAGE_TRANSFORM_LIB_PATH']); define( "IM_CONFIG_LOADED", "yes" ); // bring in the debugging library include_once( "ddt.php" ); // uncomment to send debug messages to a local file // _setDebugLog( "/tmp/debug_log.txt" ); // turn debugging on everywhere. // _ddtOn(); // END ?>