forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: gismo on June 05, 2005, 10:57:20 am

Title: Private Gallery in UserGallery
Post by: gismo on June 05, 2005, 10:57:20 am
Hi.

I have a little problem.

I have the UserGallery with 3 albums. All are privates.
So when a visitor com to the gallery...he isn't allowed to enter in this UserGallerie Categorie !

And when just an album is private....visitors can enter in the category but this private album is not displayed in !

I just want to display all the albums with the PRIVATE PICS in the thumbnails.

thx foryour help.
Title: Re: Private Gallery in UserGallery
Post by: gismo on June 05, 2005, 12:01:33 pm
...

how I can do, to display a private album in this category ?  :-\\
Title: Re: Private Gallery in UserGallery
Post by: Nibbler on June 05, 2005, 03:54:09 pm
Have you tried the "Show private album Icon to unlogged user" option in config ?
Title: Re: Private Gallery in UserGallery
Post by: gismo on June 05, 2005, 05:03:03 pm
yé yé...I have put on "YES".

But...It's very hard to explain my problem....

Fox example :

In UserGallerie -> My Album -> Folder1
                                        -> Folder 2

If I put Folder 2 on PRIVATE......we can see the PRIVATE ICON.

If I put Folder 1 + Folder 2 on PRIVATE.......we cant' See Nothing ! We are Not allowed to enter in UserGalleries.
Title: Re: Private Gallery in UserGallery
Post by: Joachim Müller on June 05, 2005, 11:57:36 pm
post a link and a screenshot how it looks for allowed users.
Title: Re: Private Gallery in UserGallery
Post by: gismo on June 06, 2005, 02:39:03 pm
OK

HERE (http://foxdelta5.free.fr/index22.html) you have screenshots step by step  ;)

Title: Re: Private Gallery in UserGallery
Post by: Nibbler on June 06, 2005, 09:08:51 pm
Ah, I understand. Look in your index.php for the query:

Code: [Select]
        $sql = "SELECT user_id, " .
               "user_name, " .
               "COUNT(DISTINCT a.aid) as alb_count, " .
               "COUNT(DISTINCT pid) as pic_count, " .
               "MAX(pid) as thumb_pid " .
               "FROM {$CONFIG['TABLE_USERS']} AS u " .
               "INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON category = " . FIRST_USER_CAT . " + user_id " .
               "LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON (p.aid = a.aid AND approved = 'YES') ";
        if ($FORBIDDEN_SET != "") $sql .= "WHERE $FORBIDDEN_SET ";
        $sql .= "GROUP BY user_id " .
                "ORDER BY user_name";

and change it to this:

Code: [Select]
        $sql = "SELECT user_id, " .
               "user_name, " .
               "COUNT(DISTINCT a.aid) as alb_count, " .
               "COUNT(DISTINCT pid) as pic_count, " .
   ($FORBIDDEN_SET ? "IF ($FORBIDDEN_SET, MAX(pid), '0')" : 'MAX(pid)') ." AS thumb_pid " .
               "FROM {$CONFIG['TABLE_USERS']} AS u " .
               "INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON category = " . FIRST_USER_CAT . " + user_id " .
               "LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON (p.aid = a.aid AND approved = 'YES') ";
        $sql .= "GROUP BY user_id " .
                "ORDER BY user_name";
Title: Re: Private Gallery in UserGallery
Post by: gismo on June 06, 2005, 09:24:47 pm
WWhouaa !!!

Thank You Very Much !

SOLVED !

 ;) ;) ;) ;D