Where can I remove the tags so the Title of the uploaded image isn't brutally bolded? Also, this should be a css thing, right?

Comments

sun’s picture

Component: Miscellaneous » User interface
Status: Active » Closed (won't fix)

This is a CSS thing. You can override the font-weight by using the selector span.inline .caption strong in your theme.

monotaga’s picture

Version: 6.x-1.x-dev » 6.x-3.x-dev
Status: Closed (won't fix) » Active
StatusFileSize
new1.23 KB

In a particular installation, I found it more helpful to override theme_img_assist_inline() in my template.php and give the title and description separate spans with their own classes, esp. because my client wanted to two on separate lines and without the separating colon.

EDIT: The attached patch is wrong. Use the one in my follow-up comment when overriding theme_img_assist_inline().

monotaga’s picture

StatusFileSize
new1.24 KB

Here's the correct patch if you were wanting to override your theme the way that I did. (The patch in #2 is bogus.)

monotaga’s picture

Status: Active » Closed (won't fix)
sun’s picture

Title: Remove <strong> in caption/title. Replace with .css » Improve markup and CSS classes for caption title/description
Category: support » task
Status: Closed (won't fix) » Needs work
+++ img_assist.module	17 Jan 2011 23:24:12 -0000
@@ -1476,13 +1476,13 @@ function _img_assist_textarea_match($for
-    $caption = '<strong>'. $attributes['title'] .': </strong>'. $attributes['desc'];
+    $caption = '<span class="image-assist-caption-title">'. $attributes['title'] .'</span><span class="image-assist-caption-desc">'. $attributes['desc'] . '</span>';

I'd be open to

1) Apply a class on the existing STRONG tag (without changing the tag to a SPAN).

2) Wrap the description in a SPAN, as that shouldn't result in visible styling.

Powered by Dreditor.

monotaga’s picture

sun,

Your suggestions sound fine by me to keep things backwards compatible. Overriding the CSS isn't really that hard, so I don't know why I changed the strong tag to a span.

Would you consider getting rid of the hardcoded ": " between the title and description, though? For the sake of backwards compatibility, perhaps a setting variable could be set up that would be inserted between the two, like :

$caption = '<strong class="image-assist-caption-title">'. $attributes['title'] .$image_assist_caption_separator . '</strong>'. $attributes['desc'];

This could default to ": ", but could be user changeable via the admin settings page.

Another approach could be through an :after pseudo-class on your strong tag.

What do you think? I'll be happy to submit a patch for review based on what you think the best way to go on this is.

Thanks!