function drupalchat_footer in DrupalChat 6.2
Same name and namespace in other branches
- 6 drupalchat.module \drupalchat_footer()
Implementation of hook_footer().
File
- ./
drupalchat.module, line 116 - Module code for DrupalChat.
Code
function drupalchat_footer() {
global $user;
global $drupalchat_json;
if (drupalchat_verify_access() && variable_get('drupalchat_polling_method', DRUPALCHAT_AJAX) != DRUPALCHAT_COMMERCIAL) {
return theme('drupalchat');
}
else {
if (drupalchat_verify_access() && variable_get('drupalchat_polling_method', DRUPALCHAT_AJAX) == DRUPALCHAT_COMMERCIAL) {
drupal_add_js(drupal_get_path('module', 'drupalchat') . '/js/jquery.titlealert.min.js');
//drupal_add_js(drupal_get_path('module', 'drupalchat') . '/js/jquery.titlealert.min.js', 'module', 'footer');
/*return '<script type="text/javascript" src="' . DRUPALCHAT_EXTERNAL_HOST . ':' . DRUPALCHAT_EXTERNAL_PORT . '/socket.io/socket.io.js' . '"></script><script type="text/javascript" src="' . DRUPALCHAT_EXTERNAL_A_HOST . ':' . DRUPALCHAT_EXTERNAL_A_PORT . '/h/cache_d6.js' . '"></script>';*/
if (variable_get('drupalchat_load_chat_async', 1) == '2') {
return '<script src=\'https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js\' type=\'text/javascript\'></script><script type="text/javascript" src="//cdn.iflychat.com/js/iflychat.min.js"></script>';
}
}
}
}