--- websnapr.module	2008-06-26 15:41:20.000000000 +0200
+++ websnapr.module	2008-06-26 15:41:54.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: websnapr.module,v 1.1.2.1 2007/06/15 03:04:06 Gurpartap Exp $
+// $Id$
 
 /**
  * @file
@@ -10,43 +10,45 @@
 /**
  * Implementation of hook_help().
  */
-function websnapr_help($section) {
+function websnapr_help($page, $arg) {
   $output = '';
-  switch ($section) {
+  switch ($page) {
     case 'admin/help#websnapr':
       $output .= '<p>'. t('The WebSnapr Preview Bubble module is a simple, unobtrusive script used to display an overlay bubble showing a hyperlink target thumbnail using WebSnapr. It\'s a snap to setup and works on all modern browsers. Check the demo at: <a href="http://www.websnapr.com/previewbubble/" />http://www.websnapr.com/previewbubble/</a>');
       $output .= '<p>'. t('WebSnapr - Preview Bubble Javascript by Juan Xavier Larrea') .'</p>';
       break;
     case 'admin/settings/websnapr':
-      $output .= '<p>'. t('Bubbles are always enabled for hyperlinks having class <em>previewlink</em>, irrespective of any configuration below. <a href="!url" />Configure permissions</a> for user roles to view WebSnapr Preview Bubbles.', array('!url' => url('admin/user/access', NULL, 'module-websnapr'))) .'</p>';
+      $output .= '<p>'. t('Bubbles are always enabled for hyperlinks having class <em>previewlink</em>, irrespective of any configuration below. '. l('Configure permissions', 'admin/user/permissions', array('fragment' => 'module-websnapr')) .' for user roles to view WebSnapr Preview Bubbles.') .'</p>';
   }
 
   return $output;
 }
 
 /**
- * Implementation of hook_menu().
+ * Implementation of hook_init().
  */
-function websnapr_menu($may_cache) {
-  $items = array();
-
-  if ($may_cache) {
-    $items[] = array(
-      'path' => 'admin/settings/websnapr',
-      'title' => t('WebSnapr Preview Bubble'),
-      'description' => t('Toggle site-wide usage of WebSnapr Preview Bubbles.'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('websnapr_settings'),
-      'access' => user_access('administer site configuration'),
-      'type' => MENU_NORMAL_ITEM,
-    );
-  }
-  // Check permission.
-  else if(user_access('view websnapr preview bubble')) {
+function websnapr_init() {
+  if (user_access('view websnapr preview bubble')) {
     // Load the JS for WebSnapr
     websnapr_load_script();
   }
+}
 
+/**
+ * Implementation of hook_menu().
+ */
+function websnapr_menu() {
+  $items = array();
+
+  $items['admin/settings/websnapr'] = array(
+    'title' => 'WebSnapr Preview Bubble', 
+    'description' => 'Toggle site-wide usage of WebSnapr Preview Bubbles.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('websnapr_settings'),
+    'access callback' => 'user_access',
+    'access arguments' => array('administer site configuration'),
+    'type' => MENU_NORMAL_ITEM,
+  );
   return $items;
 }
 
--- websnapr.info	2008-06-26 15:40:50.000000000 +0200
+++ websnapr.info	2008-06-26 15:34:17.000000000 +0200
@@ -1,4 +1,5 @@
-; $Id: websnapr.info,v 1.1.2.1 2007/06/15 03:04:06 Gurpartap Exp $
+; $Id$
 name = WebSnapr Preview Bubble
 description = Displays an overlay bubble on mouse hover, showing a hyperlink target thumbnail, using the WebSnapr service.
 package = Javascript
+core = 6.x
