function vkxp_init in VK CrossPoster 6.2
Implementation of hook_init().
File
- ./
vkxp.module, line 93
Code
function vkxp_init() {
if (isset($_SESSION['vkxp']) && count($_SESSION['vkxp'])) {
// Get first script from session.
$script = array_shift($_SESSION['vkxp']);
// Add settings for node crosspost.
drupal_add_js(array(
'vkxp' => array(
'app_id' => variable_get('vkxp_app_id', ''),
'owner_id' => $script['owner_id'],
'message' => $script['message'],
'from_group' => $script['from_group'],
'attachments' => $script['attachments'],
),
), 'setting');
drupal_add_js(drupal_get_path('module', 'vkxp') . '/vkxp.js');
// Add jquery ui dialog (for captcha).
drupal_add_css(jquery_ui_get_path() . '/themes/default/ui.all.css');
jquery_ui_add('ui.dialog');
}
}