Index: mysite/mysite.module
===================================================================
--- mysite/mysite.module	(revision 981)
+++ mysite/mysite.module	(working copy)
@@ -1844,101 +1844,102 @@
  *
  * @ingroup forms
  */
-function mysite_content_settings_form($data) {
+function mysite_content_settings_form($edit) {
   // the default elements are simply the title and format, other plugins may add elements
   $form['data']['title'] = array(
     '#type' => 'textfield',
     '#title' => t('Content title'),
     '#size' => '40',
     '#maxsize' => '240',
-    '#default_value' => $data['title']
+    '#default_value' => $edit['title']
   );
   $form['data']['original'] = array(
     '#type' => 'value',
-    '#value' => $data['title']
+    '#value' => $edit['title']
   );   
   $form['data']['uid'] = array(
     '#type' => 'value',
-    '#value' => $data['uid']
+    '#value' => $edit['uid']
   );   
   // let the administrator lock this item
-  if (user_access('administer mysite') && $data['uid'] == 0) {
+  if (user_access('administer mysite') && $edit['uid'] == 0) {
     $form['data']['locked'] = array(
       '#type' => 'checkbox',
       '#title' => t('Lock item'),
       '#description' => t('Check this option to display this content to all users at all times.'),
-      '#default_value' => $data['locked'],
+      '#default_value' => $edit['locked'],
     );
   }
   // let the user change region (see http://drupal.org/node/155172)
-  $layout = mysite_get_layout($data['uid']);
+  $layout = mysite_get_layout($edit['uid']);
   $options = ($layout['regions']);
   $form['data']['position'] = array(
     '#type' => 'select',
     '#title' => t('Page region'),
     '#options' => $options,
-    '#default_value' => $data['position']
+    '#default_value' => $edit['position']
   );  
   $form['data']['position_original'] = array(
     '#type' => 'value',
-    '#value' => $data['position']
+    '#value' => $edit['position']
   );     
   // formats for the item -- test the data for format options
-  $func = 'mysite_type_'. $data['type'] .'_data';
-  mysite_load_includes('types', $data['type']);
-  $content = $func($data['type_id']);
+  $func = 'mysite_type_'. $edit['type'] .'_data';
+  mysite_load_includes('types', $edit['type']);
+  $content = $func($edit['type_id']);
   // if the content item returns a 'content' element, it cannot be formatted
   if (empty($content['items'][0]['content'])) {
     $options = array();
     $formats = mysite_load_includes('formats');   // these, too
     foreach ($formats as $format) {
-      $options[$format] = module_invoke('mysite_theme', $format);
+      $data = module_invoke('mysite_theme', $format);
+      $options[$format] = $data['format'] . $data['sample'];
     }
     if ($options != array('default')) {
       $form['data']['format'] = array(
         '#type' => 'radios',
         '#title' => t('Content format'),
-        '#default_value' => $data['format'],
+        '#default_value' => $edit['format'],
         '#options' => $options,
-        '#description' => t("Select a format")
-      );
+        '#description' => t('Select a format.')
+      );      
     }
   }
   else {
     $form['data']['format'] = array(
       '#type' => 'value',
-      '#value' => $data['format']
+      '#value' => $edit['format']
     );     
   }
   $form['data']['format_original'] = array(
     '#type' => 'value',
-    '#value' => $data['format']
+    '#value' => $edit['format']
   );    
   $form['data']['sort_original'] = array(
     '#type' => 'value',
-    '#value' => $data['sort']
+    '#value' => $edit['sort']
   );      
   // get elements from plugins, in needed
-  mysite_load_includes('types', $data['type']);
-  if (function_exists('mysite_type_'. $data['type'] .'_content_form')) {
-    $extra = module_invoke('mysite_type', $data['type'] .'_content_form', $data);
+  mysite_load_includes('types', $edit['type']);
+  if (function_exists('mysite_type_'. $edit['type'] .'_content_form')) {
+    $extra = module_invoke('mysite_type', $edit['type'] .'_content_form', $edit);
     $form['data'] = array_merge($form['data'], $extra);
   }
   $form['data']['mid'] = array(
     '#type' => 'value',
-    '#value' => $data['mid']
+    '#value' => $edit['mid']
   );   
   $form['data']['type'] = array(
     '#type' => 'value',
-    '#value' => $data['type']
+    '#value' => $edit['type']
   );   
   $form['data']['type_id'] = array(
     '#type' => 'value',
-    '#value' => $data['type_id']
+    '#value' => $edit['type_id']
   );     
   $form['data']['uid'] = array(
     '#type' => 'value',
-    '#value' => $data['uid']
+    '#value' => $edit['uid']
   );   
   // take the user back where they came from
   $return = 'view';
@@ -1947,8 +1948,8 @@
     $return = 'content';
   }
   // take the admin user to the admin screen
-  $uid = $data['uid'];
-  if ($data['uid'] == 0) {
+  $uid = $edit['uid'];
+  if ($edit['uid'] == 0) {
     $uid = 'admin';
     $return = 'content';
   }  
