I would like to have a description field for images that can contain more than 128 characters. I read about the possibility to change the settings for the filefield description, but it was also suggested not to use that field. So now I'm thinking about using the title field (which seems to allow the use of a textarea) or a custom field created with the Imagefield Extended module. To do so, I need to copy the ALT texts of more than a 1000 images to the other field. But the information of those fields are not stored in separate database fields, but inside the 'field_image_data' in the 'content_field_foo' table. Can somebody tell me how I could copy existing data from the ALT field to either the title field or a custom field?
Using CCK 6.x-2.6 and Imagefield 6.x-2.3.
Comments
Comment #1
quicksketchIf you're familiar with PHP, you can write a small script and simply execute it in a PHP node or using the execute PHP block provided by the Devel module.
I haven't checked this code at all, I'd highly suggest doing a database backup before running PHP code against your database.
Comment #2
yan commentedGreat, that works. Thanks! First I didn't realize that 'field_field_data' had to be adjusted, too (in my case: field_image_data). I used the same for a field made with the Imagefield Extended module (I called it 'description_text' and it allows formatting):
Comment #3
summit commentedNice way for a database update switch! greetings, Martijn