Hi,
I wrote a little plugin that is able to create zip-files on the fly while streaming them. Other than that the functionality is the same as Zenphoto's album-zip.
Advantage over the built in functionality is, that download starts immediately. You don't have to wait for zip file to be created before it is sent, but unlike using persistent archives it is always up to date.
There is a small drawback though. As the zip-file is still being created while getting sent, there won't be a filesize given. So resuming the download and estimated time till completion inside your browser/download manager won't work.
Requirements:
PHP 5.1.2 is required and safe mode = off is strongly recommended as timeouts may appear for large albums with safe mode enabled.
Usage:
just download from the link provided below and unpack the zip-file into your plugins folder.
enable the plugin.
and add the following line into your album.php, whereever you want the download-link to appear:
printAlbumZipStream();
Thanks, new plugins are always welcome. But please create a page with some info we can link to from our extensions section. We don't like to directly link to 3rd party tools as that looks as if it is by us and linking to a forum post is not that good as well. Please see:
http://www.zenphoto.org/news/general-contributor-guidelines#themes-and-plugins
ok. I created a SF-project under:
https://sourceforge.net/projects/albumzipstream/
not much information on it yet, though.
I'll add more, when i've a little bit more time.
Could you please edit the download-link in my first post so it points to the sourceforge project?
Thanks.
Hmm - I didn't think, there are so many ways of dropping a file somewhere
I did everything again just now and realized, that the plugin consists of the plugin-php file PLUS an extra subfolder. Both these elements need to go into the "plugins"-folder ....
got it, thanks
Ok, new problem
I activated the plugin and included the link in my skin, easy.
When I click the link "Download a zip file of this album" in the album "test"(just like i want it) the download begins and I get a zip file named "test.zip", size is 5.7 MB which makes sense.
Problem:
When I unzip the file I strangely get a new file named "test.zip.cpgz"
Various tools can't explain me, why and what this is ...
Any ideas from your side?
Thanks
hein
After some googleing I found out that there are lots of entries regarding .zip files becoming .cpgz on Mac OSX using the default Mac unzipper.
could you pls confirm that you're using OSX and unzipper?
If so, I might have a solution for this and try to do some code changes tonight.
Hey - great.
yes, I'm on Mac OS X 10.6.
For unzipping I tried
that's it.
Thanks a lot!!!
Ok. I've implemented a small change, that will hopefully fix your bug. I'm not able to verify though as I don't have a Mac to try the fix.
Please download the fix from:
http://sourceforge.net/projects/albumzipstream/files/test/albumZipStream-Fix_OSX.zip/download
replace the files and report back.
not what i was hoping to hear...
I have uploaded some sample zip-files to:
https://sourceforge.net/projects/albumzipstream/files/test/Sample%20Zips/
maybe you can try which of them cause problems on your mac and which, if any, work. That would really help me to narrow down the problem.
Sure!!!
I checked -
test.zip -> test.zip.cpgz
test2.zip -> readme.test
test3.zip -> readme.test
I tried a few hours ago on a Ubuntu machine of a friend, just to check and she also couldn't unzip the zip-archive from my homepage. (http://photos.project22.org/test-2/)
Thanks very much for your assistance. Cheers
Thanks. your input and espacially your link are of great help.
I've uploaded another build to:
http://sourceforge.net/projects/albumzipstream/files/test/albumZipStream-Fix_OSX.zip/download
which will hopefully fix the problem.
Edit: just for those interested in technical info:
there were 2 problems.
seems i've missed a notice.
fixed and hopefully working version now:
http://sourceforge.net/projects/albumzipstream/files/test/albumZipStream-Fix_OSX.zip/download
I have installed this plugin and added the printAlbumZipStream(); to my album.php... it shows up just fine... the issue originally was a gettext() call to undefined..... I recompiled apache with gettext which solved that issue, now the issue I have is that when you hit the link I get the url as 404 not found. The url is actually strange as it is domain.com/plugins/zp-core/setup.php?autorun=gallery . Not sure why it is looking for zpcore folder in the plugins folder to begin with.... You can see y example on this test site....http://boatsandho.es/index.php?album=test3/ it is the second download zip link as the first is a another test and failing with the native print album zip