Index: mailchimp.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mailchimp/Attic/mailchimp.admin.inc,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 mailchimp.admin.inc
--- mailchimp.admin.inc	23 Dec 2010 18:53:44 -0000	1.1.2.6
+++ mailchimp.admin.inc	30 Dec 2010 17:48:50 -0000
@@ -126,6 +126,13 @@
           }
         }
 
+        $form['mailchimp_url_redirect'] = array(
+            '#type'          => 'textfield',
+            '#title'         => t("'Thank you' page redirect url"),
+            '#description'   => t('If set, when a user subscribes to a list they will be redirected to the above url. This can be a Drupal path or an external url. Leave blank to use the normal messages.'),
+            '#default_value' => variable_get('mailchimp_url_redirect', ''),
+        );
+
         $form['mailchimp_messages'] = array(
             '#type'       => 'fieldset',
             '#collapsible' => TRUE,
Index: mailchimp.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mailchimp/mailchimp.module,v
retrieving revision 1.2.2.1.2.3.2.8.2.89
diff -u -r1.2.2.1.2.3.2.8.2.89 mailchimp.module
--- mailchimp.module	28 Dec 2010 23:52:25 -0000	1.2.2.1.2.3.2.8.2.89
+++ mailchimp.module	30 Dec 2010 17:51:27 -0000
@@ -167,6 +167,10 @@
     );
 
     if ($standalone){
+      if (variable_get('mailchimp_url_redirect', '')) {
+        $form['#redirect'] = variable_get('mailchimp_url_redirect', '');
+      }
+
       $form['submit'] = array(
         '#type' => 'submit',
         '#value' => t('save settings'),
@@ -498,6 +502,10 @@
       $form['mailchimp_lists'][$list->id]['EMAIL']['#required'] = FALSE;
     }
   }
+  
+  if (variable_get('mailchimp_url_redirect', '')) {
+    $form['#redirect'] = variable_get('mailchimp_url_redirect', '');
+  }
 
   $form['submit'] = array(
     '#type' => 'submit',
@@ -531,10 +539,10 @@
 
       $success = _mailchimp_subscribe_user($list['list'], $list['EMAIL'], $list, TRUE);
 
-      if ($success) {
+      if ($success && variable_get('mailchimp_url_redirect', '') == '') {
         $msg = variable_get('mailchimp_subscription_success_message', t('Thank you, you have been successfully subscribed.'));
       }
-      else {
+      else if (!$success) {
         $msg = variable_get('mailchimp_subscription_failure_message', t('We were unable to subscribe you at this time. Please try again later.'));
       }
 
@@ -590,6 +598,10 @@
 
   _mailchimp_subscribe_anon_form($list, $q, $form['mailchimp_lists'][$list->id]);
 
+  if (variable_get('mailchimp_url_redirect', '')) {
+    $form['#redirect'] = variable_get('mailchimp_url_redirect', '');
+  }
+
   $form['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Sign Up!'),
@@ -954,10 +966,10 @@
       $action = 'subscribed to';
       $success = $q->listSubscribe($list->id, $email, $merge_vars, 'html', $double_optin, TRUE);
 
-      if ($message && $success && $double_optin) {
+      if ($message && $success && $double_optin && variable_get('mailchimp_url_redirect', '') == '') {
         drupal_set_message(t('You have chosen to subscribe to %list. An email will be sent to your address. Click the link in the email to confirm the subscription.', array('%list' => $list->name)));
       }
-      elseif ($message && $success) {
+      elseif ($message && $success && variable_get('mailchimp_url_redirect', '') == '') {
         drupal_set_message(t('You have subscribed %email to the %list list.', array('%email' => $email, '%list' => $list->name)));
       }
     }

