? port_6.patch
Index: snap.admin.inc
===================================================================
RCS file: snap.admin.inc
diff -N snap.admin.inc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ snap.admin.inc 18 Mar 2009 20:37:17 -0000
@@ -0,0 +1,30 @@
+ 'textfield',
+ '#title' => t('Snap Key'),
+ '#required' => TRUE,
+ '#default_value' => variable_get("snap_key", "put key here"),
+ '#description' => t('Copy your key here. Get free key here'),
+ );
+
+ $form[snap_preview_internal] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Preview internal links'),
+ '#default_value' => variable_get(snap_preview_internal, 0),
+ '#description' => t('Preview internal links (we do not recommend turning this on).'),
+ );
+
+ $form[snap_searchbox] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Snap Search box'),
+ '#default_value' => variable_get(snap_searchbox, 0),
+ '#description' => t('Include a Search box in preview window.'),
+ );
+
+ return system_settings_form($form);
+}
+
Index: snap.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/snap_preview/snap.info,v
retrieving revision 1.3
diff -u -p -r1.3 snap.info
--- snap.info 18 Jun 2007 22:54:00 -0000 1.3
+++ snap.info 18 Mar 2009 20:37:17 -0000
@@ -2,4 +2,5 @@
name = Snap
description = Add Snap Anywhere website Previews.
+core = 6.x
Index: snap.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/snap_preview/snap.module,v
retrieving revision 1.4
diff -u -p -r1.4 snap.module
--- snap.module 4 Feb 2007 15:44:51 -0000 1.4
+++ snap.module 18 Mar 2009 20:37:17 -0000
@@ -1,4 +1,6 @@
'admin/settings/snap',
- 'title' => t('Snap settings'),
- 'callback' => 'drupal_get_form',
- 'callback arguments' => array('snap_admin_settings'),
- 'access' => user_access('administer site configuration'),
- 'weight' => 2,
- );
- }
+/**
+ * Implementation of hook_menu().
+ */
+function snap_menu() {
+ $items['admin/settings/snap'] = array(
+ 'title' => t('Snap settings'),
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('snap_admin_settings'),
+ 'access arguments' => array('administer site configuration'),
+ 'weight' => 2,
+ 'file' => 'snap.admin.inc',
+ );
return $items;
}
@@ -69,37 +72,6 @@ function snap_perm() {
return array('view snap preview');
}
-
-
-function snap_admin_settings() {
-
- $form['snap_key'] = array(
- '#type' => 'textfield',
- '#title' => t('Snap Key'),
- '#required' => TRUE,
- '#default_value' => variable_get("snap_key", "put key here"),
- '#description' => t('Copy your key here. Get free key here'),
- );
-
- $form[snap_preview_internal] = array(
- '#type' => 'checkbox',
- '#title' => t('Preview internal links'),
- '#default_value' => variable_get(snap_preview_internal, 0),
- '#description' => t('Preview internal links (we do not recommend turning this on).'),
- );
-
- $form[snap_searchbox] = array(
- '#type' => 'checkbox',
- '#title' => t('Snap Search box'),
- '#default_value' => variable_get(snap_searchbox, 0),
- '#description' => t('Include a Search box in preview window.'),
- );
-
- return system_settings_form($form);
-}
-
-
-
function snap_javascript(){
global $base_url;
@@ -109,4 +81,3 @@ function snap_javascript(){
}
}
-?>
\ No newline at end of file