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
-
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.
-
...
how I can do, to display a private album in this category ? :-\\
-
Have you tried the "Show private album Icon to unlogged user" option in config ?
-
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.
-
post a link and a screenshot how it looks for allowed users.
-
OK
HERE (http://foxdelta5.free.fr/index22.html) you have screenshots step by step ;)
-
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";
-
WWhouaa !!!
Thank You Very Much !
SOLVED !
;) ;) ;) ;D