Ignore:
Timestamp:
07/10/05 05:44:48 (14 years ago)
Author:
gogo
Message:

Various updates to ImageManager?, see #343

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ImageManager/config.inc.php

    r93 r256  
    1 <? 
     1<?php 
    22/** 
    33 * Image Manager configuration file. 
     
    113113*/ 
    114114 
    115 define('IMAGE_CLASS', 'GD'); 
     115$IMConfig['IMAGE_CLASS'] = 'GD'; 
     116 
    116117 
    117118// ------------------------------------------------------------------------- 
     
    126127*/ 
    127128 
    128 define('IMAGE_TRANSFORM_LIB_PATH', 'C:/"Program Files"/ImageMagick-5.5.7-Q16/'); 
     129$IMConfig['IMAGE_TRANSFORM_LIB_PATH'] ='/usr/bin/'; 
     130 
     131// For windows, something like 
     132// C:/"Program Files"/ImageMagick-5.5.7-Q16/ 
    129133 
    130134// ------------------------------------------------------------------------- 
     
    160164 
    161165/** 
     166* Resized prefix 
     167* 
     168* The prefix for resized files, something like .resized will do.  The 
     169* resized files will be named <prefix>_<width>x<height>_<original> 
     170* resized files are created when one changes the dimensions of an image 
     171* in the image manager selection dialog - the image is scaled when the 
     172* user clicks the ok button. 
     173*/ 
     174 
     175$IMConfig['resized_prefix'] = '.resized'; 
     176 
     177// ------------------------------------------------------------------------- 
     178 
     179/** 
     180* Resized Directory 
     181* 
     182* Resized images may also be stored in a directory, except in safe mode. 
     183*/ 
     184 
     185$IMConfig['resized_dir'] = '.resized'; 
     186 
     187// ------------------------------------------------------------------------- 
     188 
     189/** 
    162190* Allow New Directories 
    163191* 
     
    243271 
    244272 
     273 
     274 
     275 
     276 
     277//////////////////////////////////////////////////////////////////////////////// 
     278//       ================== END OF CONFIGURATION =======================      // 
     279//////////////////////////////////////////////////////////////////////////////// 
     280 
     281 
     282 
     283 
     284 
     285// If config specified from front end, merge it 
     286if(isset($_REQUEST['backend_config'])) 
     287{ 
     288  // Config specified from front end, check that it's valid 
     289  session_start(); 
     290  $secret = $_SESSION[$_REQUEST['backend_config_secret_key_location']]; 
     291 
     292  if($_REQUEST['backend_config_hash'] !== sha1($_REQUEST['backend_config'] . $secret)) 
     293  { 
     294    die("Backend security error."); 
     295  } 
     296 
     297  $to_merge = unserialize($_REQUEST['backend_config']); 
     298  if(!is_array($to_merge)) 
     299  { 
     300    die("Backend config syntax error."); 
     301  } 
     302 
     303  $IMConfig = array_merge($IMConfig, $to_merge); 
     304  $IMConfig['backend_url'] .= "backend_config=" . rawurlencode($_REQUEST['backend_config']) . '&'; 
     305  $IMConfig['backend_url'] .= "backend_config_hash=" . rawurlencode($_REQUEST['backend_config_hash']) . '&'; 
     306  $IMConfig['backend_url'] .= "backend_config_secret_key_location=" . rawurlencode($_REQUEST['backend_config_secret_key_location']) . '&'; 
     307 
     308} 
     309 
     310define('IMAGE_CLASS', $IMConfig['IMAGE_CLASS']); 
     311define('IMAGE_TRANSFORM_LIB_PATH', $IMConfig['IMAGE_TRANSFORM_LIB_PATH']); 
    245312define( "IM_CONFIG_LOADED", "yes" ); 
    246313 
Note: See TracChangeset for help on using the changeset viewer.