4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: rohanrohanrohan on June 07, 2003, 11:52:33 PM
-
have some large vids on my gallery and about 50 of them
noticed that members can easily download all the vids in one go approx 300mb
zipping them up and downloading will cause immenese server load. one of reasons why my gallery is working too slow!
any way to disable lite box for a certain cat or certain file type?
thanks
-
Why not just kill the ability to zip the lightbox? Just remove the zip button from lightbox.html
-
But I want the lightbox for images. just not for vids as they are large in size.
anyone can download the whole vid collection by selecting all the vids and as one big 300-400mb zip file
-
ok, here is what u need to do:
open /download.php
find:if (!empty($file_path)) {
add before:$exclude = array("avi", "mpg", "mpeg", "mp3", "zip");
ereg("(.+)\.(.+)", basename($file_path), $regs);
if (in_array(strtolower($regs[2]), $exclude)) {
continue;
}
add in the $exclude array as many extensions, that u dont want be included into the package, as u want.
that's it ;)
-
But I want the lightbox for images. just not for vids as they are large in size.
anyone can download the whole vid collection by selecting all the vids and as one big 300-400mb zip file
So you don't want the ability to download videos one at a time from the lightbox? The zip feature is only useful to package up multiple files and download them in a single archive. For jpgs and other media, zip doesn't provide any significant compression as jpegs are already compressed.
If you exclude the file type, users won't even be able to add just one video to their lightbox and download just the one video. Just thought I'd add this info in case it might help someone.
-
thanks veno. howevever that code still adds the videos to the lightbox. although it doesnt downlaod them
any way to stop them being selected frm being added to lightbox in first place?
like disabling the lighbox button for vids, i.e of certain file types?
-
ah, ok...:? (personaly I dont see any advantage of not let ppl fully use lightbox...)
open /includes/functions.php
find: if ($user_info['user_level'] != GUEST) {
$lightbox_url = $self_url;
replace with: $exclude = array("avi", "mpg", "mpeg", "mp3", "zip");
ereg("(.+)\.(.+)", basename($image_row['image_media_file']), $regs);
if ($user_info['user_level'] != GUEST && !in_array(strtolower($regs[2]), $exclude)) {
$lightbox_url = $self_url;
-
ooh yes veno!! u are the man!
superb!