Private Gallery in UserGallery Private Gallery in UserGallery
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Private Gallery in UserGallery

Started by gismo, June 05, 2005, 10:57:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gismo

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.

gismo

...

how I can do, to display a private album in this category ?  :-\\

Nibbler

Have you tried the "Show private album Icon to unlogged user" option in config ?

gismo

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.

Joachim Müller

post a link and a screenshot how it looks for allowed users.

gismo

OK

HERE you have screenshots step by step  ;)


Nibbler

Ah, I understand. Look in your index.php for the query:

        $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:

        $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";

gismo

WWhouaa !!!

Thank You Very Much !

SOLVED !

;) ;) ;) ;D