You are here

function uploadfield_init in Video 6.3

Implementation of hook_init().

Load required includes.

File

types/uploadfield/uploadfield.module, line 16

Code

function uploadfield_init() {

  // add CSS file
  drupal_add_css(drupal_get_path('module', 'video') . '/types/uploadfield/uploadfield.css');

  // If FileField is not available, immediately disable uploadfield.
  if (!module_exists('filefield')) {
    module_disable(array(
      'uploadfield',
    ));
    drupal_set_message(t('The uploadfield module has been disabled. The <a href="http://drupal.org/project/filefield">FileField module</a> needs to be installed for it to work properly.'));
    return;
  }
}