function popup_message_show_message in Popup message 7
Same name and namespace in other branches
- 6 popup_message.module \popup_message_show_message()
Show popup message.
Parameters
array $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 150 - 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('misc/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);
}