4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 01, 2016, 07:26:33 AM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Issues / Ausgaben
| |-+  Discussion & Troubleshooting (Moderators: Acidgod, ivan, Rembrandt)
| | |-+  How to disable Lite Box for videos?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: How to disable Lite Box for videos?  (Read 4072 times)
rohanrohanrohan
Full Member
***
Offline Offline

Posts: 200

Thank You
-Given: 0
-Receive: 0


View Profile
« 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
Logged
Chris
4images Moderator
4images Guru
*****
Offline Offline

Posts: 4487

Thank You
-Given: 0
-Receive: 28

Did u ever stop to think and then forget to start?


View Profile
« Reply #1 on: June 08, 2003, 03:32:17 AM »

Why not just kill the ability to zip the lightbox?  Just remove the zip button from lightbox.html
Logged

rohanrohanrohan
Full Member
***
Offline Offline

Posts: 200

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #2 on: June 08, 2003, 08:15:37 AM »

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
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 560

mmm PHP...


View Profile WWW
« Reply #3 on: June 08, 2003, 05:21:58 PM »

ok, here is what u need to do:
open /download.php
find:
1
if (!empty($file_path)) {

add before:
1
2
3
4
5
$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 Wink
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
Chris
4images Moderator
4images Guru
*****
Offline Offline

Posts: 4487

Thank You
-Given: 0
-Receive: 28

Did u ever stop to think and then forget to start?


View Profile
« Reply #4 on: June 08, 2003, 08:16:35 PM »

Quote from: rohanrohanrohan   [Expand]
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.
Logged

rohanrohanrohan
Full Member
***
Offline Offline

Posts: 200

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #5 on: June 09, 2003, 06:16:54 PM »

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?
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 560

mmm PHP...


View Profile WWW
« Reply #6 on: June 09, 2003, 10:14:42 PM »

ah, ok...Confused (personaly I dont see any advantage of not let ppl fully use lightbox...)

open /includes/functions.php
find:
1
2
 if ($user_info['user_level'] != GUEST) {
    $lightbox_url = $self_url;

replace with:
1
2
3
4
 $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;
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
rohanrohanrohan
Full Member
***
Offline Offline

Posts: 200

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #7 on: June 09, 2003, 11:07:22 PM »

ooh yes veno!! u are the man!

superb!
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.262 seconds with 19 queries.
Post your comments here