Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Hiding empty albums (lil bit of help needed)  (Read 3628 times)

0 Members and 1 Guest are viewing this topic.

plastikaa

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Hiding empty albums (lil bit of help needed)
« on: February 16, 2005, 09:12:23 pm »

Yeah... me again with one more problem (should be my last) ... anyway Im guessing its pretty easy to you php coders to be able to hide empty albums. I'm also assuming somewhere in thumbnails.php you can construct an 'if' statement so if no images are in an album that album isnt shown. Can someone tell me exactly what I need to add, I know it wouldnt be much code but I dont have the knowledge to do it myself.

Thanks again,
« Last Edit: February 18, 2005, 05:08:56 pm by GauGau »
Logged

Aditya Mooley

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 781
    • My Sweet Home
Re: Hiding empty albums (lil bit of help needed)
« Reply #1 on: February 18, 2005, 07:49:52 am »

Open index.php

Add
Code: [Select]
if ($count == 0) {
  continue;
}

After

Code: [Select]
if (isset($cross_ref[$aid])) {
            $alb_stat = $cross_ref[$aid];
            $count = $alb_stat['pic_count'];
        } else {
            $alb_stat = array();
            $count = 0;
        }

Take a backup of your original file before making any changes.
Logged
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

plastikaa

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Hiding empty albums (lil bit of help needed)
« Reply #2 on: February 18, 2005, 11:48:02 am »

Thanks works great :D
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.