xFlow! : A Javascript and PHP based Coverflow style gallery.

Want a smart gallery? You've come to the right place! Introducing xFlow!, the PHP and Javascript Coverflow replacement.
Posted by Paul Whitrow, 6th April, 2009 | Permalink | 44 Comments
25th January '10 - UPDATE v1.4
Updated overlay and error reporting functions.
16th January '10 - UPDATE v1.3: bug fix
Fixed a bug in the Javascript file that was causing placement problems with the sidebar drag handle when switching between key press and mouse drag.
15th January '10 - UPDATE v1.2
Functionality added for automatically creating a gallery from an uploaded ZIP file.
10th January '10 - UPDATE v1.1
Update to the Flickr administration side of xFlow! It can now extract and create galleries for specific sets from any given user.
Also addressed some other minor 'niggles' and performance issues in the main JS file.
6th January '10 - UPDATE v1.0
Changes include (but are not limited to):
* complete change to image manipulation code
* addition of image effects
* updates to image viewer
* creates favicons per gallery
* code streamlining to bump up speed
* now supports versioning with notifications of available updates
23rdNov '09 - UPDATE:
xFlow! has been given a major facelift, especially in the admin section.
19th Nov '09 - UPDATE:
Thanks to Matthias for pointing out a bug. xFlow! was having issues after install where it wasn't redirecting properly with no galleries installed.
This has now been fixed.
16th Nov '09 - UPDATE:
I've changed the Youtube video loader so that xFlow! no longer downloads the videos and stores them, it simply plays back the videos from Youtube in it's own inbuilt video player. This is due to Youtube now having hi resolution videos that take way to long to download.
This resolution also helps to reduce server load by not hosting the videos on your own website's servers.
You can of course still upload and host your own videos (in FLV format).
Let's be honest, the web is awash with galleries and image viewers of all shapes and sizes, but one of the nicest, slickest and most eye catching ways of presenting images has been produced by Apple. Their Coverflow image presentation script (originally found in iTunes) is, was, and will remain simply awesome.
I liked the functionality of Coverflow so much I wanted to reproduce it using Javascript. A quick Google search showed that I wasn't alone in this endeavor!
I had a look around (at the potential competition!) and found one that I really liked. Michael L. Perry's Cover flow in Javascript. This is a great script and featured some of the core functionality I was planning on building. So being a true believer in not wasting recourses I decided to use that script, plus Scriptaculous, as a base and got cracking on some development.
Fast forward a year and a half (yes really, though not all of that time spent at a keybourd - obviously) and we have a finished product: xFlow!
There have been so many changes to Michael's original code that it's barely recognisable. However, I really wanted to give him credit here for kick starting the whole thing. Michael, I thank you and I hope you like what I've done with it
OK, so what's new about xFlow!?
Well, I'll simply list it's main features and let you decide:
- Creates all thumbnails in PHP to reduce overall Javascript memory requirement (other galleries use Javascript image reflection scripts)
- Items are aligned in a curved plain to aid perspective affect
- Items psuedo fade as they move back out of focus
- Galleries are housed in their own directories for SEO enhancement
- Each gallery is controlled by an XML file in RSS format to enable linking and following of individual galleries by RSS subscription (example)
- Import Flickr photo streams
- Import YouTube video streams
- A 'sitemap' file is produced (example) using the recognised sitemaps.org protocol for enhanced SEO purposes
Galleries can be password protected to enable private images to be uploaded (also encrypts the XML entries)- Images can be watermarked during upload process to make image theft more difficult, and to promote your own work
- Display items in first to last or last to first order
- Images can be resized during upload
- Images can be rotated during upload
- Images or videos can be uploaded from a local source (your machine/device) or a remote location (another website)
- Other galleries can be displayed as tiny thumbnails or standard links at the bottom
- Built in custom image viewer (NOT Lightbox!)
- Mouse wheel support in gallery and viewer
- Preloads the main images in the background for slick image browsing
- Individual titles and descriptions for all items
- Items can be shifted around until you get the order you want
- Fully customisable gallery options per individual gallery
- Automatically create a gallery from a ZIP archive full of images / videos that you upload
- Automaticalley create a gallery from a directory of images or videos, or a combination of both
- Language support
- Easy to re-style with a single style sheet
- Supports GIF, JPEG and PNG image formats
- Supports Flash Video (FLV) video format
Plus many others!
I've tried to build it with SEO in mind. Accessibility is a little more difficult as the gallery uses Javascript, but it will still show the images if Javascript and CSS are turned off.
It's also been tested in all the latest Firefox, Internet Explorer, Google Chrome, Opera, and Safari (for Windows) browsers with no reportable errors (at least so far), so if you do find any can you please report them back here with the relevant browser info (type, version etc).
If you fancy trying it out, hop on over to xflow.pwhitrow.com and have a play.
Please could you leave any feedback / ideas / gripes / whatever in the comments section of this article and I will do what I can address them.
To do
xFlow! will continue to develope over time as I think of new features, improvements, bug fixes (pah!) or get worthy requests.
Add Flickr support- DONE!Add YouTube support- DONE!- Anything else that I think of...

Posted on Monday 6th April, 2009 at 11:52 am by Paul Whitrow, and filed under Announcements, Design, Development, Galleries, Javascript and PHP
Wanna keep up to date? Subscribe to the site feeds.
Browse More Entries
Have your say:
NB: Comments are subject to administration.






Comments about ‘xFlow! : A Javascript and PHP based Coverflow style gallery.’
8th January 2010, 5:51 pm
Bobby, anything is possible!
As I said, it will need some tweaking but I have done it elsewhere...
7th January 2010, 9:37 pm
Thats great to know Paul.
What about the dynamic creating of the things to insert into the coverflow?
e.g my client is going to want a coverflow automatically generated for each category of products without manually jumping into another backend (as nice as yours looks!) to create them. Is that possible?
Thanks for your time.
7th January 2010, 7:03 pm
Hi Bobby,
OK, so if I understand correctly you want xFlow! to display a list of products as a gallery and then jump directly to that product as opposed to displaying an image?
Short answer, YES! It will need modifying slightly but I can work with you to achieve your goal.
7th January 2010, 8:06 am
Additionally Paul, is it possible to rig the xFlow in a way so that rather than loading the image when its clicked the second time, that I can tell it to actually jump to the url of the product?
Thanks again.
7th January 2010, 8:02 am
Hi there Paul,
I'm eyeing off your xFlow! - it looks awesome and just what I need.
What I'm wondering is if I can use it for my situation. Let me explain...
I am using a prestacart setup and the client wants cover flow. As you can imagine, the products and images are stored in a database and the coverflow would need to be built dynamically. Prestacart is running on php.
So my question that first comes to mind is can the xflow coverflow be built dynamically and if so what is the process roughly to do that so I can see if its ideal for our situation?
Thanks!
Bobby
31st December 2009, 9:54 am
kishjor,
xFlow! comes with it's own fully functional administration sections, so you do not have to edit the xml file at all.
Did you purchase xFlow! through this site? If so, you should find in the zip file, detailed instructions on how xFlow! works (in the file names instructions.txt). Please read this file as a first step.
If you didn't get xFlow! from here, then I'm afraid I cannot support your installation.
30th December 2009, 9:11 am
Thanks for reply.
Sir,
I am using xflow. Now i want to add images through xml file.
I don't know how to do it.
Please help me how to do it.
Thnaks.
30th December 2009, 8:28 am
Hi kishjor,
Could you please explain a little more, I don't quite understand what you mean.
30th December 2009, 8:01 am
I am not set xml file in xflow.
Can u help me ?
9th December 2009, 6:03 pm
Hi Dashon,
Yes that is possible. Within xflow.js there is a function called XFLOW_goto(n) where n is the image you wish to go to. So, image 1 would be XFLOW_goto(1) etc...
This can be used in an onclick event of an anchor (a) tag thus:
onclick="XFLOW_goto(1)"
Hope that helps,
Paul
8th December 2009, 9:38 pm
Can you provide a simple solution to jump to a specific image by pressing a link?
23rd November 2009, 9:55 pm
Hey Kenji,
Love what you've done with xFlow!
Thanks for the kind comments, support is as important as the product itself.
23rd November 2009, 3:32 pm
Hi Guys, I've implimented Xflow! onto a recent site project, if anyone wants to see it in action. I love how fast and responsive the images scroll through. Paul, you have been great with technical support! Keep up the awesome work,and i'll be sure to check out what else is in the works with you in the future.
http://www.iskfcalgary.com/
(Go to the 'Gallery' page)
19th November 2009, 8:57 pm
Thanks Matthias for pointing out the bug.
It should now be squished!
16th November 2009, 4:20 pm
I've updated the YouTube function. Will be working on your other issues next.
11th November 2009, 9:52 am
I've emailed you directly mate. Once we fix your issue I will post it back in here, incase anyone else gets the same.
9th November 2009, 8:33 pm
Hi Paul,
ok, I've bought xFlow today.
The problem is I'm too stupid to configure it right
I get the message, that an infinite redirect is realized by the browser. Iread the manual more than once, please be so kind and help me.
I just want to call the base index.php.
I set up the DEF_XFLOW_MAINURL and the XFLOW_RELPATH correct (I think
)
greetings,
matthias
7th November 2009, 9:41 pm
Hi Matthias,
1. That's right, absolutely NO FLASH!
2. One license covers you for all your installs.
Hope that helps.
7th November 2009, 12:42 pm
Hello there,
first of all, great work!!!
I'm looking for a libary which is not based on flash, because I want it that way...
Some questions:
1.) no flash plugin install needed, right? just js,php based?
2.) the license: if I buy a license, do I have to buy for each project a new one?
that' all...
really looking forward to your answer!
Greetings,
matthias
29th October 2009, 10:55 am
Hi Lawrence,
xFlow! uses neither Mootools or jQuery (I have been looking at updating xFlow! to use jQuery, but it's still a way off yet). It's a stand alone installation.
You can indeed link the images to external sources. Just add your link (http://etc..) into the description field of the image. Then when it's rendered, the link will appear in the description text.
Would you be able to post a screen shot of the broken bar?
SEO is most important, so it was a no brainer to enforce it in xFlow!
Thanks for the feedback.
29th October 2009, 5:30 am
hi there,
Does Xflow use either jQuery or Mootools? I have a wordpress installation, and practically speaking, all your plugins have to be one or the other.
Also, is it possible to link each picture in a gallery to a separate HTML page?
Finally, viewing your examples in a Mac Firefox broswer 3.5.3, the slider bar arrows look like they're broken of the main body of the slider.
Thanks for working to make the galleries SEO compatible. That's a real benefit.
23rd October 2009, 5:36 am
I've done some digging and I found where all the "magic" happens. The problem for displaying text is three-fold. First, the images are resized after they've been uploaded and had the reflection added to the image file, and second, they are resampled before being stored on in the thumbs directory, third, they are resized again before being displayed in the thumbs gallery. It works ok for real pictures, but for text there's a lot of artifacts in the text image that make it appear less than ideal.
I'll keep digging to see if I can make it treat a designated text image differently. This would make a great online slide presentation tool if the text appeared crisp and that's exactly what I'm trying to do with it.
Thanks for a great product!
22nd October 2009, 6:42 pm
Hi Gary,
Thanks for downloading xFlow! I'm pleased you are enjoying using it, always good to get some feedback.
The thumbnails are generated at a default height of 230px, but the Javascript in xFlow! resizes it to fit in the window when it's displayed.
You could do some jiggery pokery if you know the size of the div that will be displaying the thumbs.
21st October 2009, 4:44 pm
I love working with your product! I've been adapting it for my specific requirements and I'm trying to figure something out. I'll try to make this as clear as possible.
1) I'm trying to co-mingle picture images with text images in my gallery, but since the images are uploaded, modified, and saved in some format the text is "blurred".
2) In trying to compensate for that, I placed a full-sized picture in the thumbs directory but in the gallery the displayed image is zoomed, while the "next" and "previous" images appearing 1:1.
Is there any way to make the current image be 1:1 in size?
Is there a way to prevent uploaded images that are saved as thumbs in the same resolution as the image itself.
This would make it possible to use images that consist of text to appear "crisp".
Thanks!
2nd October 2009, 7:18 am
Hi Mark,
The gallery menu thumbnails are controlled by css.
Look for:
div.xflow div.gallerymenu ul li a img
{
height:30px;
}
in xflow.css and change 30px to whatever you need.
26th September 2009, 9:32 pm
I have installed xFlow no problem, but the gallery thumbnail under the pictures is tiny. I tried increasing the pixel size of the thumbnail and it doesn't appear to get any bigger? Please lead me to the correct parameter to fix, also what files do i need to edit/change to modify the theme colors, etc. Thanks! this thing is nice!
2nd August 2009, 10:37 pm
Hi, xFlow! is not setup to allow automatic scrolling, but it would be simple enough to build some Javascript functionality to enable you to do just that.
2nd August 2009, 3:08 pm
Hello. Loving this script, however, I have a question before I purchase as I am not purchasing for the traditional use.
I am thinking of using it on a digital signage screen for a photographic competition I am working on. However, can the xflow script scroll through images automatically (as obviously you can interact with a mouse on a big plasma screen) and can you control the timing of scroll?
31st July 2009, 10:31 am
The list is reaal great & it is useful for the newbeeis especially. Nice work man!!! caarrry on
10th July 2009, 10:43 am
Hi Paul !
What a nice script do you have there !
I downloaded it yesterday night and it worked very nice !
I had only one problem, my server hasn't PHP5 installed and the scandir() function doesn't exists in PHP4. I finally developed a function called php4_scandir() and replaced it in "inc/xflow.php".
I want to notice that the xFlow! Gallery works great on iPhone Safari Browser ! Excellent !
Here is the function :
function php4_scandir($dir,$listDirectories=false, $skipDots=true) {
$dirArray = array();
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if (($file != "." && $file != "..") || $skipDots == true) {
if($listDirectories == false) { if(is_dir($file)) { continue; } }
array_push($dirArray,basename($file));
}
}
closedir($handle);
}
return $dirArray;
}
Cheers
6th July 2009, 6:22 pm
Hi Richard,
There was an error in that I didn't update the archive (the one that you download) correctly and omitted the changes for the height/width issue you mention.
The archive has been corrected and if anyone else has the same issue, please email me and I will send you the new archive. The download version is now correct.
Apologies for the problems this caused.
Please post links to your galleries in the comments, as it would be great to see xFlow! 'in the wild'...
5th July 2009, 10:34 pm
xflow looks fab.
although the xml file does not form correctly for me in that it omits the width and height tags leaving the lightbox style functionality in error.
I would be grateful if this could be looked into because I have to manually add these in order to get the full functionality.
I use:
Apache version 2.2.11 (Unix)
PHP version 5.2.9
1st July 2009, 7:19 am
Excellent information. Finding a few such solutions has taken hours in the past.
Thank u.
23rd June 2009, 5:12 pm
Hi Peter,
That looks great, and thanks for the positive review. Told you it was a breeze
23rd June 2009, 9:41 am
We have just bought this software to use as a display for our clients portfolio and have installed it on our new home page (currently not launched temp UR www.webpagedesign.ie/newsite) We are delighted with the result and the ease of use, we tried various others but they either didn't work as well, didn't flow as good or didn't work cross browser. Well done Paul!
20th June 2009, 11:19 pm
Alvin,
xFlow! should work with PHP version 4 and above.
19th June 2009, 6:20 pm
is there a php version requirement?
6th June 2009, 11:29 am
Good one, galleries can be useful at times especially for projects etc
Thanks for posting them
2nd May 2009, 12:00 am
Watermarking Error Update:
It's been reported that there is an issue with watermarking png's during image upload.
A quick Google search revealed an answer:
'This error only occur on servers with PHP v5.1.x or newer, when resizing/creating thumbnails from PNG images and using GD type of graphic module.'
And here is a patch to fix it:
http://www.4homepages.de/forum
/index.php?topic=11805.0
27th April 2009, 11:02 am
el ilani:
You're welcome,
Devante Vargas:
Thank you for your positive review. It's always nice when people outside of your own circle give you such credit for your work.
27th April 2009, 9:58 am
web-kreation said me : visit this link and now im here. i find image galery. thanks this work
21st April 2009, 9:51 pm
Thanks Paul for developing an amazingly simple to use image gallery that simply takes your breath away.
Within minutes of receiving the zipped up files, I was up and running and creating a demo gallery. I added 3 galleries with several images in each, with descriptions, titles, and placed them in the order I wanted the images to appear in, with such relative ease. in the all the years I have been in I.T and developing websites here and there, this has to be one of the best I've seen. Thanks again Paul! I will be posting a link to our image gallery once it has been all setup in the coming weeks.
9th April 2009, 7:05 am
Thanks Michael, glad you approve.
I met with the same problem as you initially, with the images all becoming semi-transparent and showing through to each other. The way I achieved the 'fading' effect was to have a div of the back ground color placed in front of the corresponding image, then resize, place and fade that div using the Javascript. Worked out quite well I think.
Using an inbuilt editor does indeed make it a snap to use
8th April 2009, 6:30 pm
I love what you've done with it. Maintaining galleries and uploading images via editor pages is much easier than my method. I even had to pre-reflect the images to make mine work. Makes it a pain to keep my site up-to-date.
The shadow effect as images fall into the background is quite effective. I was only able to accomplish something similar by adjusting the opacity of the farthest images. The trick didn't work for the images in between, since they became translucent. I'll have to see how you did that.