Closed (fixed)
Project:
Textimage
Version:
5.x-2.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2009 at 13:49 UTC
Updated:
28 May 2009 at 04:10 UTC
It would be nice to have a way to specify custom alt and title tags for textimage presets that are shown via cck/views. Protecting emails with textimage when raw email is visible in alt and title tags is a bit pointless :-)
the only way I found to fix this was to nullify alt and title variables in the return of 'theme()':
Index: /trunk/www/sites/all/modules/textimage/textimage.module
===================================================================
--- /trunk/www/sites/all/modules/textimage/textimage.module (revision 237)
+++ /trunk/www/sites/all/modules/textimage/textimage.module (revision 238)
@@ -841,5 +841,7 @@
return FALSE;
}
- return theme('image', $path, $alt, $title, $attributes, $getsize);
+// return theme('image', $path, $alt, $title, $attributes, $getsize);
+ return theme('image', $path, '', '', $attributes, $getsize);
+
}
It works, but obviously removes alt and title for any other presets as well. Any other ideas on how to fix this would be appreciated :-)
Comments
Comment #1
danielb commentedDo you realise the function you are hacking there is a theme function? This means you can override it yourself in your template simply by copying it, and renaming it to YOURTHEME_textimage_image and pasting it in template.php. Then you can manipulate the output as much as you like for your site.
Comment #2
decipheredWhile in theory I agree, there should be some way to configure, as it's just a formatter for existing CCK widgets there would be nowhere available to define the custom values and creating fields in the widget setup would lead to confusion for those with no intent of using the textimage formatter.
If you can think of a valid solution I would be more than happy to discuss.
My personal thoughts would be implementing the ALT and Title fields in the textimage profile, but it could cause conflicts with textimages that use other textimages for multi-layered textimages.
Daniel is correct, you can easily override the default functionality in your theme without having to hack textimage, so that should fix the issue for you until there is a more realistic option.
Comment #3
decipheredThe following change will be committed ASAP.
In textimage.module change:
to:
This will remove the alt and title values only on the email field.
Cheers,
Deciphered.
Comment #4
decipheredCommitted to HEAD, DRUPAL-6--2 and DRUPAL-5--2.