My favorites | Sign in
Project Logo
             
Search
for
Updated Dec 13, 2008 by cliffano
Reflection  

Reflection is a WordPress plugin which applies reflection effect to images with 'reflection' as one of the HTML attribute class values.

This plugin uses Raphael JavaScript library to create the reflection effect. It only supports Firefox 3.0+, Safari 3.0+, Opera 9.5+, and Internet Explorer 6.0+. On other browsers, you'll only see the image without the reflection.

View Demo Download

Installation

  1. Unzip reflection-version.zip to wp-content/plugins/ .
  2. Go to 'Manage Plugins' page and activate Reflection plugin.

Usage

Screenshots

Default reflection

Gradient reflection (best on a dark background)

Plugin settings page on WordPress admin

Reflection Types

Changelog


Comment by dsterin, Apr 05, 2009

Hi, great plugin. If i'm working in Wordpress, is there a way that the reflection will also show the borders of the image? Thanks!

Comment by cliffano, May 01, 2009

Hi, sorry for the late reply, I just returned from a trip.

Reflection Plugin reflects the image itself, so if the border is part of the image, it will reflect the border. But if the border is part of the HTML/CSS, then unfortunately it won't.

HTH

Comment by iJakeOnline, Jul 07, 2009

I love this plugin, but how do you keep it from breaking after each reflection?

Comment by cliffano, Jul 09, 2009

iJakeOnline, do you mean like the second and third example images with reflection on the demo page? http://blog.qoqoa.com/2008/12/06/testing-reflection-plugin/

If so, you need to set alignment (left or right) on the image edit functionality. Otherwise, please provide more information on what you're trying to do :).

Thank you.

Comment by annakcallahan, Aug 21, 2009

is there a way to add 1 pixel of space between the image and the reflection?

on this page there were these two suggestions but I'm not sure where to add them.

http://www.pixelbox.net/2008/09/16/image-reflection-with-jquery/

img.reflected { margin-bottom: 2px }

reflection.style.marginTop = ‘2px’;

Comment by cliffano, Aug 24, 2009

annakcallahan,

the only way to add that 1 pixel is by modifying displayDefaultReflection and displayGradientReflection functions in reflection.js file.

the URL you provided explained how to do it with JQuery and the code snippet is CSS. reflection plugin works differently, it uses SVG without JQuery and CSS.

If you're interested, I can prepare a patched reflection plugin with the additional 1 pixel. Just let me know.

Comment by annakcallahan, Aug 25, 2009

That would be great! I would really appreciate it. Or, if it would be easier you could just tell me what to change in those sections.

Comment by cliffano, Aug 26, 2009

annakcallahan,

For displayDefaultReflection, you need to modify line 21: this.raphael.image(this.image.src, 0, this.image.height - 1, this.image.width + 1, this.image.height).scale(1, -1).attr({opacity: .5}); change the '- 1' in 'this.image.height - 1' (the 3rd function argument) to '+ 0', '+ 1', etc API is here http://raphaeljs.com/reference.html#image

For displayGradientReflection, you need to modify line 27: this.raphael.rect(-1, this.image.height - 1, this.image.width + 5, this.reflectionHeight + 5).attr({gradient: gradient, stroke: 'none'}); change the '- 1' in 'this.image.height - 1' (the 2nd function argument) to '+ 0', '+ 1', etc

When you test your change, make sure you hit CTRL+F5 so that you don't get the cached javascript code.

Have fun experimenting. :)

Comment by cliffano, Aug 26, 2009

Forgot to mention, the API for the change in displayGradientReflection is here http://raphaeljs.com/reference.html#rect

Comment by annakcallahan, Aug 26, 2009

Thanks, that worked! One other question, I want to get my images to look like this:

http://blog.4culture.org/2009/08/artists-guiding-you-through-the-fourth-dimension/

where the fade ends gradually instead of a straight line. i have this one that i use through fireworks

http://www.gridlinked.info/reflections-made-easy-with-fireworks-cs4-commands/

Is there a way to use this javascript file to change yours so that it has a gradual fade out?

Thanks again, anna

Comment by fo...@ka81.com, Nov 10, 2009

i use this code in post (wordpress):

-- <a rel="attachment wp-att-87" href="http://test.com/?attachment_id=87"><strong><img class="size-full wp-image-87 alignright reflection" title="test" src="http://test.com/wp-content/uploads/2009/08/test.jpg" alt="test" width="230" height="173" /></strong></a> -- Reflection is working! But, alignright - NO!! How to deal with it?

Please, help!!


Sign in to add a comment
Hosted by Google Code