There's no alt-text option for the image I add. There's a field for it in the database. Am I missing something or is it on it's way?

Comments

simmoe’s picture

I also miss this very much - without it the code wont pass as strict xhtml

yang_yi_cn’s picture

Status: Active » Needs review

The code was almost there! Just didn't make a place to enter it. I've make a patch:

search imceimage.module, near the bottom, in function imceimage_process, change
the following

  	$element['imceimage_alt'] = array(
      '#type' => 'hidden',
      '#value' => $element['#value']['imceimage_alt'],

to

  if ($element['#value']['imceimage_path']) {
  	$element['imceimage_alt'] = array(
	  	'#type' => 'textfield',
  		'#id' => "imceimagealt-$delta-$field_id",
      '#default_value' => isset($element['#value']['imceimage_alt']) ? $element['#value']['imceimage_alt'] : NULL,
      '#autocomplete_path' => $element['#autocomplete_path'],
      '#size' => 60,
      '#attributes' => array('class' => 'text'),
      // The following values were set by the content module and need
      // to be passed down to the nested element.
      '#title' => t('alter text'), 
      '#description' => t('The alter text for this image.'), 
    );
  }
  else{
  	$element['imceimage_alt'] = array(
      '#type' => 'hidden',
      '#value' => $element['#value']['imceimage_alt'],
    );
  }
yang_yi_cn’s picture

Status: Needs review » Fixed

I recently got the co-maintain right of this project, so committed and rolled a new release.

yurtboy’s picture

I will try this out? Or is there a version I should just download?

yang_yi_cn’s picture

The changes has been there in 6-1.0-beta1 version.

jenpasch’s picture

I have the latest 6-1.0-beta1. Not clear how to enter title/alt/etc...
Advice?
Thanks

(on reviewing the code again, is the "title" called "caption" ?)

yang_yi_cn’s picture

yeah, did you see the input field 'caption' when you editing the node ?

phpgeek’s picture

Actually i dont think this one is fixed.

The caption field is shown when your editing the node - but not when you create the node. It is kind of stupid that you need to create the content, save the node - and then edit the node to add caption? I can't follow this logic.

I'm a bit busy at the moment - but if there isn't any fixes in next week - i will try to write a small patch to get this working.

yang_yi_cn’s picture

Status: Fixed » Active

interesting...

yurtboy’s picture

works here is I am super admin but not a regular user?

yurtboy’s picture

ignore that it works for all the needed users. I am going to open up a request though cause I do no see the caption field until I first upload an image.

ball.in.th’s picture

Subscribing. This is wonderful. Could "Title" be added as well? Like in ImageField, you can set both "Title" and "ALT" text. Title would normally get displayed as a tooltip with most browsers.

momper’s picture

sub

danepowell’s picture

danepowell’s picture

Status: Active » Fixed

That issue that I linked to turned out to be a Views bug.

It sounds like this issue is fixed, so I'll mark it as such.

@ball.in.th, if you are still interested in title attribute please open a separate issue for that.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.