Hi, thanks for this wonderful, very wonderful module. I would modify imagecache to display some preset only if the image is in a fixed path. For example, if it is in /files_folder/image_1, it will display.

Thanks for help.

Comments

psicomante’s picture

Trying

function _imagecache_cache($presetname, $path) {
  if (!$preset = imagecache_preset_by_name($presetname)) {
    // send a 404 if we dont' know of a preset. 
    header('HTTP/1.0 404 Not Found');
    exit;
  }
  
  //check if the preset is path-not-protected (e.g without watermark)
  if ($preset == 'preset') {
    // check if path if protected one
    if (strpos($path, 'images') {
      header('HTTP/1.0 404 Not Found');
      exit;
    }
  }

fizk’s picture

Status: Active » Closed (won't fix)