I don't so much need to remove it as render it invisible to users authorized to create Image nodes. I realize I could use CCK to make a node type with just an image field. But then I would lose all the global image management settings provided by the Image Module. Any way hack the standard Image node type to remove the Body field?

Jack

Comments

pobster’s picture

No need for messy hacks, I reckon this will work fine and allow you to upgrade the image module as well... Check out your node_type table in your database, there's a field called 'has_body' where '1' is TRUE and '0' is FALSE. Just find the entry for image and alter has_body to '0'.

Pobster

--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------

2houseplague’s picture

That certainly sounded like a great idea. But alas, the setting is already "0"...

My tables.

Weird.

herojig’s picture

thx!!!

Phoenix.Consultants.Nepal (www.phoenixstudiosnepal.com)

2houseplague’s picture

It bears mentioning, also, that the image content type settings on this page -- /admin/content/types/image -- do offer:

"To omit the body field for this content type, remove any text and leave this field blank."

But the result of "omitting" the Body field in this way is only that the Body field is not REQUIRED. However, it is still visible to users and they are free to use it, which is what I'm trying to avoid.

dman’s picture

Messy fix, but I've hidden core fields using CSS.
Just add ... oh. On inspection I see that's not easy in my current theme. Especially with a WYSIWYG turned on. Dang. Might be time for a form_alter tweak :(

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

2houseplague’s picture

I'm happy to try your messy approach. Perhaps my theme is more amenable to that sort of tweak :)

shyamala’s picture

I have encountered the same problem, the has_body field gets set to zero if I leave the Body title empty, but the body field still gets displayed. I want to continue using the image module for all the features, and not the image CCK. ANY tweak is welcome.
Thanks

herojig’s picture

i guess this has never gotten resolved...

Phoenix.Consultants.Nepal (www.phoenixstudiosnepal.com)

pobster’s picture

Ummm... Yes it did? Edit the content type and remove the title for the body field, this removes the body as per the description;

"To omit the body field for this content type, remove any text and leave this field blank."

Pobster