I needed to change the body label of image node types from "Body" to something like "image description".
The same way this hook is implemented in the blog module. Maybe this is a dupe. If not maybe someone wants to make a patch...
/**
* Implementation of hook_form
*/
function image_form(&$node, &$param) {
_image_check_settings();
// new line
$type = node_get_types('type', $node);
// ...
// changed line
$form['body'] = array('#type' => 'textarea', '#title' => check_plain($type->body_label), '#rows' => 20, '#default_value' => $node->body);
// ...
btw, great module :-)
Comments
Comment #1
drewish commentedhere's a patch that does this and cleans up some formatting.
Comment #2
drewish commenteddavidstrauss pointed out that the has_title check might not be the best idea. i'll skip that for now. if people start demanding it i reserve the right to change my mind. i'm gonna commit the attached.
Comment #3
drewish commentedaccording to http://drupal.org/node/152626 this isn't fixed...
Comment #4
drewish commentedwell i guess i committed the fix but i need to do a new release.
Comment #5
schnizZzla commentedthanks for taking on this issue!
Comment #6
drewish commentedi'm calling it fixed since it's in CVS. i'm going to give it a week and if there's no new bug reports i'll create a new release.
Comment #7
coldfly commentedyes, it works.
but i have found that you have removed " '#rows' => 20, " in line 475 in the latest release 1.3.
Is there anything missing?
Comment #8
drewish commentedyes i pulled that out. it was causing a huge body field to be displayed. images aren't blog posts so they usually don't need as large a description.
Comment #9
coldfly commentedIt's OK.
But If someone use WYSIWYG editor (like tinymce), this body field would be too short to be edit.
Comment #10
schnizZzla commentedoh, I just saw this was taken in to the 1.3 version.
thank you, another custom patch I don't need to remember... ^_^
Comment #11
drewish commentedcoldfly, eh, maybe we could increase the default... but it seems like a feature request for the WYSIWYG editor, it should ensure that all textfields it edits should be larger than x rows.
Comment #12
Hetta commentedJust a heads-up:
Put some text in the "body" field under admin/content/types/image .
If that field is empty, you'll have no body field on your image node editing form (node/$number/edit).
Comment #13
(not verified) commented