PHP Easy Reflections

PHP Easy Reflections is a php script that creates a reflection of an image by adding a small bit of code to a web page just after an image you want to create a reflection for. This script is written by Richard Davey and is available from: http://reflection.corephp.co.uk/

I wrapped the Easy Reflections scripts into a Freeway action for my own use but Richard Davey has kindly allowed me to share this with others, so I have made this available as the PHP Easy Reflections action.

You can see some simple examples of what the PHP East Reflections action can do in practice here:
http://easibase.com/freeway/easyreflections.php

The action can be downloaded from here:
http://easibase.com/freeway/freewayactions.php

Enjoy


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Nice work Mike. I created a similar action last summer for a project
I was doing that used one of the JavaScript libraries to achieve
similar effects. Obviously that relied on the client being able to
run the script but it did seem to degrade well for lesser browsers.
I’m increasingly of the opinion that the best actions (IMHO) are
those that do all of their work in Freeway and simply output valid
HTML, CSS, or images. Imagine how cooler this action could be if you
could preview the reflections in the application and simply have it
render them to a fixed image on output. No server side code, no
client side code on output, just an image. Nice.
Good work on the action again Mike.
Regards,
Tim.

Extend Freeway the way you want with FreewayActions.com
http://www.freewayactions.com


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Tim. I also looked at creating my reflections on the site that I built the action for, with one of the Javascript librarys but found:

1# The image reflections where a little slow to build, I guess the page loaded first then Javascript went to work.

2# The clients browser having javascript disabled (As you mention).

I then found the PHP version which was fairly much instantaneous because it was simply like having another image on the page, it just needed the server to have php which for me was not an issue but yes, I agree that it would be nice to have any actions work previewed in Freeway.

Thanks again


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Mike

I’ve had a go at this without success.

I thought it might be a server support problem so I checked with James at Have-Host and he put up a test page to show that it works on his servers OK.

So I guess it might/must be down to operator error.

Have you got a Freeway file we can download and try out and does it work in 5?

Thanks

David


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Dave:

The page I uploaded - I used FW5 to create the page…

James


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Basically it is a very simple action to use, just apply it to an image on your Freeway page and set the height and upload.

Although this uses php as the script to create the image your page should not need to be a .php page to use it as it is called through the image src, I have used it with .html pages without problem although your server will need PHP… which I am sure you have.

I will send you an example file made with Freeway 4 pro although as James has pointed out, you can use it with 5 also.

On 5 Mar. 2008, 11:31 pm, DeltaDave wrote:

Hi Mike

I’ve had a go at this without success.

I thought it might be a server support problem so I checked with James at Have-Host and he put up a test page to show that it works on his servers OK.

So I guess it might/must be down to operator error.

Have you got a Freeway file we can download and try out and does it work in 5?

Thanks

David


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sometime around 20/2/08 (at 17:22 -0500) Mike B said:

PHP Easy Reflections is a php script that creates a reflection of an
image by adding a small bit of code to a web page just after an
image you want to create a reflection for. This script is written by
Richard Davey and is available from: http://reflection.corephp.co.uk/

I wrapped the Easy Reflections scripts into a Freeway action for my
own use but Richard Davey has kindly allowed me to share this with
others, so I have made this available as the PHP Easy Reflections
action.

This is really impressive stuff. I do have a small bug report: when
this is used with images that have shadows or borders, the reflection
image is offset both downwards and to the right.

I can see why this happens, and where shadows are used this could be
argued that the vertical shift is a valid approach (although I’d
rather it did still butt up). But the horizontal shift is less
good. Obviously this is to do with graphic bounds before and after
the outer areas are calculated and built into the output image.

Which leads me to my wish. This is damn clever and a great tool to
have. But I would rather see this as a built-in Freeway feature so
that I could see the reflection in the page layout and know
precisely how it will affect or work with other elements on the page.

But my final comment? Love this action! :slight_smile:

k


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 6 Mar. 2008, 10:45 am, thatkeith wrote:

I do have a small bug report: when
this is used with images that have shadows or borders, the reflection
image is offset both downwards and to the right.

I can see why this happens, and where shadows are used this could be
argued that the vertical shift is a valid approach (although I’d
rather it did still butt up). But the horizontal shift is less
good. Obviously this is to do with graphic bounds before and after
the outer areas are calculated and built into the output image.

Which leads me to my wish. This is damn clever and a great tool to
have. But I would rather see this as a built-in Freeway feature so
that I could see the reflection in the page layout and know
precisely how it will affect or work with other elements on the page.

Keith, not sure I am with you on the image shadows as I haven’t actually worked with shadows on images and not quite sure how you mean but…

Does setting the ‘Set new line of reflection’ do anything on the problem?

Maybe you can send me a small example to have a nosey at.

Mike


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Finally got this working after Mike sent me his example.

His example worked fine on its own page but when I applied all the parameters that he had to my image it refused to work.

I don’t quite understand what was happening but when I duplicated his image and then I replaced his image with mine it started working!

Anyway thanks Mike I’m sorted.

David


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I just gave this a go and no luck.

I believe the reflection will not show up in FW, so I uploaded the page to my site (which has php) and there is no reflection.

I don’t see any other discussion about this, but hopefully some folks have some tips.

Here is the page:

http://reeltimedvd.com/new_site/consumerservices.html


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi George,

I can’t seem to load this URL.

Does your server account have PHP?

Mike

On Sep 18, 2008, at 4:53 PM, george wrote:

I just gave this a go and no luck.

I believe the reflection will not show up in FW, so I uploaded the
page to my site (which has php) and there is no reflection.

I don’t see any other discussion about this, but hopefully some
folks have some tips.

Here is the page:

http://reeltimedvd.com/new_site/consumerservices.html


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hmm. I just clicked the link and it loaded fine.

Yes, my server does have php, I have tested other actions that require it.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry George but I get a failed to open page error every time,

Safari can’t open the page “http://reeltimedvd.com/new_site/consumerservices.html
” because it can’t find the server “reeltimedvd.com

same with Camino and FF.

anyway… images need to be: GIF, JPG or PNG

PHP needs to have access to the GD library.

Apart from the above it is generally just a case of selecting the
image and applying the action.

HTH

Mike

On Sep 18, 2008, at 6:22 PM, george wrote:

Hmm. I just clicked the link and it loaded fine.

Yes, my server does have php, I have tested other actions that
require it.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Try:

http://reeltimedvd.com/new_site/index.hml

and click on the Consumer Products tab.

I just tried it in IE and it comes up fine.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Mike,

I still can’t get this to work. Any luck accessing my site?


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I have tried this on a couple of different computers at different
locations here in the south of Spain and I just get ‘Cannot find
server’ errors.

If you send me the actual Freeway file (no resources) then I will have
a look to see if you have it applied correctly but in all honestly the
application of the action side is as simple as it is.

Regards
Mike

On Sep 22, 2008, at 10:15 PM, george wrote:

Mike,

I still can’t get this to work. Any luck accessing my site?


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That’s strange. Others have had no problem.

Can you see my current site: http://reeltimedvd.com?

I will send the file in a few days, I will not be working on this tomorrow and it’s time to go to sleep.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sometime around 18/9/08 (at 10:53 -0400) george said:

http://reeltimedvd.com/new_site/consumerservices.html

Silly question: doesn’t the page need to end in .php rather than
.html in order to make the server’s PHP parser to come out to play?

k


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On Sep 23, 2008, at 9:02 AM, Keith Martin wrote:

Sometime around 18/9/08 (at 10:53 -0400) george said:

http://reeltimedvd.com/new_site/consumerservices.html

Silly question: doesn’t the page need to end in .php rather than
.html in order to make the server’s PHP parser to come out to play?

k

Strictly speaking, no; you can configure Apache to pass .html or .foo
or .bar or whatever through the PHP sausage machine. But practically
speaking, yes, that is exactly true.

Walter


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Anyway, just as an additional comment…

This graphic reflection thing is still something that I really and
truly think Softpress should add to Freeway as a graphic action that
calculates and shows the effect in the design environment.

From what I understand about the graphics capabilities of actions in
today’s Freeway this should be quite achievable. And it would make
for a killer Freeway demo!

k


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options