Announcement

#1 2004-03-24 17:07:20

Benjagol
Guest

Download Photos Mod

Hi,

I'm french guy but I want to share with everybody my new 'beta' mod :

All my friends asked me how to download all the photos of one category.

That's why I've updated the great PHPWebGallery by adding little code to display a link (top right of the category)

At the moment, we can download all files of the category. The photos are 'on the fly' zipped in order to gain space
on my ftp server.

For technical reason, photos are splited in several zip files (max 1Mo by file) because online.net and free (my provider) do
not permit more than 1Mo of processing on the server (see technical support of online)

You will find a demo at :

http:benjamin.achiary.com
login : pwguser
Pwd  : pwguser

Code is not perfect but it's working with distant sites  :D (yes ! I did !).
I just need to take care of subdirectories  :(

Let me know if your are interesting by this code. I will comment and publish  if needed.


Take it easy
Ben

 

#2 2004-03-24 19:52:08

Benjagol
Guest

Re: Download Photos Mod

I've putted modifications at :

DownloadMod.zip

:o 

 

#3 2004-03-25 01:53:19

Tinmar
Guest

Re: Download Photos Mod

ok guy and your script works with the version 1.3.1 ???

 

#4 2004-03-25 09:26:27

benjagol
Guest

Re: Download Photos Mod

euhh.... I'm using v.1.4 but I've only changed category.php in order to display the link. The rest of the mod is in 3 new files :
download : display the links
phpzip.inc : to zip files
style         : because I've not included default style using template and so on ...  :-?

I've updated my script to run perfectly (dynamicly) with distant server and include subdirectory (probably 1 at the moment).

Please take a look at demo (see first post)  8-O

Hope this helps
Regards
Ben

 

#5 2004-03-25 11:21:42

benjagol
Member
2004-03-25
7

Re: Download Photos Mod

Oups ... sorry I've made a mistake
I've version 1.3 installed on my server.

Offline

 

#6 2004-03-25 11:30:11

Webabar
Member
France
2004-03-24
214

Re: Download Photos Mod

Great !!!!

But it seems the zip is not valid :(


Y'a des détails qui trompent pas...
Ma galerie PWG :
http://pagesperso.laposte.net/cezanne92/

Offline

 

#7 2004-03-25 11:33:37

benjagol
Member
2004-03-25
7

Re: Download Photos Mod

Tks...

Are you talking about the zip of the code, or the zip generated by the photos.

Offline

 

#8 2004-03-25 11:56:53

benjagol
Member
2004-03-25
7

Re: Download Photos Mod

I've just migrated my site to version 1.3.1 and updated code for download mod.

You will find the zip code file at the following location :

Downloader1.3.1

Let me know if it's ok
Regards
Ben

Offline

 

#9 2004-03-25 12:17:56

Webabar
Member
France
2004-03-24
214

Re: Download Photos Mod

Zip of the code...
but the new one works : thanx!!!


Y'a des détails qui trompent pas...
Ma galerie PWG :
http://pagesperso.laposte.net/cezanne92/

Offline

 

#10 2004-03-25 14:18:11

benjagol
Member
2004-03-25
7

Re: Download Photos Mod

You're welcome ;)

Note that if you are using your own server (and not restricted download server) you can change the max size of the zip file. And you will have less file to download.

See in include/phpzip.inc.php;

if($maxsize < 800000)
{
}
else       {
[.....]

You just have to increase the maxsize check like
if($maxsize < 5000000)

And you will download 5Mo zip files max.

There is probably other points like that to update.  :-P


Enjoy ;)

Offline

 

#11 2004-03-28 19:19:22

Tinmar
Guest

Re: Download Photos Mod

OK the modif seems to work but i thing there is a little problem with the downloaded zip file.  I didn't manage to begin the downloading. I've clicked on the "Photo de x a z" link and nothing happend....

The downloading doesn't want to begin !!!!

thank you ....

 

#12 2004-03-28 19:24:54

Tinmar
Guest

Re: Download Photos Mod

OK the modif seems to work but i thing there is a little problem with the downloaded zip file.  I didn't manage to begin the downloading. I've clicked on the "Photo de x a z" link and nothing happend....

The downloading doesn't want to begin !!!!

thank you ....

Ok sorry little mistake !!

it seems to work now........



bye !

 

#13 2004-03-28 23:00:17

Tinmar
Guest

Re: Download Photos Mod

Me again !!!

just a question. After having downloaded, the zip file is left in the root directory on the server. Is it possible to delete it after the user has downloaded it ??

 

#14 2004-03-29 10:02:57

benjagol
Member
2004-03-25
7

Re: Download Photos Mod

Hi,

In fact, the zip file should be deleted if everything works.

At the end of the script there is a unlink command in order to delete the file.

I think that if the script abort the file is not deleted. That's the only reason.

For that, you need to clean up manually or schedule something to delete zip files.

Regards
Ben

Offline

 

#15 2004-07-03 14:04:23

julien
Member
Paris
2004-05-27
37

Re: Download Photos Mod

I am trying to install your MOD under 1.3.2 and I have this error :
Notice: Undefined offset: 1 in c:\web\include\phpzip.inc.php on line 138
When I change the
"$pref = $args[1];"
by
"$pref = $args[0];"
I have this error
Notice: Undefined variable: file in c:\web\include\phpzip.inc.php on line 157
The line 157 => "return $file;"

Do you have any idea of where I have a mistake and where I need to change the code ?
thank you for your help

For information, to avoiding the error on category.php when no category is select I have change the beginning
" if($_GET['cat'] > 0){ "
by
"if( isset ( $page['cat'] ) ) { "

Julien

Last edited by julien (2004-07-03 14:05:10)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact