You are here

function popup_message_show_message in Popup message 6

Same name and namespace in other branches
  1. 7 popup_message.module \popup_message_show_message()

Show popup message.

Parameters

type $popup_message_parameters: Array of parameters:

  • title: message title
  • body: message body
  • check_cookie: set FALSE if you dont want to check cookie.
  • width: window width
  • height: window height
1 call to popup_message_show_message()
popup_message_init in ./popup_message.module
Implements hook_init().

File

./popup_message.module, line 96
Main module file.

Code

function popup_message_show_message($popup_message_parameters) {
  drupal_add_js(array(
    'popup_message' => $popup_message_parameters,
  ), 'setting');
  drupal_add_js(popup_message_get_jquerycookie_path() . '/jquery.cookie.js');
  drupal_add_js(drupal_get_path('module', 'popup_message') . '/js/popup.js');
  $default_style = drupal_get_path('module', 'popup_message') . '/styles/default/' . POPUP_MESSAGE_CSS_NAME;
  $style = variable_get('popup_message_style', $default_style);
  if (!file_exists($style)) {
    $style = $default_style;
  }
  drupal_add_css($style);
}