Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Trying to hide categories with special name and without viewable albums ...  (Read 2891 times)

0 Members and 1 Guest are viewing this topic.

berlant

  • Coppermine newbie
  • Offline Offline
  • Posts: 2



My Coppermine gallery (http://photos.berlant.fr, v 1.4.10) is managed as described at the end of this post (list of categories and albums).

- in a first part, the free access area, which could be wieved without registration (public area) (not completely fed for the moment)
- in a second part, a restricted access area, which could be accessed only with registration of a private login with dedicated access rights

My problem: I would like that
-   non registred users could not view categories of the private area (which seems to be empty because no albums are viewable by them)
-   registred users could not see categories which only contains albums non viewable by them in the concerned caterory


I know that it is not possible to restrict access to categories or to hide it. But I have searched in the forum and I have read the following post:  http://forum.coppermine-gallery.net/index.php?topic=20047.0

I have tried:
       - the empty categories are not diplayed, then
             -   non registred users could not view categories of the private area
             -   registred users could not see categories which only contains albums non viewable by them in the concerned caterory
       -   but my structuring categories (private / public, year 200x, …) which does not contains any albums and are used only for manage and sort the different topics are not displayed too
=> this solution does not fix my problem

But this post gives me an idea. I would like to add the following control in the code area (<!-- BEGIN catrow_noalb --><!-- END catrow_noalb -->) of the theme.php file:
- if category name contains a specified keyword (“HIDDEN”, for example) then we don’t display this category
- if category name does not contain the specified keyword, so it is displayed like in the default code
=> it will allow me to use a keyword in some special categories, and:
   - structuring categories will still be displayed
   - allowed users will continue to access to the restricted categories, because they are allowed to access to specified albums and “catrow” code part is not modified
   - but unallowed users won’t see them, due to the modification of “catrow_noalb” code part

At your mind, how to add this control? Because it seems to me that the specified part of code is in HTML, and I don’t know exactly how to insert PHP code in the area (I’m not beginner but I don’t use it since a lot of time). Could somebody help me to start this?

Do you have any other idea which could solve my “problem”?
I hope:
- to be on the right topic list; if not move my request to other one.
- that you have understand my problem (sorry for my english) ... If necessary, I could try to explain it better


Thxs by advance for your help
Best Regards
JP BERLANT

_________________________________________________________________________

Zone publique

    La sélection des plus belles photos
      Voyages
         Afrique
            Maroc
               Marrakech
                  album 1
         Amérique du Nord
         Amérique du Sud
         Asie
         Europe
      Paysages marins
      Noir & Blanc
      Fleurs
      Couchers de soleil
           En baie de Somme

Zone privée
   Famille
      Année 2007
         album 1
         album 2
         album ...
      Année 2006
         album ...
      Année 2005
         album ...
      Année 2004
         album ...
      Année 2003
         album ...
      Année 2002
         album ...
      Année 2001
         album ...
      Année 2000
         album ...
   Mariage de Sophie et JP
      20051029 - Samedi 29 octobre 2005 à Chauny
         album ...
      20051105 - Samedi 05 novembre 2005 à Paris
         album ...
      BestOf
         album ...
   Professionnel
      NEXANS
         album ...
      BNPPAM
         album ...
      AXA-IM
         album ...
   Soirées et Fêtes
      Soirées et Fêtes avec les Sciences Reims
         Année 2007
            album ...
         Année 2006
            album ...
         Année 2005
            album ...
         Année 2004
            album ...
         Année 2003
            album ...
         Année 2002
            album ...
         Année 2001
            album ...
         Année 2000
            album ...
      Soirées et Fêtes avec les Pharma Reims
         Année 2007
            album ...
         Année 2006
            album ...
         Année 2005
            album ...
         Année 2004
            album ...
         Année 2003
            album ...
         Année 2002
            album ...
         Année 2001
            album ...
         Année 2000
            album ...
      Soirées et Fêtes avec les EFREIens
         Année 2007
            album ...
         Année 2006
            album ...
         Année 2005
            album ...
         Année 2004
            album ...
         Année 2003
            album ...
         Année 2002
            album ...
         Année 2001
            album ...
         Année 2000
            album ...
      Soirées et Fêtes avec les autres amis
         Année 2007
            album ...
         Année 2006
            album ...
         Année 2005
            album ...
         Année 2004
            album ...
         Année 2003
            album ...
         Année 2002
            album ...
         Année 2001
            album ...
         Année 2000
            album ...
   Voyages
      Voyage en Crête
            album ...
      Voyage à l'ile Maurice
            album ...
      Voyage en Ecosse
            album ...
      Voyage en Indonésie
            album ...
      Voyage en Grêce
            album ...
      Voyage en Sicile
            album ...
   Week-ends et Vacances
      Année 2007
            album ...
      Année 2006
            album ...
      Année 2005
            album ...
      Année 2004
            album ...
      Année 2003
            album ...
      Année 2002
            album ...
      Année 2001
            album ...
      Année 2000
            album ...
   
Logged

berlant

  • Coppermine newbie
  • Offline Offline
  • Posts: 2


Hello

Nobody has an idea on how to solve my problem ? please help me if possible ...

Maybe i'm not on the right topic ?


Rgds,
JP
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.