4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on March 27, 2003, 01:44:45 PM

Title: [MOD] Lightbox for GUESTs v1.2
Post by: V@no on March 27, 2003, 01:44:45 PM
-------- Overview -----------------
This MOD will let guests add picture to their lightbox, based on sessions + cookies.
u can see it an action here (http://gallery.vano.org)

-------- Known issue -------------
"GUESTs" lightbox is separate from "USERs", that means, that if u add some images to the lightbox, while u are not logged in and then do login, u wont have those images in the lightbox, untill u logged out.

-------- Installation ---------------

1.
Open /includes/functions.php
Find:
Code: [Select]
  if ($user_info['user_level'] != GUEST) {Replace with:
Code: [Select]
  if ($user_info['user_level'] >= GUEST) {
1.2.
Find next:
Code: [Select]
function add_to_lightbox($id) {
  global $user_info, $site_db;
  $id = intval($id);
  if (!$id) {
    return false;
  }
  $lightbox_ids = $user_info['lightbox_image_ids'];
  $lightbox_array = explode(" ", $lightbox_ids);
  if (!in_array($id, $lightbox_array)) {
    $lightbox_ids .= " ".$id;
  }
  $user_info['lightbox_image_ids'] = trim($lightbox_ids);
  $user_info['lightbox_lastaction'] = time();
Replace with:
Code: [Select]
function add_to_lightbox($id) {
  global $user_info, $site_db, $site_sess;
  $id = intval($id);
  if (!$id) {
    return false;
  }
  if ($user_info['user_level'] == GUEST) {
    $lightbox = $site_sess->get_session_var('lightbox');
    $user_info['lightbox_image_ids'] = ($lightbox) ? $lightbox : $site_sess->read_cookie_data("lightbox");
  }
  $lightbox_ids = $user_info['lightbox_image_ids'];
  $lightbox_array = explode(" ", $lightbox_ids);
  if (!in_array($id, $lightbox_array)) {
    $lightbox_ids .= " ".$id;
  }
  $user_info['lightbox_image_ids'] = trim($lightbox_ids);
  $user_info['lightbox_lastaction'] = time();
  if ($user_info['user_level'] == GUEST) {
    $site_sess->set_cookie_data("lightbox", $user_info['lightbox_image_ids'], 1);
    $site_sess->set_cookie_data("lightbox_lastaction", $user_info['lightbox_lastaction'], 1);
    $site_sess->set_session_var("lightbox", $user_info['lightbox_image_ids']);
    $site_sess->set_session_var("lightbox_lastaction", $user_info['lightbox_lastaction']);
    return 1;
  }

1.3.
Find next:
Code: [Select]
function remove_from_lightbox($id) {
  global $user_info, $site_db;
  $lightbox_array = explode(" ",$user_info['lightbox_image_ids']);
  foreach ($lightbox_array as $key => $val) {
    if ($val == $id) {
      unset($lightbox_array[$key]);
    }
  }
  $user_info['lightbox_image_ids'] = trim(implode(" ", $lightbox_array));
  $user_info['lightbox_lastaction'] = time();
Replace with:
Code: [Select]
function remove_from_lightbox($id) {
  global $user_info, $site_db, $site_sess;
  if ($user_info['user_level'] == GUEST) {
    $lightbox = $site_sess->get_session_var('lightbox');
    $user_info['lightbox_image_ids'] = ($lightbox) ? $lightbox : $site_sess->read_cookie_data("lightbox");
  }
  $lightbox_array = explode(" ",$user_info['lightbox_image_ids']);
  foreach ($lightbox_array as $key => $val) {
    if ($val == $id) {
      unset($lightbox_array[$key]);
    }
  }
  $user_info['lightbox_image_ids'] = trim(implode(" ", $lightbox_array));
  $user_info['lightbox_lastaction'] = time();
  if ($user_info['user_level'] == GUEST) {
    $site_sess->set_cookie_data("lightbox", $user_info['lightbox_image_ids'], 1);
    $site_sess->set_cookie_data("lightbox_lastaction", $user_info['lightbox_lastaction'], 1);
    $site_sess->set_session_var("lightbox", $user_info['lightbox_image_ids']);
    $site_sess->set_session_var("lightbox_lastaction", $user_info['lightbox_lastaction']);
    return 1;
  }

1.4.
Find next:
Code: [Select]
function clear_lightbox() {
  global $user_info, $site_db;
  $current_time = time();
Replace with:
Code: [Select]
function clear_lightbox() {
  global $user_info, $site_db, $site_sess;
  $current_time = time();
  if ($user_info['user_level'] == GUEST) {
    $user_info['lightbox_image_ids'] = "";
    $user_info['lightbox_lastaction'] = $current_time;
    $site_sess->set_cookie_data("lightbox", "");
    $site_sess->drop_session_var("lightbox");
    $site_sess->set_cookie_data("lightbox_lastaction", $current_time, 1);
    $site_sess->set_session_var("lightbox_lastaction", $current_time);
    return true;
  }

1.5.
Find next:
Code: [Select]
function check_lightbox($id) {
  global $user_info;
Replace with:
Code: [Select]
function check_lightbox($id) {
  global $user_info, $site_sess;
  if ($user_info['user_level'] == GUEST) {
    $lightbox = $site_sess->get_session_var('lightbox');
    $user_info['lightbox_image_ids'] = ($lightbox) ? $lightbox : $site_sess->read_cookie_data("lightbox");
  }


2.
Open /lightbox.php
Find and remove (or comment):
Code: [Select]
if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) {
  show_error_page($lang['lightbox_register']);
}

2.1.
Find next:
Code: [Select]
if (!empty($user_info['lightbox_image_ids']))  {Add before:
Code: [Select]
if ($user_info['user_level'] == GUEST) {
    $lightbox = $site_sess->get_session_var('lightbox');
    $user_info['lightbox_image_ids'] = ($lightbox) ? $lightbox : $site_sess->read_cookie_data("lightbox");
    $lightbox = $site_sess->get_session_var('lightbox_lastaction');
    $user_info['lightbox_lastaction'] = ($lightbox) ? $lightbox : $site_sess->read_cookie_data("lightbox_lastaction");
}

2.2a. (4images v1.7 - 1.7.3)
Find next:
Code: [Select]
  if (!empty($user_info['lightbox_image_ids'])) {
    $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?action=lightbox")."\"><img src=\"".get_gallery_image("download_zip.gif")."\" border=\"0\" alt=\"\" /></a>";
Replace with:
Code: [Select]
  if (!empty($user_info['lightbox_image_ids']) && $user_info['user_level'] != GUEST) {
    $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?action=lightbox")."\"><img src=\"".get_gallery_image("download_zip.gif")."\" border=\"0\" alt=\"\" /></a>";

2.2b. (4images v1.7.4 and newer)
Find:
Code: [Select]
  if ($download_allowed && !empty($user_info['lightbox_image_ids'])) {
    $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?action=lightbox")."\"><img src=\"".get_gallery_image("download_zip.gif")."\" border=\"0\" alt=\"\" /></a>";
Replace with:
Code: [Select]
  if ($download_allowed && !empty($user_info['lightbox_image_ids']) && $user_info['user_level'] != GUEST) {
    $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?action=lightbox")."\"><img src=\"".get_gallery_image("download_zip.gif")."\" border=\"0\" alt=\"\" /></a>";

3.
Open /templates/<yourtemplate>/user_loginform.html
Insert:
Code: [Select]
<a href="{url_lightbox}">{lang_lightbox}</a>
4. * Fix
Open /includes/page_header.php
Find:
Code: [Select]
//-----------------------------------------------------
//--- Add & Delete from Lists -------------------------
//-----------------------------------------------------
if ($action == "addtolightbox" && $id) {
  if ($user_info['user_level'] >= USER) {
    $msg = (add_to_lightbox($id)) ? $lang['lightbox_add_success'] : $lang['lightbox_add_error'];
  }
  else {
    $msg = $lang['lightbox_register'];
  }
}
if ($action == "removefromlightbox" && $id) {
  if ($user_info['user_level'] >= USER) {
    $msg = (remove_from_lightbox($id)) ? $lang['lightbox_remove_success'] : $lang['lightbox_remove_error'];
  }
  else {
    $msg = $lang['lightbox_register'];
  }
}
if ($action == "clearlightbox") {
  if ($user_info['user_level'] >= USER) {
    $msg = (clear_lightbox()) ? $lang['lightbox_delete_success'] : $lang['lightbox_delete_error'];
  }
  else {
    $msg = $lang['lightbox_register'];
  }
}
Replace with:
Code: [Select]
//-----------------------------------------------------
//--- Add & Delete from Lists -------------------------
//-----------------------------------------------------
if ($action == "addtolightbox" && $id) {
  if ($user_info['user_level'] >= GUEST) {
    $msg = (add_to_lightbox($id)) ? $lang['lightbox_add_success'] : $lang['lightbox_add_error'];
  }
  else {
    $msg = $lang['lightbox_register'];
  }
}
if ($action == "removefromlightbox" && $id) {
  if ($user_info['user_level'] >= GUEST) {
    $msg = (remove_from_lightbox($id)) ? $lang['lightbox_remove_success'] : $lang['lightbox_remove_error'];
  }
  else {
    $msg = $lang['lightbox_register'];
  }
}
if ($action == "clearlightbox") {
  if ($user_info['user_level'] >= GUEST) {
    $msg = (clear_lightbox()) ? $lang['lightbox_delete_success'] : $lang['lightbox_delete_error'];
  }
  else {
    $msg = $lang['lightbox_register'];
  }
}


5. Added 9-23-2003 *optional, only if u want let your guests download the lightbox
Open download.php
Find:
Code: [Select]
if ($action == "lightbox") {

Add after:
Code: [Select]
  if ($user_info['user_level'] == GUEST) {
    $lightbox = $site_sess->get_session_var('lightbox');
    $user_info['lightbox_image_ids'] = ($lightbox) ? $lightbox : $site_sess->read_cookie_data("lightbox");
  }
Title: [MOD] Lightbox for GUESTs
Post by: Bomba on April 05, 2003, 09:47:53 PM
i've tried this mod but it seems that it's not working cause when i click in "album" button as a guest it doesn't save that info and then i go to the album link and it says that i don't have any images on favs.

should i post my code here?
Title: [MOD] Lightbox for GUESTs
Post by: V@no on April 13, 2003, 04:36:40 AM
Ops. sry, forgot add one more step :oops:
Check out step 4.
Title: [MOD] Lightbox for GUESTs
Post by: andersen on May 13, 2003, 02:08:59 PM
Everything I had follow.

after result is, I am act as guest, I can select my light boxs, the picture I selected have a "tick" there.

but when I click on lightbox link it give me below message.

Error
--------------------------------------------------------------------------------

In order to use the lightbox, you have to register.

P/s: again, the select picture lightbox is WORKING but just when click on the lightbox link to show the fully selected lightbox is not working

Which file I had to refer back?
Title: [MOD] Lightbox for GUESTs
Post by: V@no on May 13, 2003, 10:53:44 PM
did u do step 2. ? are those three line in your lightbox.php commented (means two forward slashes infront of each line: //) or deleted now?
Title: [MOD] Lightbox for GUESTs
Post by: andersen on May 14, 2003, 06:29:25 AM
Dear V@no,

It is done! this mod very peferctly now!

Yes, you are right, I since I check all script I found one / is missing. when replace it, it work perfectly.

V@no, Thank again!

Because of you, our gallery look more advance! nice jobs! Want I spend you a dinner?  :lol:  he he
Title: error
Post by: hoelzlmani on May 23, 2003, 12:37:34 PM
i get an error after install this mod. Warning: Cannot add header information - headers already sent by (output started at /homepages/0/d72423240/htdocs/smssprueche/nuke/homepage/4images/includes/functions.php:2526) in /homepages/0/d72423240/htdocs/smssprueche/nuke/homepage/4images/includes/sessions.php on line 171

this comes 4 times.

this is line 171:
function set_cookie_data($name, $value, $permanent = 1) {

     $cookie_expire = ($permanent) ? $this->current_time + 60 * 60 * 24 * 365 : 0;

     $cookie_name = COOKIE_NAME.$name;

     setcookie($cookie_name, $value, $cookie_expire, COOKIE_PATH,  COOKIE_DOMAIN, COOKIE_SECURE);

   }

i saved the changed files and copy back the original files, but i have still the above error.
Title: Re: error
Post by: V@no on May 23, 2003, 01:05:40 PM
Quote from: hoelzlmani
Warning: Cannot add header information - headers already sent by (output started at /homepages/0/d72423240/htdocs/smssprueche/nuke/homepage/4images/includes/functions.php:2526) in /homepages/0/d72423240/htdocs/smssprueche/nuke/homepage/4images/includes/sessions.php on line 171

usualy this error shows when u have some extra space or new line after closing ?> in .php files. check again every file u edited.
Title: @ V@no
Post by: Maxxx on June 18, 2003, 05:07:03 PM
@ V@no

Hi , I've a problem with your MOD . After all modification , guests are unable to download our choosed images in lightbox ( botton are visible but inactive ) and unable to clear our lightbox..  
 
What happens ?
Title: [MOD] Lightbox for GUESTs
Post by: V@no on June 18, 2003, 05:38:18 PM
strange, everything works just fine for me...exept download button ;)
to fix that, in lightboxes.php find:
Code: [Select]
 if (!empty($user_info['lightbox_image_ids']) && $user_info['user_level'] != GUEST) {
replace with:
Code: [Select]
 if (!empty($user_info['lightbox_image_ids'])) {
Title: [MOD] Lightbox for GUESTs
Post by: Maxxx on June 18, 2003, 05:58:44 PM
Quote from: V@no
strange, everything works just fine for me...exept download button ;)
to fix that,...


Thank's , the fix works fine.
But the first problem continue to persist... may be the problem caused by the cookies ?
Title: [MOD] Lightbox for GUESTs
Post by: V@no on June 18, 2003, 06:01:42 PM
I'm not sure...can I try?  :wink:
Title: [MOD] Lightbox for GUESTs
Post by: Maxxx on June 18, 2003, 06:07:53 PM
Quote from: V@no
I'm not sure...can I try?  :wink:


Here the  link to my under-construction-website..

http://www.faithhill.it/portal/modules.php?name=TechMedia&file=index
Title: [MOD] Lightbox for GUESTs
Post by: V@no on June 18, 2003, 06:28:26 PM
at the begining I was getting javascript error messages, and clear lighbox didnt work, then I closed my browser and opened again - no error messages, clear lighbox working now, but download never worked, it just refreshing whole page.
does your download button work for members at all?
Title: [MOD] Lightbox for GUESTs
Post by: Maxxx on June 18, 2003, 06:40:40 PM
Quote from: V@no
..
does your download button work for members at all?


Ya, for members the download through the lightbox page works fine!
Title: [MOD] Lightbox for GUESTs
Post by: Smoother on June 18, 2003, 07:39:12 PM
thank you!

it works perfectly!
Title: [MOD] Lightbox for GUESTs
Post by: Maxxx on June 18, 2003, 07:42:57 PM
Quote from: Smoother
thank you!

it works perfectly!


What ? 8O
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on March 11, 2005, 08:52:40 AM
V@no
could you please check if it is allright!
sincerly
vincent
Title: Re: [MOD] Lightbox for GUESTs
Post by: V@no on March 12, 2005, 01:40:39 AM
V@no
could you please check if it is allright!
sincerly
vincent
sorry, what is alright?
Didnt understand your post..
Title: Re: [MOD] Lightbox for GUESTs
Post by: triaphoto on March 19, 2005, 08:30:29 PM
This mod would be perfect, but...
My Gallery runs with 4images 1.7.1. Added pictures are tagged but the lightbox is empty.

I think there is a problem with my version, vano´s gallery runs with 1.7

I checked the cookies, there is one difference:

1.7.1
sessionid  86532440b238abb46f19f1e81d3a09fa

1.7.
4images_sid  0a88f4ebcce9a4b3eea48d3eac2b724e

Could you please post a changed mod that runs also with 1.7.1 ? would be great!
Title: Re: [MOD] Lightbox for GUESTs
Post by: V@no on March 19, 2005, 08:44:20 PM
this mod should work on v1.7.1 by default.
Do u have in your cookies: 4images_lightbox
?
if u dont, then u probably made a misstake during installation.
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on March 29, 2005, 12:38:48 PM
Hello
i would like to have the possibility to send the lightbox - as example to request how much the picture will cost!
But i don't wan't guests do download the image!

sincerly
vincent
Title: Re: [MOD] Lightbox for GUESTs
Post by: V@no on March 29, 2005, 09:23:38 PM
Hello
i would like to have the possibility to send the lightbox - as example to request how much the picture will cost!
But i don't wan't guests do download the image!
sorry I dont quet understand your request....send lightbox where?
guest download lightbox is optional in step 5
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on March 30, 2005, 09:00:07 AM
@Vano
Imagine you select with the lightbox 10 Picture then you should be able to send this lightbox like a contact sheet to me to request the price of the picture!

or i will send a couple of picture to a agency to ask if it is what he was looking for!

do you know what i mean?

sincelry
vincent
Title: Re: [MOD] Lightbox for GUESTs
Post by: V@no on March 30, 2005, 09:03:50 AM
yeah, well, this request has absolutely nothing to do with this mod ;) start a new request topic or something ;)
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on March 30, 2005, 06:44:46 PM
v@no
you wan't belive me but there have been a mod about this!
 :cry:

 :roll: Vincent
Title: Re: [MOD] Lightbox for GUESTs
Post by: V@no on March 30, 2005, 07:28:12 PM
v@no
you wan't belive me but there have been a mod about this!
 :cry:

 :roll: Vincent
yeah, I remmember something like "Send lightbox to administrator"
Well, maybe u should start a new request topic and someone could recover it ;)
Title: Re: [MOD] Lightbox for GUESTs
Post by: abdoh2010 on April 04, 2005, 11:27:54 AM
hay guys

is there a demo for this mod ?
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on April 04, 2005, 12:19:26 PM
i think it works on V@no's Homepage!

 8) VIncent
Title: Re: [MOD] Lightbox for GUESTs
Post by: abdoh2010 on April 04, 2005, 02:43:51 PM
ok i will check it

thank you
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on April 04, 2005, 11:18:15 PM
I Have installed it and i belive it works!
but how can i see my lightbox or Album in german
i think i miss or need buton somewhere

sincerly
vincent
Title: Re: [MOD] Lightbox for GUESTs
Post by: V@no on April 04, 2005, 11:45:25 PM
all none-dafault language images should go into /template/<yourtemplate>/images_<language_name>/ for example for your german language it should be:
template/<yourtemplate>/images_german/
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on April 05, 2005, 07:28:32 AM
Sorry V@no
you missunderstoud my writting!

if i look at your homepage you have on the left side the menu for loging in just below you have a link called Album!
This link is i am missing!

if you look at my page i don't have a login box (i Removed it)

sincerly
vincent
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on April 05, 2005, 08:15:04 AM
second Problem i found

i have two domain name pointing to one homepage
www.foto-kocher.com
www.foto-kocher.biz
if i do a Album (=Lightbox) in .com it ist not showing up in .biz/lightbox.php

how is this to fix?

sincerly
vincent
Title: Re: [MOD] Lightbox for GUESTs
Post by: V@no on April 06, 2005, 02:33:18 AM
if i look at your homepage you have on the left side the menu for loging in just below you have a link called Album!
This link is i am missing!
its in user_logininfo.html template
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on April 06, 2005, 11:23:06 PM
second Problem i found

i have two domain name pointing to one homepage
www.foto-kocher.com
www.foto-kocher.biz
if i do a Album (=Lightbox) in .com it ist not showing up in .biz/lightbox.php

how is this to fix?

sincerly
vincent
Title: Re: [MOD] Lightbox for GUESTs
Post by: V@no on April 06, 2005, 11:53:14 PM
there is nothing u can do about it, u can not have same cookies for two different domains.
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on April 07, 2005, 07:58:30 PM
ok i will have to search for a solution to force one domain to the other!

 :?  :?  :roll:

vincent
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on April 10, 2005, 06:20:05 PM
Hello
i have another Problem with the lightbox - i put some picture in - and a couple of hours later it is empty!
why this happen?

vincent
Title: Re: [MOD] Lightbox for GUESTs
Post by: V@no on April 10, 2005, 07:42:34 PM
that's because for some reason there is no cookies being set on your site...
here are the headers I receive from your site when adding an image to lightbox:
Quote
HTTP/1.1 302 Object Moved
Location: ./templates/4dark/images/lightbox_yes.gif
Server: Microsoft-IIS/5.0
Content-Type: text/html
Content-Length: 164

<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="./templates/4dark/images/lightbox_yes.gif">here</a></body>

and this are the headers from my site:
Quote
HTTP/1.1 302 Found
Date: Sun, 10 Apr 2005 17:29:59 GMT
Server: Apache/2.0.53 (Unix)
Set-Cookie: PHPSESSID=pnabxOCw05f9EyIqnnvlIpkOsL9; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: 4images_lightbox=s%3A0%3A%22%22%3B; expires=Sat, 09 Jul 2005 17:29:59 GMT; path=/
Set-Cookie: 4images_lightbox_lastaction=i%3A1113154199%3B; expires=Sat, 09 Jul 2005 17:29:59 GMT; path=/
Location: ./templates/vano/images/lightbox_no.gif
Content-Length: 0
Connection: close
Content-Type: image/gif

I dont know, maybe its because your server is running on Windows system with IIS webserver? dont know...

P.S. try and see if it works without the "Add/remove images to/from lightbox without page refresh" mod.
Title: Re: [MOD] Lightbox for GUESTs
Post by: Vincent on April 24, 2005, 01:42:50 PM
i removed - but now my page gives a error!
http://www.4homepages.de/forum/index.php?topic=7581.0

vincent
Title: Re: [MOD] Lightbox for GUESTs
Post by: Eagle Eye on July 09, 2005, 08:49:12 PM
this mod should work on v1.7.1 by default.
Do u have in your cookies: 4images_lightbox
?
if u dont, then u probably made a misstake during installation.

yes I have this in the cookies, but still not working   :(

Actually I had removed the user login, register option, (from the template) the entire area which holds the user login, random images, etc (I did this, to make space for wrapping this gallery into mambo) later I added you code and include: <a href="{url_lightbox}">{lang_lightbox}</a>  for the lightbox link

Now I am able to add images to the lightbox, but when I view, it’s empty…. What might have gone wrong? Using 1.7.1

Thanks V@no for the MOD, its really cool feature  :wink:

Paul  :D



Title: Re: [MOD] Lightbox for GUESTs
Post by: V@no on July 09, 2005, 09:01:42 PM
I dont know what u did wrong, I just tested it on a fresh v1.7.1 and it worked just fine.
Can I test yours?
Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: V@no on July 09, 2005, 11:26:59 PM
ok, I've updated the code to v1.2
Now it uses build-in functions to set/read cookies and sessions.

To upgrade, u'll need redo steps: 1.2, 1.3, 1.4, 1.5, 2.1, 4. and 5.
Step 2.1 was changed, so u'll need remove previos code:
Code: [Select]
if ($user_info['user_level'] == GUEST) {
  $cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
  $cookie_lightbox = isset($HTTP_COOKIE_VARS[$cookie_name.'lightbox_lastaction']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'lightbox_lastaction'])) : "";
  $user_info['lightbox_lastaction'] = (isset($session_info['lightbox_lastaction'])) ? $session_info['lightbox_lastaction'] : $cookie_lightbox;
}
Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: Eagle Eye on July 10, 2005, 03:21:05 PM
Yes it works!
Thanks a million :wink:, this MOD is really cool, and useful :idea:

Paul :)
Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: JensF on August 04, 2005, 05:44:52 PM
Hello,

i have installed V1.2 from this Mod.

It works but when i close the Browser and come back the Pics are deleted from the Lightbox.

I have look that i have the cookie 4image_lightbox but i don´t have.

Now i have test V@no´s site and on this all works but i don´t have a cookie from V@no, too!!!

Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: V@no on August 05, 2005, 12:31:19 AM
yeah no cookies being set, I have no clue why it doesnt save it into cookies...only in session.
Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: steveeyes on January 11, 2006, 03:54:38 PM
oops...V@no...I did do the entire step 2.....I wasn't thinking and just read your older response. Again,  I did the entire step 2, but get the error above.

thanks

Title: Re: [MOD] Lightbox for GUESTs
Post by: Eagle Eye on May 15, 2006, 11:48:39 PM
strange, everything works just fine for me...exept download button ;)
to fix that, in lightboxes.php find:
Code: [Select]
 if (!empty($user_info['lightbox_image_ids']) && $user_info['user_level'] != GUEST) {replace with:
Code: [Select]
 if (!empty($user_info['lightbox_image_ids'])) {

I applied this and now the download button is active in lighbox page.. working fine!

i have also applied Jan's mod http://www.4homepages.de/forum/index.php?topic=1861.msg19276#msg19276 for using gallery for documents... so when i press download from the detail page.. it download the document... but if I press download in lighbox page (to download selected items).. it is downloading the images and not the documents in zip file... what should i MOD so that even in the lighbox.php page too my guest can download the selected documents

Thanks :D
Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: m.a on December 22, 2006, 09:08:45 PM
yeah no cookies being set, I have no clue why it doesnt save it into cookies...only in session.
Ist das nicht ein Problem?

Wenn ich nicht eingeloggt bin und einige Bilder als Gast LightBox mache, kommt nicht in meine Lightbox wenn ich gleichzeitig einlogge.
zum Beispiel!
Ich lege ein Paar Bilder als Gast in meine Light Box und dann logge ich mich ein, aber meine ausgewählte Bilder kommen nicht in meine Light Box!

Thanks V@no for the MOD 8)
m.a
Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: chris_wilhelm on October 08, 2009, 09:39:26 AM
hi,
i do all the mods and it works fine, i can select the image with the lightbox-button.
(i've removed the users window from the left and added the lightbox link (<a href="{url_lightbox}">{lang_lightbox}</a>)in the template/details. html)
but when i hit the lightbox link to show the lightbox i get only a blank page with nothing in it, no error message nothing. . .
what can i do?
best,
chris
Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: V@nо on October 08, 2009, 04:09:56 PM
You must have made a mistake while edited lightbox.php

to see the errors in global.php find line with error_reporting
add below:
error_reporting(E_ALL);
@ini_set("display_errors", 1);
Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: wallward on May 10, 2012, 11:18:35 AM
my 4image ver is 1.7.10 and i do not find and replace step 2.2  :roll:
Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: V@no on May 12, 2012, 09:11:58 PM
Added step 2.2b
Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: V@no on May 13, 2012, 09:17:44 AM
Doesn't work how?
Title: Re: [MOD] Lightbox for GUESTs v1.2
Post by: wallward on January 22, 2014, 09:11:45 AM
how to enable download button? (zip file)
please check travelwallpaper.tk