• [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 253735 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 #165 on: October 30, 2010, 10:43:42 AM »
Okay, to follow up on the disappearing lightboxes - I set up three lightboxes exactly 6 days ago as a test case to see how long this problem took.

initial set up
Box A - had 5 dog pics
Box B - had 4 food pics
Box C - had 3 friend pics

Now:

Box A - has 3 friend pics from Box C; all 5 dog pics are gone
Box B - has 3 friend pics from Box C; all 4 food pics are gone
Box C - has 3 friend pics

What a mystery!

Thanks for any ideas or thoughts.

Brian

[edit]

Have spent hours today trying to compare db fields to see if I can find any commanility; nothing to report. 

Has anyone else used this mutli-light box, as in saved images to several boxes, and then revisited the boxes later?  I wonder if this phenomenon is common to every install and no one has actually seen it happening...
« Last Edit: October 31, 2010, 02:38:19 AM by surferboy »

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #166 on: November 12, 2010, 05:42:52 AM »
No word from any folks if they have actually tested this MOD after it has been installed and multi-lightboxes have been saved for a week or two.

The bottom line: the installation and initial operation with the MOD in place work fine but I have to now declare this MOD does NOT work with V1.7.7 after a few weeks of installation and the multi-lightboxes that have saved images are older than  7 - 10 days.

Previous posts detail exact problem.

Such a bummer. This appeared to be a great and useful MOD for members.

Offline Sun

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #167 on: November 17, 2010, 01:04:18 PM »
Thanks for any ideas or thoughts.

Look my post #144
If you delete image which was in lightbox, then you will have this error.
I don't know how to fix it. And i don't know how people can use this mode (they don't delete any photo?!)
Tatyana.
I use 4images v.1.7.6
You can answer me in English and Russian languages.
Sorry, my English is not very good.

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 #168 on: November 17, 2010, 03:23:29 PM »
Error with deleting photo and refresh ligthbox(for deleting i use [MOD] Batch Copy/Move/Edit Images).

For example, one user have two ligthbox.

Example 1:
lightbox_image_ids :
1 ligthbox: 62 61
2 ligthbox: 62 61 47 1 38

If i delete foto 61, i see:
1 ligthbox: 62 47 1 38
2 ligthbox: 62 47 1 38

Example 2:
1 ligthbox: 62 1 38 60 33 34
2 ligthbox: 55 12

If i delete foto 38, i see:
1 ligthbox: 55 12
2 ligthbox: 55 12

Could somebody fix this?
If you need another tests - i can do it.
Can you confirm if this happens when user himself deletes a photo or admin deletes it via ACP? (if via ACP, do you use default images.php or modified version?)

(asking this, because I don't have the mod installed :oops:)
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 surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #169 on: November 17, 2010, 05:55:18 PM »
Hi -

Thanks for posting. I had not seen your post. What I experience is identical but I have not deleted any images, either as an admin or as a user.

I am happy to have the MOD author log in to our website and try this out as our test user, who has no admin privileges.  Just log in, create 2, 3, or 4 lightboxes, and save a few images. Then let it sit for 7 days and log back in. You'll see that all the images of the most recently created lightbox have populated all the lightboxes.

Thank you.

Brian

[edit]

attached is my images.php file; it appears to be the default, created for v.1.7.6 - I had not seen this file and it is a big one. In scanning the code, I wonder if some of the presets in the code might be causing this problem. I don't have a 'big' folder root address specified, for one thing
« Last Edit: November 17, 2010, 06:08:03 PM by surferboy »

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 #170 on: November 17, 2010, 06:12:32 PM »
I now can see where the problem could be when deleting images from ACP. Will try fix it sometimes this week.
The images.php you've attached is little outdated version of [MOD] Batch Copy/Move/Edit Images v4.15.1 (2010-08-14)
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 Sun

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #171 on: November 17, 2010, 11:12:37 PM »
Can you confirm if this happens when user himself deletes a photo or admin deletes it via ACP? (if via ACP, do you use default images.php or modified version?)
My happen when admin delete photo via ACP.

Now example when user himself deletes a photo:
1 ligthbox: 1399 1394 1393
2 ligthbox: 1399 1396
I delete photo 1399. Photo was deleted, but ligthbox hasn't any changes. It's new error.

My images.php(attach) has this mod: Batch Copy/Move/Edit Images; Multi-Language support for any text.
Tatyana.
I use 4images v.1.7.6
You can answer me in English and Russian languages.
Sorry, my English is not very good.

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 #172 on: November 22, 2010, 05:27:47 AM »
The problem with lightboxes being overwritten is fixed in v1.03.1: added steps 18 and 18.1
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 Sun

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #173 on: November 22, 2010, 10:14:30 PM »
Now lightboxses are not change:
1 ligthbox: 1394 1393 1400
2 ligthbox: 1396 1397
I delete photo 1400 by user. Photo was deleted(i didn't see it in gl_images), but ligthbox hasn't any changes.
I delete photo 1396 by admin(ACP). Photo was deleted, but ligthbox hasn't any changes.
Tatyana.
I use 4images v.1.7.6
You can answer me in English and Russian languages.
Sorry, my English is not very good.

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #174 on: November 27, 2010, 03:02:20 AM »
Hi -

Thanks for the fix V@no. I appreciate your putting in the time to try to solve the problem.

I have logged in as 3 users: 1 @ ACP and 2 @ regular members. I have saved images to several lightboxes and deleted one. Everything seems to be working so far.

As I mentioned in my earlier posts on this page, I am letting the lightboxes "bake" for wont of a better word, to see if the images will remain in their respective lightboxes over a one week period, which for me was the critical time when images from the newer lightboxes began to slip into the older lightboxes.

Thanks again. Will update again on Monday, 29 Nov.

Brian

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 #175 on: November 27, 2010, 06:17:23 AM »
Now lightboxses are not change:
1 ligthbox: 1394 1393 1400
2 ligthbox: 1396 1397
I delete photo 1400 by user. Photo was deleted(i didn't see it in gl_images), but ligthbox hasn't any changes.
I delete photo 1396 by admin(ACP). Photo was deleted, but ligthbox hasn't any changes.
4images doesn't update lightboxes when a user deletes a photo (the way lightboxes store image ids it would require scan every single lightbox, that would be very inefficient).
As of ACP, in my tests lightboxes were updated just fine, though I tested only with one user...
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 surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #176 on: December 03, 2010, 02:26:11 AM »
Hi -

Sorry for the late reply on my promised update of 29 Nov.

V@no's fix seems to have worked. After more than 10 days, the images have stayed in the various lightboxes.

Thank you very much for taking the time to correct this issue.  I really appreciate it.

Brian

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #177 on: February 11, 2011, 07:08:19 PM »
When i save my profile info, it give me this error:

DB ErrorBad SQL QuerySELECT lightbox_idlightbox_namelightbox_privatelightbox_image_ids FROM 5images_lightboxes WHERE user_id LIMIT 5
You have an error in your SQL syntax
check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 5' at line 3


How to know, what file consist error?

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 #178 on: February 11, 2011, 08:46:34 PM »
The error comes from step 4. Post what you have in your member.php with 100 lines above the new code.
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 #179 on: February 12, 2011, 09:46:23 AM »
This is my code, from step 4, and 100 lines above it!

      $msg $lang['invalid_email'];
    }
  }

  
$action "lostpassword";
}

if (
$action == "lostpassword") {
  
$txt_clickstream $lang['lost_password'];
  
$user_email = (isset($HTTP_POST_VARS['user_email'])) ? format_text(stripslashes($HTTP_POST_VARS['user_email']), 2) : "";
  
$site_template->register_vars(array(
    
"lang_email" => $lang['email'],
    
"lang_lost_password" => $lang['lost_password'],
    
"lang_lost_password_msg" => $lang['lost_password_msg'],
    
"lang_submit" => $lang['submit'],
    
"user_email" => $user_email,
  ));
  
$content $site_template->parse_template("member_lostpassword");
}

//-----------------------------------------------------
//--- Edit Profile ------------------------------------
//-----------------------------------------------------
$update_process 0;
$new_email_msg "";
//-----------------------------------------------------
//--- Show uploaded images from edit profile ----------
//-----------------------------------------------------
if ($action == "show_uploaded_images") {
        
$sql1 "

SELECT i.image_id, i.image_name, i.image_thumb_file, i.image_media_file, i.cat_id" 
get_user_table_field(", u.""user_name") . "
FROM (" 
IMAGES_TABLE " i, " CATEGORIES_TABLE " c)
LEFT JOIN " 
USERS_TABLE " u ON (" get_user_table_field("u.""user_id") . " = i.user_id)
WHERE i.image_active = 1 AND i.cat_id = c.cat_id AND " 
get_user_table_field("u.""user_id") . " = i.user_id AND i.user_id = " $user_info['user_id'] . " AND (i.cat_id NOT IN (".get_auth_cat_sql("auth_viewimage""NOTIN").", ".get_auth_cat_sql("auth_viewcat""NOTIN")."))
ORDER BY i.image_date DESC

"
;

$result $site_db->query($sql1);
$num_rows $site_db->get_numrows($result);

if (!
$num_rows)  {
  
$uploaded_images_from_edit_profile "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  
$uploaded_images_from_edit_profile .= $lang['no_new_images'];
  
$uploaded_images_from_edit_profile .= "</td></tr></table>";
}
else  {
  
$uploaded_images_from_edit_profile "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  
$count 0;
  
$bgcounter 0;
  while (
$uploaded_images_from_edit_profile_row $site_db->fetch_array($result)) {
      
$user_name format_text(trim(ucfirst($uploaded_images_from_edit_profile_row[$user_table_fields['user_name']]), 2));
      
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
$uploaded_images_from_edit_profile .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$uploaded_images_from_edit_profile .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    
show_image($uploaded_images_from_edit_profile_row);
    
$uploaded_images_from_edit_profile .= $site_template->parse_template("thumbnail_bit");
    
$uploaded_images_from_edit_profile .= "\n</td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$uploaded_images_from_edit_profile .= "</tr>\n";
      
$count 0;
    }
  } 
// end while

  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover >= 1) {
      for (
$f 0$f $leftover$f++) {
        
$uploaded_images_from_edit_profile .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      
$uploaded_images_from_edit_profile .= "</tr>\n";
    }
  }
  
$uploaded_images_from_edit_profile .= "</table>\n";
// end else


$site_template->register_vars("lang_uploaded_images_from_edit_profile"$lang['uploaded_images_from_edit_profile']);
$site_template->register_vars("uploaded_images_from_edit_profile"$uploaded_images_from_edit_profile);
$site_template->register_vars("lang_uploaded_images_go_back"$lang['uploaded_images_go_back']);
$content $site_template->parse_template("member_editprofile");
$txt_clickstream $lang['show_uploaded_images'];

unset(
$uploaded_images_from_edit_profile);
}
if (
$action == "updateprofile") {
  
$txt_clickstream $lang['control_panel'];
  if (
$user_info['user_level'] == GUEST) {
    
show_error_page($lang['no_permission']);
    exit;
  }
  
$user_email = (isset($HTTP_POST_VARS['user_email'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['user_email'])) : "";
  
$user_email2 = (isset($HTTP_POST_VARS['user_email2'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['user_email2'])) : "";
/*
  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
*/


Thanks for help!