0

I am using Drupal 7. I would like to display images with reflection effect.

For Drupal 6 there is module "Imagecache Effects" that offers this option.

For Drupal 7 there is "ImageCache Actions" module, but it does not offer reflection effect, but it provides Custom action effect for php code.

Can I add reflection with some custom php code?

  • 2
    how about downloading the d6 module and look to see how it's doing the reflections in it's php code and then cobbling that together into the d7 module's custom action effect? – Jimajamma Dec 9 '11 at 21:58
  • 2
    Have you tried the D7 port ? – tostinni Dec 9 '11 at 22:27
  • @Jimajamma I took a look at php code. I am newbie at php, so the code looks complicated. I received some answer [link]drupal.org/node/1366668[link]. I will try to figure out this. – user1513 Dec 10 '11 at 15:11
1

If you're comfortable with modifying a little your theme, you can use a plugin like Reflection.js for jQuery.

  • Thanks. I added extra class to img tag and it works fine. – user1513 Dec 10 '11 at 21:12
0

I'm not sure if you know how to add CSS to your theme, but it's pretty straightforward. We've written a blog post about how to add it, here Adding CSS in Drupal Design

The reason I mention it, is that it seems the most practical way of gaining these effects, as not everything aesthetic requires a Drupal module.

Should you want to use CSS3 for example, you can easily achieve the effect you require and you can add a CSS ID or Class to certain images once you have input the required CSS code.

This article is a good tutorial on how to achieve the effect that you require: Create reflection effect using CSS3

In addition, there are jQuery plugins that can help you to create the reflection affect, however the JQuery plugin site is down (under redesign) so I think the CSS3 option is a good solution in the interim.

  • I was thinking about CSS3, but in IE it does not work properly. I must say that the CSS3 tutorial is amazing. Thanks. – user1513 Dec 10 '11 at 14:59
  • 1
    You're welcome, as usual IE causes problems, but there are workarounds. – David Dec 10 '11 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy