Download & Extend

Theme_image needs more information

Project:Image
Version:4.7.x-1.x-dev
Component:image.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

to make nice themed imags, I need more information.

For example http://drupal.org/node/21811 to make images square perfoms horribly bad, because on theme level I have no access to the $bnode object.

This patch intyroduces a simple theme function where we can do really really nifty stuff. Square images, shaded borders, CSSed overlays etcetc.

PLease comment and/or apply.

AttachmentSizeStatusTest resultOperations
theme_inline_image.patch980 bytesIgnored: Check issue status.NoneNone

Comments

#1

bump

#2

maybe I work not enough with drupal to see how to use this in a good way

do you have a good example how to use this new function?

I would like it if the description which is possible now (by upload.module)
would be put into the alt-attribute by default, is this possible with this patch?

#3

Two things I need this patch for are to:
* make thumbnails square with CSs
* Add shadowed borders to the thumbnails

Some more things one can do after this patch is:
* Use any data from the node as alt
* Add CSS watermarks
* Add data about the node to the image, like the title, the comments, the teaser etc. One can indeed do this in the alt tag, but also in any other place.

And no, unfortunately this is not really possible on the level of theme_node, for the images are rendered outside of the node context too. for example in a block.

#4

One more reason why this is bqdly needed.

Currently we pass along the full url to theme_image. I for example, want to do getsize in the theme function, which needs ugly grepping of $base_url, With this patch I have all the data I need for such more advanced theme issues.

Can a maintainer please tell me at least if they want this feature in image module?

#5

what more must I do to get this in focus of the mainainers?

#6

sorry ber - took a little time off for the US holiday last week...

where / how are you using theme_image_inline from?? (and why does this need to be in image.module)?

#7

image module curerntly uses the sidewide theme_image function.

Which means that If i want to style my image.module inline image strings different, I need o do so for any image.

For example: look at the XML icons on http://www.webschuur.com/blog/drupal_blog, it is "square" too, because I want y other images to be square :)

Another example is the abovementioned one, where I want simply more information, I therefore want to have access to the $node object in the theme function. It is near to impossible (only possible with database queries against the files DB) to get that information when the theme function is building the "img string"

and as you can see, the new theme_inline_image is not much moer than an image module specific wrapper around the global theme_image. So, by default, nothing much happens. Just in case one needs advancs img strings, this function will allow that.

#8

Hi,

Is this patch only to use with inline images or I can use it to make square thumbnails in my image gallery?

Thank you

#9

i think it's a good idea to add the theme function but i really don't like the name.

#10

Version:6.x-1.x-dev» 4.7.x-1.x-dev
Status:needs review» fixed

From 2005 - possibly a 4.7 problem? Please reopen if it's still a problem.

#11

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.