Download & Extend

Do not disable body text for container

Project:Daily
Version:6.x-1.1
Component:Code
Category:feature request
Priority:normal
Assigned:Frodo Looijaard
Status:closed (fixed)

Issue Summary

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

#1

Status:active» needs review

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

<?php
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):
<?php
$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.

#2

Assigned to:Anonymous» 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.

#3

Status:fixed» closed (fixed)

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