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
ok guy and your script works with the version 1.3.1 ???
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
Oups ... sorry I've made a mistake
I've version 1.3 installed on my server.
Offline
Great !!!!
But it seems the zip is not valid :(
Offline
Tks...
Are you talking about the zip of the code, or the zip generated by the photos.
Offline
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
Zip of the code...
but the new one works : thanx!!!
Offline
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
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 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 !
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 ??
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
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