'Mint Settings', 'description' => 'Configure integration with Mint.', 'page callback' => 'drupal_get_form', 'page arguments' => array('mint_admin_settings'), 'access arguments' => array('administer site configuration'), 'type' => MENU_NORMAL_ITEM ); return $items; } //hook_init() is now called AFTER modules are loaded, and while it doesn't get run for cached pages, drupal_add_js() calls are cached along with the rest of the page. function mint_init() { global $user; $conf = _mint_getconfig(); if(!user_access('exclude from mint') || $conf["log_everything"]) { //We use drupal_set_html_head() because drupal_add_js() confuses MINT. drupal_set_html_head(''); //Now, perform tasks for various pepper... if($conf['secret_crush']) { $name = $user->name; if($user->uid == 0 || trim($name) == "") $name = variable_get('anonymous', t('Anonymous')); if(trim($name) == "") $name = t('Anonymous'); setcookie("mint_crush_user", $name, time() + 31536000, "/"); } } }