Need help for hiding empty categories Need help for hiding empty categories
 

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

Need help for hiding empty categories

Started by cccc, July 29, 2005, 11:52:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cccc

I would like to include my albums in categories
(ex. category = cat1 including albums=2001, 2003, 2004...)  and display on the homepage only the categories.
Problem : when the albums are restricted to some users, they should not appear on the homepage for unregistered users. But categories don't have this user filter and they are always displayed. For an unregistered user, If a category contains only restricted albums, it should not be displayed. At the moment, they are but are empty (no albums and pictures inside as shown on the attached picture for cat1 to cat3).

I think a test like (if in the category, albums count=0 for the current user, then dont disyplay it) sould be added in index.php.
Could someone look at it and give me his opinion ?

Thanks.




Joachim Müller

As you posted this on the paid support board, you should post your budget as well. Review the sticky thread on this sub-board for suggestions on how to post here.

cccc

OK, sorry I haven't read the sub-board rules.

My budget is $15 (paypal).

cccc

Found !

In theme.php I deleted the code in the section

<!-- BEGIN catrow_noalb -->
<!-- END catrow_noalb -->

and seems to work.

Joachim Müller

although I doubt that this is the actual solution, I will mark this thread as "closed" if it works for you