Index: INSTALL.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/signup/INSTALL.txt,v
retrieving revision 1.10
diff -u -r1.10 INSTALL.txt
--- INSTALL.txt	11 Dec 2007 03:41:42 -0000	1.10
+++ INSTALL.txt	6 Mar 2008 20:39:34 -0000
@@ -97,5 +97,10 @@
    'current signups' view to restrict it to events that have not
    started yet.
 
-
-8. Start signing up!
+8. (Optional) You can give your users direct links for signing up to
+   a node, see http://drupal.org/node/208831. The URLs for that are 
+   /node/[nid]/quick-signup. (If you have changed the signup form in the 
+   optional step 2 above then you may need to also make a change in 
+   the signup_quick_signup() function in signup.module.)
+   
+9. Start signing up!
Index: signup.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/signup/signup.module,v
retrieving revision 1.129
diff -u -r1.129 signup.module
--- signup.module	26 Jan 2008 03:02:39 -0000	1.129
+++ signup.module	6 Mar 2008 20:24:31 -0000
@@ -291,6 +291,14 @@
           'weight' => 21,
         );
       }
+      $items[] = array(
+        'path' => 'node/'. arg(1) .'/quick-signup',
+        'description' => t('Quick signup to a node.'),
+        'callback' => 'signup_quick_signup',
+        'callback arguments' => array(arg(1)),
+        'access' => TRUE,
+        'type' => MENU_CALLBACK,
+      );
     }
   }
   return $items;
@@ -1968,4 +1976,56 @@
 function signup_views_default_views() {
   require_once(drupal_get_path('module', 'signup') .'/signup_views.inc');
   return _signup_views_default_views();
+} 
+
+/**
+ * Implements URL based signup. This will fill in only default information.
+ */
+function signup_quick_signup($nid) {
+  global $user;
+
+  $node= node_load($nid);
+
+  if (!$node) {
+    drupal_not_found();
+  }
+
+  if (!node_access('view',$node)) {
+    drupal_access_denied();
+  }
+
+  if (!$node->signup) {
+    drupal_set_message(t('Signups not available for %title.',array('%title'=>$node->title)),'warning');
+    drupal_goto('node/'.$nid);
+  }
+
+  if (!$node->signup_status) {
+    drupal_set_message(t('Signups are closed for %title.',array('%title'=>$node->title)),'warning');
+    drupal_goto('node/'.$nid);
+  }
+
+  // Being here means we have a open signup, user can access this node
+  $access=user_access('sign up for content');
+  if ($user->uid) {
+    if ($access) {
+      $form_data['nid']=$nid;
+      $form_data['uid']=$user->uid;
+      $form_data['signup_form_data']['Name']=$user->name;
+      $form_data['signup_form_data']['Phone']='';
+      signup_sign_up_user($form_data);
+    }
+  }
+  else {
+    // Anonymous user, if they have access send to page, otherwise login
+    if ($access) {
+      drupal_set_message(t('In order to signup, please fill the form below.'));
+      drupal_goto('node/'.$nid);
+    }
+    else {
+      drupal_set_message(t('Login or register to signup to %title.',array('%title'=>$node->title)));
+      drupal_goto("user/login",drupal_get_destination());
+    }
+  }
+  // Either way go to node after signup.
+  drupal_goto('node/'.$nid);
 }

