image_fupload.install in Image FUpload 6
File
image_fupload.install
View source
<?php
function image_fupload_install() {
}
function image_fupload_uninstall() {
variable_del('fupload_title_replacements');
}
function image_fupload_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
$path = drupal_get_path('module', 'image_fupload') . '/swfupload/';
if (!file_exists($path . 'swfupload.js') || !file_exists($path . 'swfupload.queue.js') || !file_exists($path . 'swfupload_f9.swf')) {
$requirements['image_fupload'] = array(
'title' => t('Image FUpload'),
'value' => t('Missing files in subdirectory "swfupload"'),
'description' => t('Some needed files which are not bundled with this module, are missing! This can be either "swfupload_f9.swf", "swfupload.js" or "swfupload.queue.js" which should be located in "%path". These files can be downloaded from !page. <em>Note:</em> Version 2.1.0 or higher is needed.', array(
'%path' => $path,
'!page' => l(t('SWFUploads project page'), 'http://code.google.com/p/swfupload/'),
)),
'severity' => REQUIREMENT_ERROR,
);
}
}
return $requirements;
}