forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: plastikaa on February 16, 2005, 09:12:23 pm

Title: Hiding empty albums (lil bit of help needed)
Post by: plastikaa 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,
Title: Re: Hiding empty albums (lil bit of help needed)
Post by: Aditya Mooley 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.
Title: Re: Hiding empty albums (lil bit of help needed)
Post by: plastikaa on February 18, 2005, 11:48:02 am
Thanks works great :D