Download complete album als ZIP - Page 5 Download complete album als ZIP - Page 5
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Download complete album als ZIP

Started by Finswimmer, January 18, 2012, 09:33:00 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Αndré

Quote from: Rainakthx on January 31, 2013, 06:36:47 PM
Is there a way to check how many times something has been downloaded? Some kind of log?

That feature currently doesn't exist, but it could be added easily by adding a simple query to zip.php. You either need to add a new table to the database or add a new column to the albums table. In each case you need to create an interface which displays the stats for you if you don't want to do that directly in PHPMyAdmin or a similar tool.

Rainakthx

Thanks for the answers! I'll leave it as is.

Could you please tell me where the zip downloads are stored?

In the past 24 hours they've taken up 100GB's of space so I want to delete them. I've altered the albumZip.php to delete the files after 15 minutes now (as per your post).

Αndré


Rainakthx

Thanks again. Another issue I've encountered:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/username/site/movies-2/include/archive.php on line 651

Anyway to fix this?

Αndré

Quote from: Αndré on May 07, 2012, 03:55:28 PM
It should also be possible to distribute the zip file creation to bypass the execution limit, e.g. just add 5 files at a time to the archive and then start the script from the beginning.
Alternatively you have to increase the max_execution_time limit.

How much files did you try to archive and what's the archive's expected file size?

Rainakthx

8,474 files. A lot, I know. It seems to be able to handle up to around 5,000.

I'm sorry, would you mind explaining how to increase the max_execution_time limit? I tried searching that phrase in both AlbumZip.php and archive.php but couldn't locate it.

Thank you, I'd really like to be able to offer this zip feature for large sized albums. My site is on its own dedicated box so there is no issues with bandwidth and my hdd space is fine.

Αndré


Rainakthx

Thank you! Found it and was about to post to ignore my last message. Thanks again!

faticod

Hi

Really thank you for this great JOB i installed the last revision  , but i try to change the access.. how i can block the guest download?


regards!

faticod

Quote from: faticod on March 20, 2013, 03:56:05 AM
Hi

Really thank you for this great JOB i installed the last revision  , but i try to change the access.. how i can block the guest download?


regards!

Ready i found the solution :

albumZIP.php

search:

include('include/archive.php');

add after :

include('include/archive.php');

if (!USER_ID && ($CONFIG['allow_unlogged_access'] <= 1)) {

    $redirect = 'login.php';

    if ($matches = $superCage->server->getMatched('QUERY_STRING', '/^[a-zA-Z0-9&=_\/.-]+$/')) {
        $redirect .= '?force_login=1&referer='.urlencode('index.php?cat=0'.$matches[0]);
    }

    header("Location: $redirect");
    exit();
}


You need ENABLE OPTION :

ADMIN->CONFIG->USER SETTINGS ->

Allow unlogged users (guest or anonymous) access -> Yes: thumbnail only


NOW THE GUEST CANN'T DOWNLOAD ALBUMS NEED REGISTER


Best Regards  ::)

Αndré

It seems that you're using an outdated plugin version, as the file albumZIP.php doesn't exist in the latest version.

philg_27

Where is the latest version please? - I can only fnd this one:

http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/albumdownload/

which still seems to have the albumZip.php file

Thanks

Αndré

Quote from: Αndré on March 21, 2013, 01:48:18 PM
Unfortunately SourceForge migrated our SVN repository to a new platform, so the links points to the outdated repository. Even worse the new web frontend doesn't provide the option to download tarballs. I just added a plugin package to the plugin announcement thread.

philg_27

Hi - thanks for the quick response. I'm probably being obtuse but I'm still having trouble finding it. Any chance you could post a link to it?
Many thanks

Αndré


philg_27

Hello,

I uninstalled and removed the old version and installed your newer one and it works great - thanks. What I can't manage at the moment though is to get it to disallow unlogged-in guests to download the full size image zipfile. I tried modifying the zip.php file as suggested further back by "faticod" for the earlier albumZip.php but that didn't have any effect - if I'm in the thumbnail view unlogged-in I can still download the full size image zipfile. What I'd like to try and achieve is for unlogged-in guests to be able to view the album thumbnails and intermediate images but not be able to download the full size zipfile. Do you have any suggestions how this might be achieved?

Many thanks

phill104

It would be possible to hide the zip button for unlogged users or even only to admin users but that would require a bit of modification to the code. Another option would to restrict the fullsize image to unlogged users completely using Andre's eccelent plugin - http://forum.coppermine-gallery.net/index.php/topic,74870.0.html
It is a mistake to think you can solve any major problems just with potatoes.

philg_27


Αndré

Quote from: Phill Luckhurst on March 23, 2013, 09:22:25 PM
Andre's eccelent plugin
I haven't created that plugin, I just ported that plugin to cpg1.5.x ;)


To hide the button for guests, open codebase.php, find
if ($superCage->get->getInt('album') > 0) {
and replace with
if (USER_ID && $superCage->get->getInt('album') > 0) {

open zip.php, find
<?php
and below, add
if (!USER_ID) {
    cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}

faticod

Coppermine version 1.5.9
This my version from album zip download .. works fine for me i add other modifications and lines.

For block guest download REMEMBER ADMIN->CONFIG->USER SETTINGS ->

Allow unlogged users (guest or anonymous) access -> Yes: thumbnail only  <<--- select this and save

if not enable the plugin doesn't work.