• [MOD] Multi-Lightboxes v1.03.2 (2011-09-20) 4 0 5 1
Currently:  

Author Topic: [MOD] Multi-Lightboxes v1.03.2 (2011-09-20)  (Read 253759 times)

0 Members and 1 Guest are viewing this topic.

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #150 on: August 30, 2010, 05:38:47 PM »
[EDIT] - had a look in the db fields for users. There are three fields for the lightboxes: user_lightbox; user_lightbox_count; user_lightbox_private.   Even though I have the admin cp set for 15 boxes for all users, some of the manually added users have the following settings:

user A (he has three lightboxes)
user_lightbox: 18
user_lightbox_count: 0
user_lightbox_private: 1

user B (he has no lightboxes created)
user_lightbox: 6
user_lightbox_count: 0
user_lightbox_private: 1

user C (he has three lightboxes created)
user_lightbox: 11
user_lightbox_count: 0
user_lightbox_private: 1

user D (he has no lightboxes created)
user_lightbox: 20
user_lightbox_count: 0
user_lightbox_private: 1

All told, 10 users with varying number of a value for the user_lightbox.

Any ideas?

Thanks,

Brian


Hi -

I installed this MOD several months ago and have tested it off and on while I have been installing other MODs and getting our image gallery close to launching.

I am using v1.7.7
I am using mysql 5.1.47
I am using php 5.2.13
current cp Multi Light box setting: 15 boxes

Issues:

Overall problem is that the multiple lightboxes don't stick or hold on to their stashed pics.  At first, everything works great. But over time, as I log in as the admin, as a moderator, as one user, and then another user, the pics in the lightbox for one profile just don't stay.

Let's say User Joex has 3 lightboxes. They are named:

#1 regatta dogs (was the default and is now renamed as such)
#2 sheer blisss (with a space between the words)
#3 maman, j'ai faim (yes just like that)

such that if I click on light box #1 of the user, I see the pics from lightbox #3. Then I click on lightbox #2 and still see the pics from lightbox #3.  

this effect happens as another user clicking on another profile, seeing their user profile and clicking on the link

now I log in as the user with the 3 lightboxes and decide to clear my light box. the one that is selected gets cleared but then I click on Manage my lightboxes and see the three listed, one now empty and two with a summary number of pics to the right, and let's use Vano's example pic, I click on the number to the right of cars that says "1" ... this causes the light box to clear, when it should, I believe, display the current pics in that light box.

So there are two issues, using Vano's example pic in his first posting:

1. If I were to view Vano's user profile and click on Nature, all I would see would be the final light box, whatever123456
2. If I were to log in as Vano and click on clear my light light box, the light box currently selected in the drop down menu would clear but then if I clicked on Lighbox in the user panel which takes me to Manage my Lightboxes, and I clicked on the summary link of pics to the right of the light boxes, all the pics would clear.

The main issue is that somehow the lightboxes lose their function over time. I have tested this over and over.  At first, they work great but as I log in and out as various users and click on their user profile and then click on their shared lightboxes, I can only see the last lightbox in the listing.

Has anyone else experienced this or can some of you test these same conditions by click on your various user profiles and visiting their lightboxes, and also try to clear one lightbox and then go back to manage your lightboxes and click on summary number link and see what happens?

Thanks,

Brian
« Last Edit: August 31, 2010, 11:01:30 AM by surferboy »

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #151 on: October 17, 2010, 11:19:42 AM »
Will be very important and good to addition one little function.

Show on details page, in which albums this photo have been added. If is not difficult, write please code. I think this will be very need not only for me.  :wink:

Would be very grateful if someone could help me!  :!:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #152 on: October 17, 2010, 08:54:28 PM »
Not tested.
In includes/functions.php find:
  if (!check_permission("auth_download"$image_row['cat_id'])) {

Insert above :above::
  $added = array();
  foreach(
$user_info['lightboxes'] as $lb => $info)
  {
    if (
$lb == $user_info['user_lightbox'])
      continue;

    
$user_info['lightbox_image_ids'] = $user_info['lightboxes'][$lb]['image_ids'];
    if (
check_lightbox($image_row['image_id']))
      
$added[] = $lb;

  }
  
$user_info['lightbox_image_ids'] = $user_info['lightboxes'][$user_info['user_lightbox']]['image_ids'];
  
$lightbox_added "";
  if (!empty(
$added))
  {
    foreach(
$added as $lb)
    {
      
$lightbox_added .= ($lightbox_added ", " "") . '<a href="' $site_sess->url(ROOT_PATH."lightbox.php?user_lightbox=" $lb) . '">' $user_info['lightboxes'][$lb]['name'] . '</a>';
    }
  }
  
$site_template->register_vars(array(
    
"lightbox_added" => $lightbox_added,
  ));


In details.html template use something like this:
Code: [Select]
{if lightbox_added}This image is in following lightbox(es): {lightbox_added}{endif lightbox_added}
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)

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #153 on: October 17, 2010, 10:20:06 PM »
V@no thank for help, but result is not showing  Sad

Without {if lightbox_added}{endif lightbox_added} - show only "This image is in following lightbox(es): "

With {if lightbox_added}This image is in following lightbox(es): {lightbox_added}{endif lightbox_added} - nothing showing

 Sad

And else, when i logout, index page give me 11 notices:

Code: [Select]
Notice: Undefined offset: 0 in /home/users2/d/drandrew/domains/skyphotos.ru/includes/functions.php on line 376
Line 376, from your code above:

  $user_info['lightbox_image_ids'] = $user_info['lightboxes'][$user_info['user_lightbox']]['image_ids'];

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #154 on: October 18, 2010, 03:34:34 AM »
How did you test it? It should only show you the name of lightbox when it's different from currently selected lightbox.

As of notice message replace that line with:
  $user_info['lightbox_image_ids'] = @$user_info['lightboxes'][$user_info['user_lightbox']]['image_ids'];
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)

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #155 on: October 18, 2010, 06:04:52 AM »
I`m sorry, i can`t understand how it should work. This will not show to users, names of lightboxes which contain this photo?

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #156 on: October 18, 2010, 06:16:49 AM »
This isn't exactly off topic but I believe V@NO can speak Russian.  As much as i would like to follow your conversation on here, perhaps if you posted your request and misunderstanding in Russian, V@NO could understand what it is you want to achieve.

The signature in the MrAndrew profile is a .ru domain so I conclude this is member is Russian.

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #157 on: October 18, 2010, 06:22:39 AM »
It's not very nice and respectful to write here in Russian, as this forum in English. I could even possibly someone that hurt. English is common, and understand pretty much everything. This is my opinion. :)  I`m not understanding not due to English, i`m not programmer, and it is not so easy for me ;-) But I`m trying! Sorry off

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #158 on: October 18, 2010, 07:49:03 AM »
I`m sorry, i can`t understand how it should work. This will not show to users, names of lightboxes which contain this photo?
Hmmm then perhaps I didn't understand your request then...

What I understood was to show to currently logged in member in which of his lightboxes the the image is currently in.
So it should work this way:
1) make sure there are more then one lightbox created (let's call them lb1, lb2 and lb3)
2) select lb1
3) open details page of image1 and add image to lightbox
4) select lb3
5) open details page of image1, it should now show you that that image is added in lb1
6) add that image in lightbox
7) select lb2
8) open details page of image1, it should show that image is added in lb1 and in lb3

P.S.
English is common, and understand pretty much everything.
That is exactly the reason I prefer use english on this forum, it would benefit more people in general then if answered in russian ;)
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)

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #159 on: October 18, 2010, 08:01:17 AM »
Ok. I will use this. This is good change, but not what i asked.

I want to: when visitor or user see a big size photo, below he/she, may see album names, which have this photo. Something like this:

User photo albums containing this photo: then album names

 It`s possible to do?

 Thanks for your patience  :D

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #160 on: October 18, 2010, 08:36:22 AM »
Other words list of public lightboxes from other users? If so, it would only be possible with a very big hit on server performance and I would not advice for this feature.
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)

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #161 on: October 19, 2010, 12:02:07 PM »
Where is the problem?

This tags nothing show me:

Code: [Select]
{if user_lightbox}
        <tr>
          <td class="row1"><b>{lang_user_lightbox}</b></td>
          <td class="row1">{user_lightbox}</td>
        </tr>
{endif user_lightbox}

In member.php all stay correct

  /*
  MOD MULTI-LIGHTBOXES
  START INSERT
*/
    
$user_lightbox "";
    
$limit = ($user_row['user_lightbox_count'] == -|| !$config['lightbox_count'] || $user_row['user_level'] == ADMIN) ? -: (($user_row['user_lightbox_count']) ? $user_row['user_lightbox_count'] : $config['lightbox_count']);
    if (((
$user_row['user_lightbox_private'] || $user_row['user_level'] == ADMIN) && $config['lightbox_share']) || $user_info['user_level'] == ADMIN)
    {
      
$condition "";
      if (
$limit != -1)
      {
        
$condition " LIMIT ".$limit;
      }
      
$condition;
      
$sql "SELECT lightbox_id, lightbox_name, lightbox_private, lightbox_image_ids
              FROM "
.LIGHTBOXES_TABLE."
              WHERE user_id = "
.$user_row['user_id'].$condition;
      
$result $site_db->query($sql);
      if (
$result)
      {
        while (
$row $site_db->fetch_array($result))
        {
          if (!
$row['lightbox_private'] || $user_info['user_level'] == ADMIN)
          {
            
$user_lightbox .= (($user_lightbox) ? "<br />" "").(($user_info['user_level'] == ADMIN) ? ((!$row['lightbox_private']) ? "+ " "- ") : "")."<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php?lightbox_id=".$row['lightbox_id'])."\">".$row['lightbox_name']." (".((trim($row['lightbox_image_ids'])) ? count(explode(" "trim($row['lightbox_image_ids']))) : 0).")</a>\n";
          }
        }
      }
    }
    
$site_template->register_vars(array(
      
"user_lightbox" => $user_lightbox,
      
"lang_user_lightbox" => $lang['user_lightbox'],
    ));
/*
  MOD MULTI-LIGHTBOXES
  END INSERT
*/

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #162 on: October 19, 2010, 02:14:26 PM »
1) are lightbox shares enabled in the settings?
2) did that user enabled shares of his lightboxes?
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)

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #163 on: October 19, 2010, 02:30:27 PM »
Allow share lightboxes - set yes,
In the user manage albums set - not private

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #164 on: October 26, 2010, 04:55:43 PM »
The issue of the different saved images not "sticking" after a few days continues.

Using v1.7.7
Php version is 5.2.14
MySQL version is 5.1.47

Problem: A user has 4 lightboxes with different images saved to each of the lightboxes. Yet the same 4 images appear in the first three lightboxes when you click on their profile as another user.  The fourth lightbox has three images that were saved recently. Those still show.

Lightbox 1 - Dogs  (when clicked in the user control panel, it shows the 4 images from the Food lightbox)
Lightbox 2 - Scenery (when clicked in user control panel, it shows the 4 images from the Food lightbox)
Lightbox 3 - Food (when clicked in the user control panel, it shows the 4 images from the Food lightbox)
Lightbox 4 - Friends

When does this happen? After about a week or ten days. Perhaps it is timed to the new images setting, which for our gallery is 10 days.

The multi-lightbox works initially, but then all the most recent images seem to occupy the older boxes after a few days or a week.  To drive home this point, if the second and third lightboxes are deleted, Scenery and Food, the first lightbox still shows the Food images.  

Is this a database sorting problem?

Thanks for any ideas you might have.

[edit]

There is another issue - with another user, the first lightbox is marked public but the second lightbox is marked private. Yet even with those settings, the more recent lightbox or the second lightbox, which is marked as private, displays all of its images to the public.

Here are the admin settings for our image gallery for multi-lightboxes:

- number of allowed lightboxes: 15
- allow share of lightboxes: YES

Brian
« Last Edit: October 26, 2010, 07:39:05 PM by surferboy »