making ALT text warning optional, adding default CSS

nadavoid - May 26, 2009 - 05:40
Project:Image Caption
Version:6.x-2.3
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

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!

AttachmentSize
image_caption_filter-css-and-alt-0.patch2.87 KB

#1

matthew petty - September 5, 2009 - 15:36

This is a good idea. Subscribing.

#2

mstevetodd - September 25, 2009 - 15:00

@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

nadavoid - September 25, 2009 - 15:15

@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;
}

AttachmentSize
image_caption_filter.css_.zip 325 bytes

#4

mstevetodd - September 25, 2009 - 17:06

Great. Thanks!

 
 

Drupal is a registered trademark of Dries Buytaert.