Index: signup.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/signup/signup.module,v
retrieving revision 1.156
diff -u -r1.156 signup.module
--- signup.module	16 Oct 2008 08:17:31 -0000	1.156
+++ signup.module	16 Oct 2008 09:39:49 -0000
@@ -2601,3 +2601,23 @@
   }
   return $tokens;
 }
+
+/**
+ * @defgroup signup_panels_panels Panels-integration hooks
+ */
+
+/**
+ * Implementation of hook_panels_inculde_directory()
+ *
+ * @param $plugin_type The plugin type for which the Panels 
+ *        engine is currently requesting the location of an 
+ *        include directory.
+ * @return The location of the include directory for plugin 
+ *         type being requested, relative to the base directory 
+ *         of the module implementing this hook.
+ */
+function signup_panels_include_directory($plugin_type) {
+  if ($plugin_type == 'content_types') {
+    return 'contrib/panels/'. $plugin_type;
+  }
+}
Index: contrib/panels/content_types/signup_form.inc
===================================================================
RCS file: contrib/panels/content_types/signup_form.inc
diff -N contrib/panels/content_types/signup_form.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ contrib/panels/content_types/signup_form.inc	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,89 @@
+<?php
+// $Id: node_form.inc,v 1.1.2.8 2008/05/27 20:21:11 sdboyer Exp $
+
+
+/**
+ * Callback function to supply a list of content types.
+ */
+function signup_signup_form_panels_content_types() {
+  $items['signup_form'] = array(
+    'title' => t('Signup form'),
+    'content_types' => 'signup_admin_content_types_signup_form',
+    'single' => TRUE,
+    'render callback' => 'signup_content_signup_form',
+    'add callback' => 'signup_admin_edit_signup_form',
+    'edit callback' => 'signup_admin_edit_signup_form',
+    'title callback' => 'signup_admin_title_signup_form',
+  );
+  return $items;
+}
+
+/**
+ * Return all content types available.
+ */
+function signup_admin_content_types_signup_form() {
+  if (module_exists('signup')) {
+    return array(
+      'signup_form' => array(
+        'title' => t('Signup form'),
+        'icon' => 'icon_node.png',  // TODO: choose different icon
+        'path' => panels_get_path('content_types/node'), // TODO: adjust path
+        'description' => t('Signup form.'),
+        'required context' => new panels_required_context(t('Node'), 'node'),
+        'category' => array(t('Contributed modules'), 0),
+      ),
+    );
+  }
+}
+
+/**
+ * Output function for the 'signup form' content type. Outputs the 
+ * signup form based on a given nid, as provided by the $context..
+ */
+function signup_content_signup_form($conf, $panel_args, &$context) {
+  $node = isset($context->data) ? drupal_clone($context->data) : NULL;
+  $block = new stdClass();
+  $block->module = 'signup';
+  $block->delta  = $node->nid;
+
+  $block->subject = '';
+  if (empty($node)) {
+    $block->content = '';
+  }
+  else {
+    $block->content = signup_form_render($node, $conf);
+  }
+
+  return $block;
+}
+
+/**
+ * Renders the output of the signup form (or information).
+ *
+ * @param $node
+ *  The fully rendered node object.
+ * @param $conf
+ *  The contents of $pane->configuration.
+ * @return The rendered pane.
+ */
+function signup_form_render($node, $conf) {
+  return _signup_node_output($node);
+}
+
+/**
+ * Returns an edit form for the custom type.
+ */
+function signup_admin_edit_signup_form($id, $parents, $conf = array()) {
+  $form['id'] = array(
+    '#type' => 'value',
+    '#value' => $id,
+  );
+
+  return $form;
+}
+
+function signup_admin_title_signup_form($conf, $context) {
+  $choices = signup_admin_content_types_signup_form();
+  return t('"@s" @type', array('@s' => $context->identifier, '@type' => drupal_strtolower($choices[$conf['id']]['title'])));
+}
+
