t('ImageMagick advanced options')); if (!isset($toolkits['imagemagick'])) { $requirements['imagemagick']['value'] = t('ImageMagick image toolkit is not properly installed'); $requirements['imagemagick']['description'] = t('The %toolkit_inc file must be copied to %inc_dir in order for the ImageMagick image toolkit to function.', array('%toolkit_inc' => drupal_get_path('module', 'image') . '/image.imagemagick.inc', '%inc_dir' => 'includes')); $requirements['imagemagick']['severity'] = REQUIREMENT_ERROR; return $requirements; } // If the image_im_advanced module is installed but the ImageMagick image // toolkit is not selected, indicate an error. if (image_get_toolkit() != 'imagemagick') { $requirements['imagemagick']['value'] = t('ImageMagic image toolkit is not selected.'); $requirements['imagemagick']['description'] = t('The ImageMagic image toolkit is not selected. The advanced options only apply to the ImageMagick toolkit. Select the image toolkit here.', array('@toolkit' => url('admin/settings/image-toolkit'))); $requirements['imagemagick']['severity'] = REQUIREMENT_WARNING; return $requirements; } // If the imagemagick convert utility does not exist, indicate an error. $convert_path = variable_get('image_imagemagick_convert', '/usr/bin/convert'); if (!file_exists($convert_path)) { $requirements['imagemagick']['value'] = t('ImageMagick convert utility not found.'); $requirements['imagemagick']['description'] = t('The ImageMagick image convert utility (@convert) does not exist. If you have ImageMagick installed, click here to provide the path to the convert utility.', array('@convert' => $convert_path, '@toolkit' => url('admin/settings/image-toolkit'))); $requirements['imagemagick']['severity'] = REQUIREMENT_ERROR; return $requirements; } $requirements['imagemagick']['value'] = t('ImageMagick image toolkit is selected.'); $requirements['imagemagick']['severity'] = REQUIREMENT_OK; } return $requirements; }