adding new field to imceimage I have imceimage.module,v 1.1.2.4. the default of this module is to create a table for the field i want to create as below:



desc content_field_slideshow_image;
+-----------------------------------------+------------------+------+-----+---------+-------+
| Field                                   | Type             | Null | Key | Default | Extra |
+-----------------------------------------+------------------+------+-----+---------+-------+
| vid                                     | int(10) unsigned | NO   | PRI | 0       |       |
| nid                                     | int(10) unsigned | NO   | MUL | 0       |       |
| delta                                   | int(10) unsigned | NO   | PRI | 0       |       |
| field_slideshow_image_imceimage_path    | char(255)        | YES  |     |         |       |
| field_slideshow_image_imceimage_width   | int(11)          | NO   |     | 0       |       |
| field_slideshow_image_imceimage_height  | int(11)          | NO   |     | 0       |       |
| field_slideshow_image_imceimage_alt     | text             | YES  |     | NULL    |       |


and i want to add new field for seo_alt


| field_slideshow_image_imceimage_seo_alt | varchar(255)     | YES  |     | NULL    |       |


I have doen this:
1- i have altered the table  alter table content_field_slideshow_image add  field_slideshow_image_imceimage_seo_alt varchar(255);
2- added 'imceimage_seo_alt' => array('type' => 'varchar', 'length' => 255)); in imceimage_field_settings hook
3-changed #columns in imceimage_elements hook to be  '#columns' => array('imceimage_path','imceimage_width','imceimage_height','imceimage_alt','imceimage_seo_alt'),
4- added $element['#value']['imceimage_seo_alt'],  to $element['imce_view'] in imceimage_process hook
but now when i edit a slideshow and add the imceimage_seo_alt, it wouldn't be saved in the database :(... what shall i do to add this customized field??
Thanks for your help
You have taken the wrong approach. It's not as simple thing to do as you would like.

What's needed depends on your Drupal version 6 or 7. The columns in the table for the field is created though the field definition that defines which columns are needed. It's not possible to alter this without hacking the module that provides the field. This is not the approach you want to take.

Instead you need to create your own version of the field definition. You should be able to copy most of the code and alter the bits needed for the table definition. Only field or cck knows that the table contains the column for SEO it will also save and load values for that column. If you are not familiar with CCK/Fields it might take a little while to get things working. Also a down side is that you most likely will create your own version of the image field that you will have to maintain.

An alternate solution is to not store the values in the field table, but create your own table and handle saving and loading the data yourself. If you don't need integration with Views, this would probably end up as a cleaner solution.