Token support for custom alternate/title text

Keyz - August 21, 2007 - 05:25
Project:ImageField
Version:5.x-2.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I tried out the new 5.x-2.x-dev version and dig the future support of Token module. I was wondering if it would be possible to add Token support to the "Custom alternate and title text" textfields?

My use case is:
The user uploads an image into an imagefield... if the option is turned on, when the user uploads an image and the preview image is displayed, the "Alternate text" and "Title" fields are pre-populated with the predetermined token (in my own case, this would be the Node Title - assuming the Title field is filled in). In certain situations (such as when the image is for a photo gallery, or otherwise the primary content of the node, etc) this would eliminate the extra steps of the user adding the Alt/Title (which otherwise they may find inconvenient or not understand its importance, and skip doing). By doing it automatically for them the site's accessibility is improved, and improves the image's relevance/optimization for image searches, and also ensures that there will always be a description for the image if it is viewed in Thickbox or similar modules that rely on the image title.

Anyhow, just wanted to propose the idea.
Thanks for the terrific module :)

#1

quicksketch - October 19, 2007 - 08:10

Unfortunately this wouldn't work like you're picturing. If a user is uploading an image, they haven't yet entered a title and so the imagefield alt/title fields couldn't possibly be preloaded with the title.

#2

psynaptic - December 15, 2007 - 12:04

This is something that we also would like. There has been a little discussion on this over at ubercart.org so I know there are more people who'd like this feature. I've been thinking of making a module to copy the node title to the field_image_cache_title and field_image_cache_alt provided by Ubercart. There is an nid column which we could use to create this functionality but it would be better to have it integrated.

Instead of pre-populating the value of the input fields on the form, maybe having a checkbox that asks "Use node title as image alt and title text" would work, this way the node title would have been entered by the time the form is submitted.

#3

dopry - December 17, 2007 - 02:53

Lets consider this for 2.1... I don't want to work on any new features until 2.0 is released...

#4

psynaptic - December 21, 2007 - 12:31

Hi dopry, that's great. Thanks :)

#5

dopry - August 1, 2008 - 07:09
Status:active» fixed

this is actually implemented in 6.x - 3.x.

#6

Anonymous (not verified) - August 15, 2008 - 07:13
Status:fixed» closed

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

#7

phonydream2 - September 5, 2008 - 12:24

Subscribe. Looking for this on 5.

 
 

Drupal is a registered trademark of Dries Buytaert.