Friends Blog Links
-
Clever Blog Name Here
Attention Whore Monday, Aug 18, 2008
-
Jolby
Artists We Love: Scott Campbell Tuesday, Aug 19, 2008
-
It's Not Easy Being Green
How Enviros Socialize: Green Drinks Tuesday, Jul 15, 2008
Other Friend Links
Recent Tracks
- Lost and Rendered Alkaline Trio Wednesday, Aug 20, 2008
- Love Love, Kiss Kiss Alkaline Trio Wednesday, Aug 20, 2008
- Live Young, Die Fast Alkaline Trio Wednesday, Aug 20, 2008
- Do You Wanna Know? Alkaline Trio Wednesday, Aug 20, 2008
- I Found Away Alkaline Trio Wednesday, Aug 20, 2008
- Over and Out Alkaline Trio Wednesday, Aug 20, 2008
Back to all blogs
Showing posts tagged: 'Flickr'
New Website: Ashley Forrette Photography
Friday, June 20, 2008, 12:48am
Hey folks! It's been a while! Sorry it's been a while but that's just how I roll. I've actually been thinking up all sorts of nerdy subject matter, it's just been crazy as always and I haven't forced myself to post. I finally got myself into a corner to post for you today, awesome right?
It's been live for a while now, but I finally got my wife Ashley's photography portfolio website launched, go check it out! Today I'm going to spill the beans on how I made it, and hopefully give some of you folks some good ideas. It was a fairly quick and simple build using CakePHP, the Flickr API and some MooTools magic.
So the coolest thing about the site is that it's all Flickr-fed. Ashley chose a set of categories she wanted to use and I had her create Flickr sets for each of them. Each category you click on references a specific Flickr set that's pulled in and cached via a nice, reusable table-less Flickr model I created for CakePHP. Why is that even cool you ask? Because I didn't have to worry about handling and storing uploads or anything—the site requires no admin interface at all—and it also works as a bit of extra exposure for her shots, being both on the Flickr site and her portfolio site. The Flickr model I've created has proven useful in a number of cases—I even use it on this very site for when user comments are posted. I basically just disable Cake's table linkage and used a few methods to access Flickr's various API methods.
The most challenging part of the site was the Javascript. If you check the site out, you can see that the image is preloaded (using the MooTools Assets class), the thumb menu is animated, and there are some nice fade transitions in there too. I accomplished it all in a custom MooTools class called 'Photoset'. It ended up being about 180 lines of code—not too bad—and handles all of the javascript on the site—the loading, fades, menu, everything. The load/fade transition was the trickiest part, but I used the Asset class along with MooTools chaining and did it in about 12 lines of code:
thisloaderstart1chainfunction
load
thisloaderstart0chainfunction
thisphotoFadestart0chainfunction
thisphotosrc = load;
thisphotoFadestart1;
thisshowingsetTextindex + 1;
thisloading = false;
bindthis;
bindthis;ˇ
bindthis
;
bindthis;
Basically I fade in the 'loading' indicator, preload the image via Asset.image, fade out the loader, fade out the previous photo, change the photo source, and fade it back up. Whew! Chaining is a little tricky to structure in a nice, readable way, but so nice to use! With MooTools chaining, you can set a stack of time-based functions in line to occur one after the other. It's basically like using an onComplete event to call another function, just much easier and cleaner.
And that's all! Check out the site and you know where to go if you need a good (and sexy) photographer. Feel free to post comments if you have any questions and look out for plenty more updates coming soon.
Tags
Recent Comment (of 1)
"I am in the process of rebuilding our site using Joomla and MooTools. Thanks for the great example."by Nate posted Jul 11th, 20:02

