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

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

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