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

Want a smart gallery for your images and videos? You've come to the right place! Introducing xFlow!, the PHP and Javascript Coverflow replacement.
Posted by Paul Whitrow, 6th April, 2009 | Permalink | 81 Comments
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 12:52 pm by Paul Whitrow, and filed under Announcements, Design, Development, Galleries, Javascript and PHP
Wanna keep up to date? Subscribe to the site feeds.






Comments about ‘xFlow! : A Javascript and PHP based Coverflow style gallery.’
24th June 2010, 11:15 pm
All, thanks for your comments here, but xFlow! now has an official forum over at http://xflow.pwhitrow.com/foru
m and all future communications will be addressed there.
Comments for this post will now be closed.
Best,
Paul
22nd June 2010, 3:01 pm
Thanks for pointing this out, completely passed me by!
Right, go to the js/xflow.js file and replace the function XFLOW_setViewerTextSize with:
function XFLOW_setViewerTextSize(val)
{
xflow_viewertext.style.height = 'auto';
if(xflow_viewertext.style.overflow)
{
xflow_viewertext.style.overflow = 'none';
}
if(xflow_viewertext.offsetHeight > val)
{
xflow_viewertext.style.height = val + 'px';
xflow_viewertext.style.overflowY = 'auto';
}
}
The next update will of course have this already integrated.
22nd June 2010, 1:45 pm
Thanks Jorge,
I have tested xFlow! in IE and it worked fine. Could you tell me what version of IE you/your client are testing in please...
22nd June 2010, 11:23 am
First of all thanks for developing this so easy to use tool Paul. I purchased a copy to use in a project and worked fantastic... till the client called me saying that wasn't working properly in IE Explorer (what a surprise!).
IS just that the small green arrows in the 'lightbox' mode (to navigate throw the images) when using IE Explorer doesn't work. The 'X' button to close the lightbox works perfectly.
Any idea on how to fix this issue? Help really appreciated Paul, as I need to close this project asap!
28th May 2010, 9:17 pm
This is very nice. As I am working on creating better gallery for my logos I have created, this may be just the ticket. Thanks a great deal for your information. It's very helpful.
28th May 2010, 7:51 am
Nice.
28th May 2010, 7:49 am
More useful.
28th May 2010, 7:48 am
thank you for sharing.
28th May 2010, 7:46 am
The features is really more useful.
28th May 2010, 7:43 am
nice find !
28th May 2010, 7:41 am
Great idea , Thank you for your share!
28th May 2010, 7:39 am
Good work!! Thak you very much.
28th May 2010, 7:37 am
Very useful ones.
28th May 2010, 7:36 am
Nice collection..
28th May 2010, 7:30 am
Hi,
I must say thanking you for this.
28th May 2010, 7:28 am
This is really beautiful.
28th May 2010, 7:22 am
i bookmarked it ! thank you for sharing
17th May 2010, 11:54 am
run,
No it wasn't... maybe you should read the main article properly, then perhaps the first comment?
Thanks for commenting but next time, perhaps tyou should think before clicking the 'Submit' button.
9th May 2010, 10:02 pm
The original Java Script for this gallery was probably taken fromhttp://www.dhteumeuleu.com/the
ories-of-mind/ and changed to what you see now.
11th April 2010, 12:46 am
Lars,
Yes of course, but you will need to understand PHP and Javascript as it will require a code adaptation.
30th March 2010, 5:23 pm
Hi and thanks for the great work!!
Is it possible to replace the thumbail bar with thumbnails of the different larger images?
The idea is that you could click the thumbnails and the gallery is flowing to the according image.
THX
30th March 2010, 12:10 pm
Thank you Alan
Just to let everyone know, whilst investigating Alan's installation, he discovered that PHP's REGISTER GLOBALS was turned off... worth checking peeps.
30th March 2010, 11:17 am
Good work!!...I hope I'll use it on my next site.
30th March 2010, 11:15 am
The color combination of the design is simply great!!
I appreciate the work also.
30th March 2010, 10:11 am
Xflow is a very nice clean and fast photo gallery with some very nice tweakable options to get just the right look , support from paul was great also , the only reserve i have currently is whether it is possible to have the name of each gallery under it's thumbnails beneath the slidebar , but no doubt a little bit of code will solve this , definately worth the money i paid for it .
8th March 2010, 9:18 am
Hello all and of course to Paul,
Just have to say it's a very flexible, easy to 'embed' piece of marvellous software code, with a slick modern feel and look. All my highest compliments, because it's hard to find quality (cheap) code to use, between the hundreds and thousands out there.
7th March 2010, 8:22 pm
Hi David,
Glad you like xFlow!, and thanks for letting me know that it works OK in Safari (version?).
1. DEF_XFLOW_GALLERY_FADEBGCOLOR should indeed be set to 'FFFFFF', but remember that is the DEFAULT value for the background colour. Individual galleries can have their own background colour set to overide the default value. You set this in the options panel. Try setting it there to 'FFFFFF'. Any images you have in the gallery already will need to have their thumbnails recreated, again this is done from the options panel (checkbox near the bottom).
2. The thumbnails are displayed as a proportionate value of the overall xflow div area. The bigger this area, the bigger the thumbnail. It's done this way keep everything resizing together.
3. Yep, those links will only appear when logged in.
4. extract?
5. Not a problem, I try to support the product and answer all I can.
6. You are free to customize xFlow! to suit your needs, but I can only support unchanged versions, as I cannot predict what changes you may make.
7. No FAQ section planned, but definately something to think about, thanks.
8. 42!
Phew!
7th March 2010, 2:15 am
Hi Paul...
Questions/Observations:
. First, xFlow is great. Thanks a ton!! It's just what I've been looking for.
. I will be implementing in the site above as soon as I finish configuring.. Meanwhile, where I am so far is here:http://bohtech.com/beatrice/xf
low/galleries/modern-architec
ture/
. xFlow 1.6 is working in Mac Safari fine.
. How do I do the following:
change the background to white?
(I set DEF_XFLOW_GALLERY_FADEBGCOLOR to fff, but no change)... Should I futz with the css files?
Is there a way to make the flow images larger (or resize them?)
how do I remove the header information (gallery, options, items etc) from the window (is that only in the admin window?), and
what's the best way to extract to use in my site?
Sorry for peppering you.. I've only been using this for an hour or so..
Oh, I want to change the scroll bar.. Hope that's ok?
What about an FAQ section of your site?
What's the meaning of life?
/david
5th March 2010, 8:54 pm
TDD:
Indeed xFlow! will work if you stick it in an iframe.However, if you want if full screen, then just use it as is?
Javier:
Thanks bud, I'm still on it and hope to have a resolution soon. Keep watching the updates
5th March 2010, 8:16 pm
Hey Paul,
I know how that bug hunting goes on a platform you don't spend alot of time on. If you need anything on the mac platform, let me know, I'd be happy to help.
I look forward to your updates
--Javier
4th March 2010, 2:29 am
I love the functionality of this, but have one question based on client feedback. Will this coverflow script work if it is launched in something like Lightview or Lightbox in a layer over a web page so we can use it full screen?
1st March 2010, 6:33 pm
Hi Javier,
Thanks for this. It's something I know about and am looking into, but difficult to nail as I don't use a Mac and it looks fine in hte PC versions of Safari etc... will keep plugging away though.
27th February 2010, 3:32 am
Great looking tool. Best "coverflow" i've seen out there so far. However there is a problem on Safari on Mac and Mobile Safari on iPhone. On both platforms, the scroll bar's end is placed incorrectly.
Screenshot of your demo www.fuller-online.com/coverflo
w_safari_mac.jpg
I think this might be what Lawrence mentioned back in October, but for me it's fine in FF Mac 3.5.7, but broken in Safari.
12th February 2010, 1:33 pm
Thank you Keith
11th February 2010, 11:22 am
Great script, easy to install and customize. Easy to fit into any template and alter. Has saved me so much time and has so many neat features such as video upload, zip archive upload, flickr and the fact its not flashed based is also a bonus for SEO.
11th February 2010, 12:39 am
Hi Scott,
1. Yes xFlow! can be integrated into your existing PHP pages. It takes a bit of 'jigging' as xFlow! was built as a stand alone gallery, but it can be done. I'm working right now on making integration as easy as a call to a single JS file. This will be included in a future update.
2 + 3. Yes, xFlow! can be fully customised.
Hope that helps,
Paul
10th February 2010, 7:50 pm
I just bought xFlow, but am now thinking it may not be able to do what I need it to.
1) Can the galleries be added to existing pages?
2) Can the styles/colors be changed?
3) Can the width of a gallery be changed?
Thanks,
Scott
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, 6: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, 7: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, 5: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, 8: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, 10: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, 11: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, 4: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, 11:31 am
The list is reaal great & it is useful for the newbeeis especially. Nice work man!!! caarrry on
10th July 2009, 11: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, 7: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, 11: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, 8:19 am
Excellent information. Finding a few such solutions has taken hours in the past.
Thank u.
23rd June 2009, 6:12 pm
Hi Peter,
That looks great, and thanks for the positive review. Told you it was a breeze
23rd June 2009, 10: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!
21st June 2009, 12:19 am
Alvin,
xFlow! should work with PHP version 4 and above.
19th June 2009, 7:20 pm
is there a php version requirement?
6th June 2009, 12:29 pm
Good one, galleries can be useful at times especially for projects etc
Thanks for posting them
2nd May 2009, 1: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, 12:02 pm
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, 10:58 am
web-kreation said me : visit this link and now im here. i find image galery. thanks this work
21st April 2009, 10: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, 8: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, 7: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.