I have defined a new content type, that just has a body field, which I define in my install file:
$type = array(
'type' => 'status_update',
'name' => t('Status Update'),
'module' => 'socmed',
'base' => 'node_content',
'description' => t('A Facebook-like status update.'),
'has_title' => FALSE,
'custom' => TRUE
);
// Turn off comments.
variable_set('comment_status_update', 0);
// Fill in remaining defaults, add a body field and save the node type.
$type = node_type_set_defaults($type);
node_add_body_field($type);
node_type_save($type);
I would now like to
a) Create a new text format.
b) Assign that text format to be the default for this content type's body.
c) Set permissions on the text format for normal authenticated users, so that this text format is the only option.
I want to package this up as a module, so I would like to do so programatically, but I'm not sure how to go about it. Any pointers on any of these steps? Thanks!