Our galleries have the potential to be somewhat large, so instead of creating an unordered list with the images loaded and hidden, we'd like to save the bandwidth, and load images only by request.

I've made a pretty thorough pass at this. I left existing functionality in place and added an option on the imagefield configuration to choose between dynamic and static loading.

The old functionality will continue to work without JS, though dynamic (obviously) won't. As a side benefit, dynamic loading will accomplish deep linking without the browser window jumping around.

Comments

srjosh’s picture

StatusFileSize
new12.5 KB

Attached is a patch with slightly better filepaths.

manuel garcia’s picture

Issue tags: -Ajax, -dynamic, -Ajax Slideshow

Thanks for the patch, I will review it as soon as I get a quiet evening to check it out properly.

manuel garcia’s picture

Thank you for the patch srjosh, I will review it as soon as I get a quiet evening.

srjosh’s picture

As a side note, you can see this working on maclife.com, for example on http://www.maclife.com/article/gallery/gallery_ces_11_showstoppers_mega_...

heinz963’s picture

Great, just what i needed. But how is it possible to use thick- or colorbox with the dynamic mode. In my case, always when I activate the dynamic mode the thickbox is disabled.
And a second thing, in your example is a next and prev pager. Is it possible to get a patch with this pager functionality.
Thanks a lot

srjosh’s picture

@heinz963 : See #826928: Add simple photo advance for that functionality - the two patches will work together; apply that one first then this one.

srjosh’s picture

StatusFileSize
new18.24 KB

I've continued to work with this, as I wasn't happy with my previous solution - it stuttered when the images were changing in most browsers.

Attached is my latest effort. It integrates the prev/next patch from #826928: Add simple photo advance.

I've also abandoned the idea of allowing you to switch back and forth between dynamic and static loading; if you use this, you're using dynamic loading no matter what. That also means this won't do much of anything without JS enabled. Personally, that's not an issue for me - my opinion is that if you're browsing the site without JS enabled, you get what you deserve.

I haven't tested it on a site with more than one gallery per page; I suspect it would not work.

This is in use on both maclife.com and maximumpc.com.

manuel garcia’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

6.x-1.x branch no longer supported