function user_relationships_ui_init in User Relationships 7
Same name and namespace in other branches
- 6 user_relationships_ui/user_relationships_ui.module \user_relationships_ui_init()
Implements hook_init().
File
- user_relationships_ui/
user_relationships_ui.module, line 215 - UI components of user_relationships @author Jeff Smick (creator) @author Alex Karshakevich (maintainer) http://drupal.org/user/183217 @author Darren Ferguson (contributor) http://drupal.org/user/70179
Code
function user_relationships_ui_init() {
//do not enable ajax functions if set in admin/config/people/relationships/settings
if (!variable_get('user_relationships_enable_ajax_popups', 0)) {
return;
}
drupal_add_js(USER_RELATIONSHIPS_UI_PATH . '/user_relationships_ui.js');
drupal_add_css(USER_RELATIONSHIPS_UI_PATH . '/user_relationships_ui.css');
$settings['user_relationships_ui']['loadingimage'] = file_create_url(USER_RELATIONSHIPS_UI_PATH . '/images/loadingAnimation.gif');
$settings['user_relationships_ui']['savingimage'] = file_create_url(USER_RELATIONSHIPS_UI_PATH . '/images/savingimage.gif');
$settings['user_relationships_ui']['position'] = array(
'position' => variable_get('user_relationships_position', 'absolute'),
'left' => variable_get('user_relationships_left', '0'),
'top' => variable_get('user_relationships_top', '0'),
);
drupal_add_js($settings, 'setting');
}