It would be helpful - in my implementation at least - to have the body text available to have an intro to my daily feature. It seems it would be easy enough for a user to ignore it if needed, while having the body available may help others. It seems unnecessary to me to disable this text area for the daily container content type.

Comments

EvanDonovan’s picture

Status: Active » Needs review

Change the daily_node_info function in daily_container.inc to the following:

function daily_node_info() {
  return array("daily_container" => 
           array('name' => t("Daily container"),
                 'module' => 'daily',
                 'description' => t("A daily container is a node which displays daily changing content."),
				 'has_body' => TRUE,
				 'body_label' => t('Content'),
				 'min_word_count' => 0,
                ),
              );
}

Then add the following lines of code to the daily_form function (in the same file):

$form['body_filter']['body'] = array(
    '#type' => 'textarea',
    '#title' => $node_info['mymodule']['body_label'],
    '#default_value' => $node->body,
    '#weight' => 0,
    '#rows' => 20,
  );
  $form['body_filter']['filter'] = filter_form($node->format);
  $form['body_filter']['#weight'] = -3;

I used http://www.leveltendesign.com/blog/dustin-currie/drupal-6-node-skeleton as a guide to making these changes.

Frodo Looijaard’s picture

Assigned: Unassigned » Frodo Looijaard
Status: Needs review » Fixed

Thanks for the suggestions and code. I have now enabled this, though I did not use your patch suggestion but rolled my own, simpler version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.