4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: JensF on August 13, 2005, 12:25:30 PM

Title: Number of Lightbox Pics in user_logininfo.html
Post by: JensF on August 13, 2005, 12:25:30 PM
Hi,

is there a way to see the Number of Images in Lightbox in the user_loginform.html???

I mean this...

Link -> Lightbox (12 Images)

Title: Re: Number of Lightbox Pics in user_logininfo.html
Post by: Vincent on August 13, 2005, 12:52:55 PM
Yes Mawenzi is having this feature!
 :wink: i would like this tooo!

vincent
Title: Re: Number of Lightbox Pics in user_logininfo.html
Post by: TheOracle on August 13, 2005, 01:29:23 PM
I remember asking this in the old forum. Too bad I didn't backup this one since it worked.
Title: Re: Number of Lightbox Pics in user_logininfo.html
Post by: V@no on August 13, 2005, 02:55:35 PM
in includes/page_header.php find:
Code: [Select]
  "media_url" => MEDIA_PATH,insert below:
Code: [Select]
  "media_url" => MEDIA_PATH,
  "user_lightbox_count" => (trim($user_info['lightbox_image_ids'])) ? count(explode(" ",trim($user_info['lightbox_image_ids']))) : 0,

Then in user_logininfo.html template u can use {user_lightbox_count} tag

If you installed "Lighbox for guests" mod, then in the same file above:
Code: [Select]
//-----------------------------------------------------
//--- Register Global Vars ----------------------------
//-----------------------------------------------------
insert:
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: Re: Number of Lightbox Pics in user_logininfo.html
Post by: JensF on August 13, 2005, 08:47:29 PM
Thanks for this.....
Title: Re: Number of Lightbox Pics in user_logininfo.html
Post by: Vincent on August 13, 2005, 10:16:25 PM
that was to simple -   :wink:
thanks a lot it works fine  :!:

 8) vincent
Title: Re: Number of Lightbox Pics in user_logininfo.html
Post by: V@no on August 14, 2005, 06:08:09 AM
btw, if u installed "Lightbox for guests", u can use that tag in user_loginform.html template too ;)
Title: Re: Number of Lightbox Pics in user_logininfo.html
Post by: urmasmuld on August 15, 2005, 04:57:18 PM
btw, if u installed "Lightbox for guests", u can use that tag in user_loginform.html template too ;)
I have installed Lightbox for guests, but it won't show how many pics I have in Lightbox, it shows always (0), but for members it shows number of pictures in lightbox (12). What may be wrong ?
Title: Re: Number of Lightbox Pics in user_logininfo.html
Post by: V@no on August 16, 2005, 12:55:07 AM
right...I'm talking my words back, it didnt work without extra few lines.
I've updated my orignal post with an extra step ;)
Title: Re: Number of Lightbox Pics in user_logininfo.html
Post by: urmasmuld on August 16, 2005, 10:26:58 AM
thnx V2no, now it works great!
Title: Re: Number of Lightbox Pics in user_logininfo.html
Post by: Toso on November 23, 2005, 12:31:14 PM
Great Mod,

but it shows (3), although there are only (2) pictures ?
Title: Re: Number of Lightbox Pics in user_logininfo.html
Post by: V@no on November 23, 2005, 02:28:55 PM
This code does not check if visitor has permision to vew the image or even if the images still exists, so if one added an image in the lightbox and then later on permission for the category where the image is was changed and the visitor has no long access to it, this code will still count the image...
Title: Re: Number of Lightbox Pics in user_logininfo.html
Post by: Toso on November 23, 2005, 02:34:03 PM
Is it possible to check if the images still exists?