? chipin.info
Index: chipin.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/chipin/chipin.module,v
retrieving revision 1.5
diff -u -p -r1.5 chipin.module
--- chipin.module	31 Aug 2006 23:43:41 -0000	1.5
+++ chipin.module	18 Jan 2007 00:23:55 -0000
@@ -96,7 +96,8 @@ function chipin_menu($may_cache) {
     $items[] = array(
       'path' => 'chipin/wizard',
       'title' => t('ChipIn Flash Widget Wizard'),
-      'callback' => 'chipin_wizard',
+      'callback' => 'drupal_get_form',
+      'callback arguments' => array('chipin_wizard_form'),
       'access' => user_access('access content'),
       'type' => MENU_CALLBACK,
     );
@@ -123,7 +124,7 @@ function chipin_settings() {
     '#type' => 'markup',
     '#value' => '<p>'
       . t('ChipIn empowers individuals to connect with people in their social network to collect money for a personal cause, to purchase a gift, or for community fundraising. ChipIn makes this <strong>social ecommerce</strong><sup>SM</sup> process of connecting and collecting fun, easy and secure. ChipIn believes that positive change will result from enabling groups to harness the power of giving. That\'s the ChipIn mission.')
-      . ' ' . t('Learn more on the %chipin-link.', array('%chipin-link' => l(t('ChipIn help page'), 'admin/help/chipin')))
+      . ' ' . t('Learn more on the <a href="@chipin-link">ChipIn help page</a>.', array('@chipin-link' => url('admin/help/chipin')))
       . '</p>',
   );
 
@@ -151,11 +152,11 @@ function chipin_settings() {
   }
   else {
     $options = array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.'));
-    $description = t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are '%blog' for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => theme('placeholder', 'blog'), '%blog-wildcard' =>  theme('placeholder', 'blog/*'), '%front' => theme('placeholder', '<front>')));
+    $description = t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are '%blog' for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>'));
 
     if ($access) {
       $options[] = t('Show if the following PHP code returns <code>TRUE</code> (PHP-mode, experts only).');
-      $description .= t(' If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can break your Drupal site.', array('%php' => theme('placeholder', '<?php ?>')));
+      $description .= t(' If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can break your Drupal site.', array('%php' => '<?php ?>'));
     }
     $form['visibility']['chipin_access'] = array(
       '#type' => 'radios',
@@ -188,7 +189,7 @@ function chipin_settings() {
  *   Specify with what type of editor (if any) we are working. Planned for
  * future use as a TinyMCE plugin.
  */
-function chipin_wizard($editor = 'textarea') {
+function chipin_wizard_form($editor = 'textarea') {
   //drupal_set_title(t('ChipIn Flash Widget Wizard'));
 
   $text_attributes = array(
@@ -376,7 +377,7 @@ function chipin_wizard($editor = 'textar
   $form['help'] = array(
     '#type' => 'markup',
     '#value' => '<div style="padding: 10px 0; clear: both;">'
-      . t('<strong>Don\'t have your ChipIn event ID?</strong> Your ChipIn event ID can be found at the bottom of your %chipin-status-page.', array('%chipin-status-page' => l(t('ChipIn status page'), 'http://www.chipin.com', array('target' => '_blank'), NULL, NULL, TRUE)))
+      . t('<strong>Don\'t have your ChipIn event ID?</strong> Your ChipIn event ID can be found at the bottom of your <chipin-status-page">ChipIn status page</a>.', array('@chipin-status-page' => url('http://www.chipin.com', array('target' => '_blank'), NULL, NULL, TRUE)))
       . '</div>',
   );
 
@@ -385,9 +386,7 @@ function chipin_wizard($editor = 'textar
     '#value' => '',
   );
 
-  $output = drupal_get_form('chipin_wizard', $form);
-  $output = theme('chipin_popup_page', $output);
-  print $output;
+  return $form;
 }
 
 
@@ -402,7 +401,7 @@ function chipin_wizard($editor = 'textar
  *
  * @ingroup themeable
  */
-function theme_chipin_wizard($form) {
+function theme_chipin_wizard_form($form) {
   // Render the event text fields.
   $rows = _chipin_get_table_rows($form['event'], 2, array('label', 'field'), 'field');
   $output .= theme('table', array(), $rows, array('id' => 'titledesc'));
@@ -413,20 +412,26 @@ function theme_chipin_wizard($form) {
 
   // Render the color swatches and spectrum.
   $rows = _chipin_get_table_rows($form['colors'], 6, array('label', 'field', 'swatch'), 'field');
-  $output .= form_render($form['colors']['header']);
+  $output .= drupal_render($form['colors']['header']);
   $output .= theme('table', array(), $rows);
-  $output .= form_render($form['colors']['spectrum']);
+  $output .= drupal_render($form['colors']['spectrum']);
 
   // Render the checkboxes.
-  $output .= form_render($form['show']['header']);
+  $output .= drupal_render($form['show']['header']);
   $rows = _chipin_get_table_rows($form['show'], 4, array('field', 'label'), 'field');
   $output .= theme('table', array(), $rows, array('id' => 'showtable'));
 
   // Render the rest of the items in the right column and theme the outer table.
-  $rows = array(array(array('data' => $output, 'style' => 'vertical-align: top;'), array('data' => form_render($form), 'style' => 'vertical-align: top;')));
+  $rows = array(
+    array(
+      array('data' => $output, 'style' => 'vertical-align: top;'), 
+      array('data' => drupal_render($form), 'style' => 'vertical-align: top;')
+    )
+  );
   $output = '<div class="highlightFormSection">'
     . theme('table', array(), $rows, array('id' => 'widgetformtable', 'style' => 'z-index:0;'))
     . '</div>';
+  
   return $output;
 }
 
@@ -460,7 +465,7 @@ function _chipin_get_table_rows(&$form, 
   foreach (element_children($form[$primary_field]) as $key) {
     foreach ($fields as $field) {
       if (isset($form[$field][$key])) {
-        $row[] = form_render($form[$field][$key]);
+        $row[] = drupal_render($form[$field][$key]);
       }
       else {
         $row[] = '&nbsp;';
