Index: rsvp.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rsvp/rsvp.admin.inc,v
retrieving revision 1.3.2.9
diff -u -p -r1.3.2.9 rsvp.admin.inc
--- rsvp.admin.inc	23 Dec 2009 23:07:00 -0000	1.3.2.9
+++ rsvp.admin.inc	8 Nov 2010 18:50:58 -0000
@@ -98,6 +98,14 @@ function rsvp_admin_settings_general(&$f
     '#description' => t('Can users create invitations on already expired events (default is \'No\')'),
   );
   
+  $form['rsvp_send_from_guestlist'] =  array(
+    '#type' => 'select',
+    '#title' => t('Show \'Send Message\' form on guestlist'),
+    '#default_value' => variable_get('rsvp_send_from_guestlist', RSVP_OPTION_NO),
+    '#options' => array(RSVP_OPTION_YES => t('Yes'), RSVP_OPTION_NO => t('No')),
+    '#description' => t('Simplify event maintenance by displaying the \'Send message\' form after the guestlist (default is \'No\')'),
+  );
+  
   //print the email template functions
   $form['mail'] = array(
     '#type'   => 'fieldset',
@@ -194,6 +202,7 @@ function rsvp_admin_settings_general_sub
 	  variable_set('rsvp_from_address', array($pick => $email));
 	
 	  variable_set('rsvp_for_expired_event', $form_state['values']['rsvp_for_expired_event']);
+    variable_set('rsvp_send_from_guestlist', $form_state['values']['rsvp_send_from_guestlist']);
 
     foreach ($rsvp_mailer_ops as $op => $op_name) {
     	variable_set("rsvp_default_mailer_{$op}_subject", $form_state['values']["rsvp_mailer_{$op}_subject"]);
@@ -207,6 +216,7 @@ function rsvp_admin_settings_general_sub
     
     variable_del('rsvp_from_address');
     variable_del('rsvp_for_expired_event');
+    variable_del('rsvp_send_from_guestlist');
     
     foreach ($rsvp_mailer_ops as $op => $op_name) {
       variable_del("rsvp_default_mailer_{$op}_subject");
Index: rsvp.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rsvp/rsvp.install,v
retrieving revision 1.10.2.5
diff -u -p -r1.10.2.5 rsvp.install
--- rsvp.install	5 Nov 2009 22:36:47 -0000	1.10.2.5
+++ rsvp.install	8 Nov 2010 18:50:58 -0000
@@ -331,6 +331,7 @@ function rsvp_uninstall() {
   variable_del('rsvp_content_types');
   variable_del('rsvp_from_address');
   variable_del('rsvp_for_expired_event');
+  variable_del('rsvp_send_from_guestlist');
 
   foreach (array('max_guests', 'option_enabled',
                  'rsvp_view_roles', 'response_view_roles', 'response_blind', 'response_blind_node', 
Index: rsvp.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rsvp/rsvp.module,v
retrieving revision 1.22.2.43
diff -u -p -r1.22.2.43 rsvp.module
--- rsvp.module	17 Mar 2010 17:58:14 -0000	1.22.2.43
+++ rsvp.module	8 Nov 2010 18:50:59 -0000
@@ -1937,7 +1937,22 @@ function rsvp_show_guestlist($rsvp, $inv
       $content = 'Responses by other guests will be visible as soon as you reply.';  
     }
   }
- 
+
+  // Optionally display the Send Message form.
+  if (variable_get('rsvp_send_from_guestlist', RSVP_OPTION_NO) && rsvp_function_invitation_by_invite_access($connector, $rsvp, NULL, NULL, RSVP_ACCESS_EDIT)) {
+    $form = drupal_get_form('rsvp_message_form', $rsvp, NULL, NULL, TRUE);
+    $matches = array();
+    // This should match only one string.
+    preg_match('/(<form.*rsvp-message-form\">)/', $form, $matches);
+    if (count($matches) == 2) {
+      $form_open = $matches[1];
+      $form_close = '</form>';
+      $form = str_replace($form_open, '', $form);
+      $form = str_replace($form_close, '', $form);
+    }
+    $content = $form_open . $content . $form . $form_close;
+  }
+
   return $content;
 }
 
@@ -2600,11 +2615,11 @@ function rsvp_message_hash_form(&$form_s
 * @param $rsvp The rsvp object to send the message for.
 * @param $hash_target The hash of the invite object to send the message to or NULL.
 * @param $node The node object of the rsvp.
-* 
+* @param $inline Whether or not the form is being displayed on the guestlist.
 * 
 * @return html formatted rsvp send list message form.
 */
-function rsvp_message_form(&$form_state, $rsvp, $hash_target, $node = NULL ) {
+function rsvp_message_form(&$form_state, $rsvp, $hash_target, $node = NULL, $inline = FALSE) {
 
   $form = array();
 	
@@ -2620,12 +2635,19 @@ function rsvp_message_form(&$form_state,
   if (is_null($node)) {
   	$node = rsvp_function_load_node($rsvp);
   }
-  
-  $title = t('Invitation: %invitation', array('%invitation' => $rsvp->name));
 
-  // Set the breadcrumb trail.
-  drupal_set_breadcrumb(array(l(t('Home'), NULL), l($node->title, 'node/'. $node->nid . '/rsvp')));
-  drupal_set_title($title);
+  // Displaying the form on the guestlist page.
+  if ($inline) {
+    $title = t('Send message');
+  }
+  // Displaying the form separately, assign the title, etc.
+  else {
+    $title = t('Invitation: %invitation', array('%invitation' => $rsvp->name));
+
+    // Set the breadcrumb trail.
+    drupal_set_breadcrumb(array(l(t('Home'), NULL), l($node->title, 'node/'. $node->nid . '/rsvp')));
+    drupal_set_title($title);
+  }
 
   //first set the stylesheet based on the setting.
   $stylesheet_file = rsvp_function_getStylesheet($rsvp->theme, $rsvp->stylesheet);
