coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: cccc on July 21, 2005, 03:43:52 PM

Title: Is it possible to restrict access of categories ?
Post by: cccc on July 21, 2005, 03:43:52 PM
I restricted the access of some albums (in the config panel "can be viewed by") to the desired users. Then I grouped all those albums in a category.
On my home page I display "catlist/alblist...".
When I access to the home page (non logged), the restricted albums are hidden but the categories are still visible, empty but visible.
Is there a way to hide empty or "hidden" categories?
Title: Re: Is it possible to restrict access of categories ?
Post by: Joachim Müller on July 22, 2005, 04:54:59 AM
without code modifications: no
Title: Re: Is it possible to restrict access of categories ?
Post by: cccc on July 22, 2005, 12:10:46 PM
I supose I should add a criteria in the "function get_cat_list(&$breadcrumb, &$cat_data, &$statistics)" in index.php that checks if the number of albums selected for the current user is 0.
But I need some help for the code.
Title: Re: Is it possible to restrict access of categories ?
Post by: cccc on August 02, 2005, 11:15:40 AM
Found !

In theme.php I deleted the code in the section

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

and seems to work.
Title: Re: Is it possible to restrict access of categories ?
Post by: Joachim Müller on August 02, 2005, 04:00:19 PM
see my reply to the other identical thread (http://forum.coppermine-gallery.net/index.php?topic=20239.0) you started: I don't think that this solution will actually work. Next time you want to hire someone for a task you already started a thread for, just reply to your existing thread accordingly and a moderator will move your thread to the freelancer sub-board - there's no point in cross-posting nor double-posting.