Suggestion to show file description as caption

Permalink Browser Info Environment
This add-on is a really nice improvement to the Core Image block.

I have hacked my copy to display the file Description property if the Caption is empty. This gives me the option of keeping the information with the image file rather than in the block where it is used. This could be added to the Edit Image Caption form as checkboxes to use the file Description, the Title, or the content of the Image Caption Tiny-MCE block. It would also be nice if there were a button to update file Description or Title from the Image Caption.

Finally, it would be nice if the content of the Title attribute of the <img> tag could be added to the Edit form to give the option of showing a caption as a tooltip.

Type: Discussion
Status: New
waterfeller
View Replies: View Best Answer
12345j replied on at Permalink Reply
12345j
Cool. If you would be willing to share the code with me to show the file description property, I'll try to get that in the next release. As far as the title attribute, thats not going to happen, because I think it goes beyond the intended purpose of this block.
waterfeller replied on at Permalink Reply
waterfeller
I added
$desc = $f->getDescription();

to getContentAndGenerate. Then, if $this->imageCaption is empty, I show $desc else $this->imageCaption. You can see this on my home page athttp://fltconference.org . Hover on an image to see the caption.
tsilbermann replied on at Permalink Reply
tsilbermann
Could you show the whole code you added (which file , where)?
waterfeller replied on at Permalink Best Answer Reply 1 Attachment
waterfeller
Here are the two files I modified. Any cleanup you care to do would be welcome.
tsilbermann replied on at Permalink Reply
tsilbermann
Thanks for the files - works well :-)

Any news about the next release?

Regards

Torsten

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.