• [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 254414 times)

0 Members and 1 Guest are viewing this topic.

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 #180 on: February 12, 2011, 04:22:40 PM »
You've mixed step 4 and step 4.1. It seems you found the needed string for step 4.1 but inserted code from step 4 instead.
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 #181 on: February 12, 2011, 07:53:13 PM »
No, sir... Before this line:

$user_homepage = (isset($user_row['user_homepage'])) ? format_text(format_url($user_row['user_homepage']), 2) : REPLACE_EMPTY;

I`ve entered:

/*
  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
*/


Then after this line, i`ve insert:

/*
  MOD MULTI-LIGHTBOXES
  START INSERT
*/
//these settings can not be changed by the user, only by administrator from ACP
  
if (isset($HTTP_POST_VARS['user_lightbox'])) unset($HTTP_POST_VARS['user_lightbox']);
  if (isset(
$HTTP_POST_VARS['user_lightbox_private'])) unset($HTTP_POST_VARS['user_lightbox_private']);
  if (isset(
$HTTP_POST_VARS['user_lightbox_count'])) unset($HTTP_POST_VARS['user_lightbox_count']);
/*
  MOD MULTI-LIGHTBOXES
  END INSERT
*/


To my mind it`s correct, but give 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 #182 on: February 12, 2011, 09:43:07 PM »
No, sir... Before this line:

$user_homepage = (isset($user_row['user_homepage'])) ? format_text(format_url($user_row['user_homepage']), 2) : REPLACE_EMPTY;
Really? your code in previous reply speaks otherwise... Check again.
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 #183 on: February 12, 2011, 11:34:02 PM »
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...

V@no, извини пока не нашла времени? чтобы составить полный набор тестов и все проверить, а делать тесты "урывками" не хотелось. Но уже хорошо, что при удалении фото лайтбокс не сбрасывается. Спасибо!

If lightboxes doesn't update when a user deletes a photo, then user will see that in lightbox he has, for example, 5 photo(count for each lightbox), but when he open lightbox he can see, for example, 3 photo. May be will be better if sometimes admin run script and it check all lightboxes for absent photo and delete information about it? Could you create this script (my knowlege of php is not good for this )? I'll check it.
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 MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #184 on: February 13, 2011, 08:34:33 AM »
OK, thanks! Another request:

{if user_lightbox}
        <
tr>
          <
td class="row1"><b>{lang_user_lightbox}</b></td>
          <
td class="row1">{user_lightbox}</td>
        </
tr>
{endif 
user_lightbox}


And

{if user_lightbox_form}{user_lightbox_form}{endif user_lightbox_form}


Nothing to show :(

I tried to change number of ID, in this link on any albums ID: http://localhost:8080/lightbox.htm?user_lightbox=50&l=english

(Albums not privates and allowed to share)

This always show me my account album! :-(

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 #185 on: February 13, 2011, 05:50:13 PM »
Exactly what are you trying to do?
The html code you showed is used to show which lightbox is currently active and to switch to a different lightbox. It doesn't show you the images from lightbox...
Links to other user's shared lightboxes are only available in their profile page.
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 #186 on: February 13, 2011, 08:10:48 PM »
Exactly what are you trying to do?
The html code you showed is used to show which lightbox is currently active and to switch to a different lightbox. It doesn't show you the images from lightbox...
Links to other user's shared lightboxes are only available in their profile page.

Yes, link to user`s lighbox, not shown from his profile... Nothing show. :(

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 #187 on: February 14, 2011, 01:51:22 AM »
If you as admin can't see any links in users profile then re-check Step 4 and 15

Also check your settings in ACP
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 #188 on: February 14, 2011, 06:01:52 AM »
V@no, thanks. It turns i`ve lost a some path of code from my member.php. I found it from original file and corrected. Now work`s fine. Thanks!

IS IT POSSIBLE TO SHOW LIGHBOX HITS??
« Last Edit: February 14, 2011, 09:02:41 AM by MrAndrew »

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #189 on: May 09, 2011, 03:26:25 PM »
Hi,
ein User hätte zu diesem Mod eine Frage

Und zwar, ob es möglich wäre, einen Ordner an einen anderen anhängen könnte (Also Bilder von Ordner A nach Ordner B verschieben)

evtl. hat V@no ja dazu was geschrieben, dann bitte anschubsen ;)

Danke Harald

Edit:
Habe ihr mehr Ordner zugesteckt, Das sollte erledigt sein.
Trotzdem wäre das doch eine nützliche Erweiterung ?
« Last Edit: May 09, 2011, 08:04:51 PM by Jan-Lukas »
Danke Harald




Offline kimchu

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #190 on: August 23, 2011, 08:24:30 AM »
V@no,

Another very useful MOD. Thank-you.

Kim

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #191 on: September 12, 2011, 09:26:58 AM »
Please give me instruction how to do Lightbox Name as required, from manage page? I`ve installed multi-lightboxe mod in my gallery. Please help me.

Thanks!

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Multi-Lightboxes v1.03.1
« Reply #192 on: September 20, 2011, 01:57:27 PM »
Will it right if i will change in step 6.3 ?????

/*
  MOD MULTI-LIGHTBOXES
  START INSERT
*/
function lightbox_trim($name)
{
  
$max 10;
  if (
strlen($name) > $max)
  {
    
$name substr($name0$max)."...";
  }
  return 
$name;
}
function 
fixhtml($text$quotes 1$amp 0)
{
  if (
$amp$text str_replace("&""&amp;"$text);
  if (
$quote$text str_replace("\"""&quot;"$text);
  
$text str_replace("<""&lt;"str_replace(">""&gt;"$text));
  return 
$text;
}
/*
  MOD MULTI-LIGHTBOXES
  END INSERT
*/


This line:
  if ($quote$text str_replace("\"""&quot;"$text);

By this line:
  if ($quotes$text str_replace("\"""&quot;"$text);

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 #193 on: September 21, 2011, 01:50:46 AM »
Yes, thank you. That would be correct. I've updated step 6.3
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: More notices due to db_definitions...
« Reply #194 on: September 21, 2011, 05:14:32 AM »
Help me please, with this problem...

Code: [Select]
Notice: Undefined variable: config in C:\Users\***\Desktop\Server\root\includes\sessions.php on line 367
This is line from sessions:

$limit = ($user_info['user_lightbox_count'] == -|| !$config['lightbox_count'] || $user_info['user_level'] == ADMIN) ? -: (($user_info['user_lightbox_count']) ? $user_info['user_lightbox_count'] : $config['lightbox_count']);

I`ve reviewed installation of the mod, but nothing help!