Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi and thanks a lot for a great module.
However, apart from the clumsy built in image upload of FCK editor (which you will change in v2) there is one little thing that I am missing and which makes Image Assist an alternative to image browser: This is the option to somehow use captions for images that will display nicely below or on the side of an image. Do you think this could be added to Image Browser?
If not: does anybody know an easy way (easy as in usable for the end user) to allow for the use of captions in combination with image browser?
Thanks a lot in advance!
Comments
Comment #1
jdelaune CreditAttribution: jdelaune commentedSorry captions isn't something I plant to implement in the future. However once we go more towards the filefield route I imagine we could utilise the description field for captions. So there are possibilities in the future.
Comment #2
jp.stacey CreditAttribution: jp.stacey commentedImage Browser is a great module, and has really improved the user experience for our clients here at Torchbox. But this is something we really wanted to implement, so please find attached a dev patch for the 6.x-2.x-dev branch.
Edit: please try patch on #423522-3: Captions for Image Browser instead: 423522-captions-image-browser.patch.3.txt.
It implements captions at the point of inserting the image into the rich-text editor. Currently only supported for TinyMCE.
It's not perfect - the caption is inserted into the TinyMCE HTML as a plain span, to keep things simple - but it could be a good starting point for something to go into the module.
Use at your own risk: square brackets have been known to make everything go crazy, including our poor developers :)
Comment #3
jp.stacey CreditAttribution: jp.stacey commentedHere's a better patch: the last one suffered from being edited by hand.
Comment #4
victoriachan CreditAttribution: victoriachan commentedI've updated jp.stacey's patch to update the markup so the wrapper div can wrap up the caption nicely. This involves assigning the selected image class to the wrapper div instead of the image when there is caption defined.
Also the wrapper div is given the width of the image (unfortunately using inline style) so it can wrap the caption for floating left/right.
Cheers,
Victoria
Comment #5
victoriachan CreditAttribution: victoriachan commentedUpdating the patch to use theme() function instead of theme_ibimage() and theme_ibimage_with_caption() so these can be overridden on template.php.
Comment #6
victoriachan CreditAttribution: victoriachan commentedOops I missed out one theme function call. Sorry, here's the updated patch.
Comment #7
lazysoundsystem CreditAttribution: lazysoundsystem commentedHaving trouble applying patch 6 with drush_make due to whitespace errors. Here it is again with whitespace trimmed from the end of 3 lines...
(Edit: it wasn't the whitespace that was at fault.)