Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 2 3 4 [5] 6 7 8 9   Go Down

Author Topic: Download complete album als ZIP  (Read 203814 times)

0 Members and 1 Guest are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Download complete album as ZIP
« Reply #80 on: February 01, 2013, 12:20:35 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.
Logged

Rainakthx

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Download complete album als ZIP
« Reply #81 on: February 02, 2013, 09:25:34 am »

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).
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Download complete album als ZIP
« Reply #82 on: February 02, 2013, 07:08:44 pm »

They're stored in albums/edit/.
Logged

Rainakthx

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Download complete album als ZIP
« Reply #83 on: February 06, 2013, 08:09:07 am »

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?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Re: Download complete album als ZIP
« Reply #84 on: February 06, 2013, 09:46:19 am »

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?
Logged

Rainakthx

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Download complete album als ZIP
« Reply #85 on: February 06, 2013, 11:35:48 am »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Download complete album als ZIP
« Reply #86 on: February 06, 2013, 11:39:12 am »

It's a PHP setting.
Logged

Rainakthx

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Download complete album als ZIP
« Reply #87 on: February 06, 2013, 11:53:56 am »

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

faticod

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Download complete album als ZIP
« Reply #88 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!
Logged

faticod

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Download complete album als ZIP
« Reply #89 on: March 21, 2013, 06:12:24 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:

Code: [Select]
include('include/archive.php');
add after :

Code: [Select]
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  ::)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Download complete album als ZIP
« Reply #90 on: March 21, 2013, 10:34:35 am »

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

philg_27

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Download complete album als ZIP
« Reply #91 on: March 22, 2013, 02:48:46 pm »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Download complete album als ZIP
« Reply #92 on: March 22, 2013, 02:54:05 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.
Logged

philg_27

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Download complete album als ZIP
« Reply #93 on: March 22, 2013, 04:43:26 pm »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Download complete album als ZIP
« Reply #94 on: March 22, 2013, 04:55:22 pm »

Logged

philg_27

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Download complete album als ZIP
« Reply #95 on: March 23, 2013, 03:51:18 pm »

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
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Download complete album als ZIP
« Reply #96 on: March 23, 2013, 09:22:25 pm »

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
Logged
It is a mistake to think you can solve any major problems just with potatoes.

philg_27

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Download complete album als ZIP
« Reply #97 on: March 24, 2013, 04:31:56 pm »

Thanks - I'll give that a try
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Re: Download complete album als ZIP
« Reply #98 on: March 25, 2013, 11:59:56 am »

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
Code: [Select]
if ($superCage->get->getInt('album') > 0) {and replace with
Code: [Select]
if (USER_ID && $superCage->get->getInt('album') > 0) {
open zip.php, find
Code: [Select]
<?phpand below, add
Code: [Select]
if (!USER_ID) {
    cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}
Logged

faticod

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Download complete album als ZIP
« Reply #99 on: March 26, 2013, 05:03:07 am »

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.
Logged
Pages: 1 2 3 4 [5] 6 7 8 9   Go Up
 

Page created in 0.024 seconds with 20 queries.