Reflections

By SquarkSquark

Description

This solution allows to make a reflection of every image inserted in your page. All you have to do is to embed the code below and then add a "reflect" class to an image and some additional parameters, like this:
[[image wikidot._logo.png class="reflect ropacity=33 rheight=50"]]

  • ropacityxx — change the opacity of the reflection (given in %)
  • rheightyy — change the height/lenght of the rflection (given in %)

Code

PLEASE - Notice the "SPACE" INSIDE THE embbed "COM" of the src= command line!

If you try to save the page - you get the old ( wrong!) code block again!

Put the space out and you cannot save the original src=… into a code block!

But you can use it in any Action !
(have a look on the "view source button" - bottom of left side menu - how this is realy done!)

[[embed]]
<script type="text/javascript" src="http://static.wikidot.co m/common--misc/reflection.js"></script>
[[/embed]]
[[image http://www.wdfiles.com/local--files/media:files/wikidotlogo_200_2.png class="reflect ropacity33 rheight50"]]
The same without the reflection:
[[image http://www.wdfiles.com/local--files/media:files/wikidotlogo_200_2.png]]

In action


wikidotlogo_200_2.png
The same without the reflection:
wikidotlogo_200_2.png

Centered version:

wikidotlogo_200_2.png

= [[image http://www.wdfiles.com/local--files/media:files/wikidotlogo_200_2.png class="reflect ropacity33 rheight50" style="margin: 5px auto"]]

Notes:

  • Only one embed per page (not per image) is enough for this to work
  • Preview does not enable reflections
  • You need a special trick to let the code work with centered images in Mozilla (see above)

Rate this solution

If you think this solution is useful — rate it up! Or dump it otherwise.

rating: +27+x
wowstrategywowstrategy 1218152604|%e %b %Y, %H:%M %Z|agohover

how can i apply this to the logo on the title bar which i am defining through css? thanks!

unfold by wowstrategywowstrategy, 1218152604|%e %b %Y, %H:%M %Z|agohover
Re:
michal frackowiakmichal frackowiak 1218179029|%e %b %Y, %H:%M %Z|agohover

Hi,

I do not think so — you must add a special class to the image element which you cannot do for fixed template elements like the page title bar.


Michał Frąckowiak @ Wikidot Inc.
Visit my blog at michalf.me

unfold Re: by michal frackowiakmichal frackowiak, 1218179029|%e %b %Y, %H:%M %Z|agohover
Re:
GabrysGabrys 1218795306|%e %b %Y, %H:%M %Z|agohover

You can "try" it on a separate page, do a screenshot of the result, crop the image with any image editing program and then add the the logo to the header. Hope this helps!


Piotr Gabryjeluk
visit my blog

unfold Re: by GabrysGabrys, 1218795306|%e %b %Y, %H:%M %Z|agohover
Pretty Cool
Ashish TripathiAshish Tripathi 1227701285|%e %b %Y, %H:%M %Z|agohover

I want to change direction of reflection How I can change it.

unfold Pretty Cool by Ashish TripathiAshish Tripathi, 1227701285|%e %b %Y, %H:%M %Z|agohover
Re: Pretty Cool
SquarkSquark 1227701934|%e %b %Y, %H:%M %Z|agohover

What do you mean to change direction? You want the direction to be e.g. on the top of the image? Nevertheless it is not possible. Reflections works only on the bottom, as the reflection usually is — reflecting from the surface.


Wikidot Team

unfold Re: Pretty Cool by SquarkSquark, 1227701934|%e %b %Y, %H:%M %Z|agohover
Make Your Own Reflections
Ed JohnsonEd Johnson 1228826410|%e %b %Y, %H:%M %Z|agohover

There are a number of good tutorials on how to make reflections all over the web (try searching "gimp reflection" in Google). Making your own would give you more control over the direction and angle of the reflection.

Here's one tutorial using GIMP or Inkscape:

http://howto.nicubunu.ro/inkscape_gimp_reflections/

-Ed

unfold Make Your Own Reflections by Ed JohnsonEd Johnson, 1228826410|%e %b %Y, %H:%M %Z|agohover
rhombus prhombus p 1228870696|%e %b %Y, %H:%M %Z|agohover

i cant seem to figure out how to get this to work. please help.

unfold by rhombus prhombus p, 1228870696|%e %b %Y, %H:%M %Z|agohover
SquarkSquark 1229330579|%e %b %Y, %H:%M %Z|agohover

You just have to add [[embed]] ... [[/embed]] code on your page (wherever) and add parameters to the image you want to be with the reflection: class="reflect ropacity=33 rheight=50".


Wikidot Team

unfold by SquarkSquark, 1229330579|%e %b %Y, %H:%M %Z|agohover
problems
ZwadaZwada 1233118928|%e %b %Y, %H:%M %Z|agohover

I am pasting the embed through /embed in the page and including the added material to the image yet it keeps telling me the embeding isnt recognized… any ideas?

unfold problems by ZwadaZwada, 1233118928|%e %b %Y, %H:%M %Z|agohover
nm
ZwadaZwada 1233119203|%e %b %Y, %H:%M %Z|agohover

ok well i took a different approach because the pasting was seperating the code… now its having some sort of, "stack overflow at line 2" issue.

unfold nm by ZwadaZwada, 1233119203|%e %b %Y, %H:%M %Z|agohover
Looks like you have managed your coding?
Helmuti_pdorfHelmuti_pdorf 1233238768|%e %b %Y, %H:%M %Z|agohover

Site & page: http://hopereborn.wikidot.com/start

The picture ( logo ?) on the side panel is fine!

Well done..


Service is my success. My webtips:www.blender.org, www.zusi.de (Demo-Video)

Wollen Sie Wikidot helfen im deutschen » Handbuch ?

unfold Looks like you have managed your coding? by Helmuti_pdorfHelmuti_pdorf, 1233238768|%e %b %Y, %H:%M %Z|agohover
I got it to work
ghijghij 1235008217|%e %b %Y, %H:%M %Z|agohover

I couldn't get this to work either. Then looking at the actual source code for this page, I found the code snippet above is not the same as the code this page is using to display the example. Furthermore, when I try to show the correct code in a code box, it changes to the incorrect code shown above.

To get this to work, take the "v—15/" off the path in the embed statement.

So the src= should be src="hxxp://static.wikidot.com/common—misc/reflection.js"

(change hxxp to http. I did that so that it won't be a live link. No matter what I do, the v—15 keeps coming back when I use the code box)

Hope this helps those who want to get this to work.

unfold I got it to work by ghijghij, 1235008217|%e %b %Y, %H:%M %Z|agohover
Lookslie a redirect to a complete different page
Helmuti_pdorfHelmuti_pdorf 1235041763|%e %b %Y, %H:%M %Z|agohover

The code is really wrong!
Thanks to mention this


Service is my success. My webtips:www.blender.org, www.zusi.de (Demo-Video)

Wollen Sie Wikidot helfen im deutschen » Handbuch ?

unfold Lookslie a redirect to a complete different page by Helmuti_pdorfHelmuti_pdorf, 1235041763|%e %b %Y, %H:%M %Z|agohover
So is there an example of woring code?
HobStarCSHobStarCS 1241602047|%e %b %Y, %H:%M %Z|agohover

Anybody have an example of working code?

unfold So is there an example of woring code? by HobStarCSHobStarCS, 1241602047|%e %b %Y, %H:%M %Z|agohover
Re: So is there an example of woring code?
Helmuti_pdorfHelmuti_pdorf 1241684697|%e %b %Y, %H:%M %Z|agohover
[[embed]]
<script type="text/javascript" src="http://static.wikidot.com/v--33/common--misc/reflection.js"></script>
[[/embed]]
[[image http://www.wdfiles.com/local--files/media:files/wikidotlogo_200_2.png class="reflect ropacity33 rheight50"]]
The same without the reflection:
[[image http://www.wdfiles.com/local--files/media:files/wikidotlogo_200_2.png]]

Exchange in the code above only the "Image" data with your picture.. this should work I think.


Service is my success. My webtips:www.blender.org, www.zusi.de (Demo-Video)

Wollen Sie Wikidot helfen im deutschen » Handbuch ?

unfold Re: So is there an example of woring code? by Helmuti_pdorfHelmuti_pdorf, 1241684697|%e %b %Y, %H:%M %Z|agohover
Re: So is there an example of woring code?
HobStarCSHobStarCS 1241685720|%e %b %Y, %H:%M %Z|agohover

Thanks again Helmut,

I tried as you suggested without the last two lines:

[[embed]]
<script type="text/javascript" src="http://static.wikidot.com/v--33/common--misc/reflection.js"></script>
[[/embed]]
[[image http://i604.photobucket.com/albums/tt127/HobStarCS/HobStarStar.jpg class="reflect ropacity33 rheight50"]]

But it says: "Sorry, no match for the embedded content."

unfold Re: So is there an example of woring code? by HobStarCSHobStarCS, 1241685720|%e %b %Y, %H:%M %Z|agohover
I dedectet the same on my test site ...
Helmuti_pdorfHelmuti_pdorf 1241685807|%e %b %Y, %H:%M %Z|agohover

The code block information is DIFFERENT from the Action!

please _ have a look on the "view source button" ( left side menu bottom..) - how this is done!


Service is my success. My webtips:www.blender.org, www.zusi.de (Demo-Video)

Wollen Sie Wikidot helfen im deutschen » Handbuch ?

unfold I dedectet the same on my test site ... by Helmuti_pdorfHelmuti_pdorf, 1241685807|%e %b %Y, %H:%M %Z|agohover
I cannot EDIT the code block!
Helmuti_pdorfHelmuti_pdorf 1241686055|%e %b %Y, %H:%M %Z|agohover

here is the correct code:
PLEASE - Notice THE "SPACE" INSIDE THE embbed "COM" of the src= command line!

[[embed]]
<script type="text/javascript" src="http://static.wikidot.co m/common--misc/reflection.js"></script>
[[/embed]]
[[image http://www.wdfiles.com/local--files/media:files/wikidotlogo_200_2.png class="reflect ropacity33 rheight50"]]
The same without the reflection:
[[image http://www.wdfiles.com/local--files/media:files/wikidotlogo_200_2.png]]

If I try to edit the page - I get the old code block again!

What is happening here?

Put the space out and you camnnot save it into a code block!


Service is my success. My webtips:www.blender.org, www.zusi.de (Demo-Video)

Wollen Sie Wikidot helfen im deutschen » Handbuch ?

last edited on 1241686518|%e %b %Y, %H:%M %Z|agohover by Helmuti_pdorf + show more
unfold I cannot EDIT the code block! by Helmuti_pdorfHelmuti_pdorf, 1241686055|%e %b %Y, %H:%M %Z|agohover
Re: I cannot EDIT the code block!
HobStarCSHobStarCS 1241737146|%e %b %Y, %H:%M %Z|agohover

When I use the code WITHOUT the space in "CO M" it displays the image but with no reflection.

[[embed]]
<script type="text/javascript" src="http://static.wikidot.com/common--misc/reflection.js"></script>
[[/embed]]
[[image http://www.wdfiles.com/local--files/media:files/wikidotlogo_200_2.png class="reflect ropacity33 rheight50"]]

NB: Once I navigate away from the page, it shows with reflection.

Have a look.
http://hobstarcs.wikidot.com/

last edited on 1241737274|%e %b %Y, %H:%M %Z|agohover by HobStarCS + show more
unfold Re: I cannot EDIT the code block! by HobStarCSHobStarCS, 1241737146|%e %b %Y, %H:%M %Z|agohover
Do not put this SPACE
gerdamigerdami 1241779765|%e %b %Y, %H:%M %Z|agohover

This is a confusing article.
It works WITHOUT the space and the exact url location of the image is not necessary:

[[embed]]
<script type="text/javascript" src="http://static.wikidot.com/common--misc/reflection.js"></script>
[[/embed]]
[[image cat1:page1/pic1.jpg size="thumbnail" class="reflect ropacity33 rheight50"]]

EDIT:
the code

<script type="text/javascript" src="http://static.wikidot.com/common--misc/reflection.js"></script>

is displayed as

<script type="text/javascript" src="http://static.wikidot.com/v--33/common--misc/reflection.js"></script>

within this forum thread when [[code]] is used.
In this corrected post, I used > @@[@@

last edited on 1241780086|%e %b %Y, %H:%M %Z|agohover by gerdami + show more
unfold Do not put this SPACE by gerdamigerdami, 1241779765|%e %b %Y, %H:%M %Z|agohover
Is there a way of centering the image??
Mr RoogleMr Roogle 1243509874|%e %b %Y, %H:%M %Z|agohover

When i used this code:

[[embed]]
<script type="text/javascript" src="http://static.wikidot.com/common--misc/reflection.js"></script>
[[/embed]]
[[=image http://media.uow.edu.au/content/groups/public/@web/@media/documents/web/~export/UOW051993~1~DC_RELATEDIMAGES~DC_NOHEADLAYOUT/134322-1.jpg class="reflect ropacity33 rheight50"]]

The image had reflection but was stuck on the left hand side… The result was the same when i used the centering code:
[[=]]
[[embed]]
<script type="text/javascript" src="http://static.wikidot.com/common--misc/reflection.js"></script>
[[/embed]]
[[=image http://media.uow.edu.au/content/groups/public/@web/@media/documents/web/~export/UOW051993~1~DC_RELATEDIMAGES~DC_NOHEADLAYOUT/134322-1.jpg class="reflect ropacity33 rheight50"]]
[[/=]]

Any ideas why it might not be working??
Cheers
Ruben

RoogleNotes

unfold Is there a way of centering the image?? by Mr RoogleMr Roogle, 1243509874|%e %b %Y, %H:%M %Z|agohover
Re: Is there a way of centering the image??
Helmuti_pdorfHelmuti_pdorf 1243514731|%e %b %Y, %H:%M %Z|agohover

Have a look:
(with YOUR code)
- Where is the picture stuck at the left side?

http://helmuti-pdorf.wikidot.com/test-reflection


Service is my success. My webtips:www.blender.org, www.zusi.de (Demo-Video)

Wollen Sie Wikidot helfen im deutschen » Handbuch ?

unfold Re: Is there a way of centering the image?? by Helmuti_pdorfHelmuti_pdorf, 1243514731|%e %b %Y, %H:%M %Z|agohover
Sorry, I can see that wasn't clear.
Mr RoogleMr Roogle 1243593845|%e %b %Y, %H:%M %Z|agohover

The image starts to load (without refelction) in the center of the page, when it finishes loading the reflection is visible but the image moves to sit very close to the side navigation panel. I had a look at your link, http://helmuti-pdorf.wikidot.com/test-reflection and the result was the same. I'll see if it's just a problem with my browser…

Ruben
—-
RoogleNotes

unfold Sorry, I can see that wasn't clear. by Mr RoogleMr Roogle, 1243593845|%e %b %Y, %H:%M %Z|agohover
Allrighty, its something to do with Mozilla
Mr RoogleMr Roogle 1243594865|%e %b %Y, %H:%M %Z|agohover

I opened up the page using Internet Explorer and the page displayed fine, but it still persists using mozilla. I'm not sure how to get around it?
Thanks for your help.
Ruben


RoogleNotes

unfold Allrighty, its something to do with Mozilla by Mr RoogleMr Roogle, 1243594865|%e %b %Y, %H:%M %Z|agohover
Re: Allrighty, its something to do with Mozilla
Helmuti_pdorfHelmuti_pdorf 1243603834|%e %b %Y, %H:%M %Z|agohover

I changed my site page under mozilla - have a look!

I made 2 ways to create A CENTERED Image:

1. Used complex tables ( could be div's too) with 3 cells, in the centered cell is the image positined.
- play around with the borders ( I set them to 1 px for visibility) and the percentages of the width

2. Used simple table (||) and - this works in a simple way too.

3. Used the = character before the image tag - AND THE style attribute to the image tag:
style="margin: 5px auto" - thanks Gabrys!


Service is my success. My webtips:www.blender.org, www.zusi.de (Demo-Video)

Wollen Sie Wikidot helfen im deutschen » Handbuch ?

last edited on 1243604147|%e %b %Y, %H:%M %Z|agohover by Helmuti_pdorf + show more
unfold Re: Allrighty, its something to do with Mozilla by Helmuti_pdorfHelmuti_pdorf, 1243603834|%e %b %Y, %H:%M %Z|agohover
Re: Allrighty, its something to do with Mozilla
Mr RoogleMr Roogle 1243639104|%e %b %Y, %H:%M %Z|agohover

Thankyou so much for all the help!!! It's now working perfectly, i can't thank you enough. You've been so so helpful.
Regards,
Ruben


RoogleNotes

unfold Re: Allrighty, its something to do with Mozilla by Mr RoogleMr Roogle, 1243639104|%e %b %Y, %H:%M %Z|agohover
Add a new comment
page_revision: 22, last_edited: 1243597708|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License