| jovigirl wrote: |
| No luck with this guys? |
No offense, but while I think this feature has some use, it's a bit much to expect someone to jump right on it. There's still a lot of work to be done on the core, as well as rolling out higher priority features and enhancements. Patience is a virtue.
The other issue would be that development is really focused on Dragonfly (9.x), and not on the 8.x code. New features from the team are going to go in the current version. Unless you want to hire a code mercenary to do it for you...
| jovigirl wrote: |
I will pay $100 paypal or epassporte to whoever can hook me up with a solution
or donate it to the site if it's done by a member of the team
It needs to work with the 8.3 cpgnuke version |
Offering a nice carrot makes it easier to get coders, yes.
| jovigirl wrote: |
and please work on it guys
it's not such a difficult thing for you!
the zip funtion can be server side implemented with the zip module or done by php and you already have that coded by the coppermine standalone team |
I took a look at the Coppermine 1.3.2 code and I think you've made a few incorrect assumptions.
First, if I'm reading the DB query correctly, Coppermine 1.3.2 only implements ZIPping files selected in the Favorites table, which I don't even think CPG-Nuke or Dragonfly implement. I think your intent is to be able to ZIP on an album-by-album basis, which would seem to have utility.
The "zipdownload.php" code is useless as a starting point for a number of reasons. First, if I'm reading the manual correctly, PHP only supports ZIP read-only access natively (assuming it was compiled in). You'd have to support
writing archives, either by making a system() call or adding a class. Coppermine 1.3.2 goes the latter route and adds support classes in "include/archive.php". Looking at that, it appears to build the ZIP data structures in memory, and seems to be pretty rudimentary. It might be entirely suitable to the task in terms of efficiency and speed, I'm not really able to qualitively judge it.
Next, the code creates the ZIP
each and every time someone clicks the link. This is terribly resource-intensive and wasteful. If the archive's created entirely in memory, and you're ZIPping up a lot of large graphics... you could starve out the server's memory really, really fast. Probably a lot faster than any of us would care to think. Ideally, the process should check to see first if the archive exists, then check to see if the archive is older than the newest picture in the gallery. If both of those conditions are true, it should create the archive and save it to the album (let's say in "
albumname/.archive/
album_name_
date.zip" or something similiar to keep the zip handy, but out of the way of the album indexer). This adds considerable complexity to the checking routines and file I/O that are not extant in Coppermine 1.3.2 currently. The best solution to this may be very well to create the ZIPs outside of the structure of the CMS with a cron script (PERL could do this easy as PI) and just create links to the location of the ZIPs (the CMS could check to see if the file exists first as a cheap and easy way of enabling/disabling downloads, and maybe display how out-of-date or fresh the archive is).
There's the not-inconsiderable problem of running up against max_execution_time, or eating up the space in /tmp creating the ZIP, or in /albums writing it out for reuse. All conditions which need to be considered and handled.
I'd think that the feature should have at a minimum a global configuration setting to enable/disable it, if not both a global and per-album configuration. Either of which would require additional work on the various control panel interfaces and the DB.
Finally, proper error-checking and user input validation would need to be performed in order to stack up to the project's coding standards.
Having said all the above, I think the feature request has merit, but the scope of the effort is more than just a simple port - as I don't think that Coppermine 1.3.2 is really doing what you want, and I'm pretty sure it's not doing it
well. As it stands, I could see turning on this feature could very well devastate the performance of a host. Doing it roight is probably well worth the $100 bounty you've offered.