? modules/lightbox2/lightbox2.info
? modules/lightbox2/lightbox2.install
Index: modules/lightbox2/lightbox2.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/lightbox2/lightbox2.module,v
retrieving revision 1.15
diff -u -r1.15 lightbox2.module
--- modules/lightbox2/lightbox2.module	7 May 2006 10:26:50 -0000	1.15
+++ modules/lightbox2/lightbox2.module	4 Oct 2006 16:21:38 -0000
@@ -28,8 +28,6 @@
  */
 function lightbox2_help($section) {
   switch ($section) {
-    case 'admin/modules#description':
-      return t('Enables Lightbox V2 for Drupal');
     case 'admin/help#lightbox2':
       return t('<h3>Overview</h3>
       <p align="justify">Lightbox JS V2 is a simple, unobtrusive script used to overlay images on the current page. It\'s a snap to setup and works on all modern browsers. The module comes with a Lightbox2 Lite option which does not use the Scriptaculous/Prototype libraries; it is therefore less likely to conflict with anything else.</p>
@@ -61,7 +59,7 @@
 /**
  * Implementation of hook_nodeapi().
  */
-function lightbox2_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {	
+function lightbox2_nodeapi(&$node, $op) {	
 	global $LIGHTBOX2_INCLUDE;
 	
 	if ($op == "view" && !$LIGHTBOX2_INCLUDE) {
@@ -74,6 +72,24 @@
 	}
 }
 
+function hook_perm() {
+  return array('administer lightbox2');
+} 
+
+function lightbox2_menu($maycache) {
+ $items = array();
+
+ $items[] = array(
+    'path' => 'admin/settings/lightbox2',
+    'title' => t('lightbox 2'),
+    'callback' => 'drupal_get_form',
+    'callback arguments' => 'lightbox2_settings',
+    'access' => user_access('administer lightbox2'),
+    'type' => MENU_NORMAL_ITEM,
+   );
+  return $items;
+}
+
 /**
  * Implementation of hook_settings().
  */
@@ -125,7 +141,7 @@
 		"#return_value" => true,
 	);
 	
-	return $form;
+	return system_settings_form($form);
 }
 /**
  *Implementation of hook_filter().
@@ -162,7 +178,7 @@
   $path = drupal_get_path('module', 'lightbox2');
 	// Check to see if Lightbox2 Plus is enabled.
 	if (variable_get("lightbox2_plus", true)) {
-  	theme("add_style", $path . '/lightbox.css');
+  	drupal_add_css($path . '/lightbox.css');
   		// Check to see if Libraries are installed correctly.
   		if (file_exists($path .'/js/prototype.js')) {
 		drupal_add_js($path . '/js/prototype.js');
@@ -185,7 +201,7 @@
 	}
 	// Load Lightbox Lite if Plus is not enabled.
  	else {
- 	theme("add_style", $path . '/lightbox_lite.css');
+ 	drupal_add_css($path . '/lightbox_lite.css');
  	drupal_add_js($path . '/js/lightbox_lite.js');
     }
 }
