making ALT text warning optional, adding default CSS
| Project: | Image Caption |
| Version: | 6.x-2.3 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
This module was just what I was looking for. To make it fit just right, I added a couple of tweaks, that I would like for you to consider incorporating. Both changes involve the image_caption_filter module.
1. I added some default CSS when image_caption_filter module is enabled. I do this using hook_init(), and add the css file image_caption_filter.css. This css file provides default styling for .image-left, .image-right, .standalone-image, and .caption.
2. I preferred not to display it to the world if a user omitted ALT text, so I created a filter option to allow the site admin to turn off the warning. It is still enabled by default.
That's what this patch is supposed to do. I used the 6.x-2.3 version to patch against. Please have a look and let me know what you think. Thanks!
| Attachment | Size |
|---|---|
| image_caption_filter-css-and-alt-0.patch | 2.87 KB |

#1
This is a good idea. Subscribing.
#2
@nadavoid,
Your new css file is not included in the patch. Can you provide it? I've added this functionality, plus optional lightbox capability, to a filter for my users, but I'd like to compare your css to mine.
#3
@mstevetodd
Here's the CSS file that I'm currently using.
.image-left,.image-right,
.standalone-image {
display: block;
clear: both;
border: 1px solid #ccc;
padding: 5px;
margin-bottom: 5px;
margin-top: 5px;
}
.image-left {
float:left;
margin-right: 15px;
}
.image-right {
float: right;
margin-left: 15px;
}
.standalone-image {
margin-left: auto;
margin-right: auto;
}
.caption {
text-align: center;
}
#4
Great. Thanks!