You are here

function nicemessages_init in Nice messages 7

Same name and namespace in other branches
  1. 7.2 nicemessages.module \nicemessages_init()

Implements hook_init().

File

./nicemessages.module, line 15
Nicemessages module

Code

function nicemessages_init() {

  // Attach jGrowl files
  drupal_add_css(JGROWL_PATH . '/jquery.jgrowl.min.css');
  drupal_add_js(JGROWL_PATH . '/jquery.jgrowl.min.js');

  // Atach module files
  drupal_add_css(drupal_get_path('module', 'nicemessages') . '/css/nicemessages.css');
  drupal_add_js(drupal_get_path('module', 'nicemessages') . '/js/nicemessages.js');
  if (variable_get('nicemessages_background_color') == 1) {
    drupal_add_css(drupal_get_path('module', 'nicemessages') . '/css/nicemessages_background_color.css');
  }
  else {
    if (variable_get('nicemessages_background_color') == 2) {
      drupal_add_css(drupal_get_path('module', 'nicemessages') . '/css/nicemessages_background_color_bordered.css');
    }
  }
}