Hiding empty albums (lil bit of help needed) Hiding empty albums (lil bit of help needed)
 

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]

Main Menu

Hiding empty albums (lil bit of help needed)

Started by plastikaa, February 16, 2005, 09:12:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

plastikaa

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,

Aditya Mooley

Open index.php

Add

if ($count == 0) {
  continue;
}


After


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.
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

plastikaa