function fitvids_enable in FitVids 7
Same name and namespace in other branches
- 6 fitvids.install \fitvids_enable()
Enable the module
File
- ./
fitvids.install, line 49 - Install, update and uninstall functions for the Fitvids module.
Code
function fitvids_enable() {
$path = libraries_get_path('fitvids') . '/jquery.fitvids.js';
$installed = file_exists($path);
if (!$installed) {
$message = t('You need to download the FitVids.js jQuery plugin to use this module. Download it from !fitvids-site, copy it to the !fitvids-library directory, and rename it to !fitvids-filename.', array(
'!fitvids-site' => l(t('here'), FITVIDS_PLUGIN_URL),
'!fitvids-library' => libraries_get_path('fitvids'),
'!fitvids-filename' => FITVIDS_PLUGIN_FILENAME,
));
drupal_set_message(filter_xss_admin($message), $type = 'warning');
}
else {
$message = t('You already have the FitVids.js jQuery plugin installed. Configure the module !fitvids-configuration', array(
'!fitvids-configuration' => l(t('here'), 'admin/config/media/fitvids'),
));
drupal_set_message(filter_xss_admin($message));
}
}