forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: MGSteve on July 18, 2004, 10:12:05 pm

Title: Identifying a picture as belonging to a private album
Post by: MGSteve on July 18, 2004, 10:12:05 pm
Any one have any idea on how I can tell if an picture is from a private album as opposed to a public album, from looking at the data in the database?

I need to do a random pic script to show a pic on the main page of the site and don't want to include private album pics.

Cheers.

Steve.
Title: Re: Identifying a picture as belonging to a private album
Post by: Casper on July 18, 2004, 10:19:28 pm
You can use the rss feeds mod, available here (http://forum.coppermine-gallery.net/index.php?topic=2960.0).

It respects album permissions.
Title: Re: Identifying a picture as belonging to a private album
Post by: MGSteve on July 18, 2004, 10:22:49 pm
Cheers, I just found the answer after searching for a slightly differnt term to the one I originally searched with! ;)

Fundamentally, if you ignore any pictures within albums in categories with an ID over 10000, that would be right, wouldn't it?
Title: Re: Identifying a picture as belonging to a private album
Post by: Casper on July 18, 2004, 10:29:17 pm
No, not exactly.

That means they are in users own galleries, but these may be either private, or open to all, the same as albums in the general categories my be private.

The visibility is set in the album, and can be seen in the albums table of the database, anything other than '0' has restrictions as to who can view.
Title: Re: Identifying a picture as belonging to a private album
Post by: MGSteve on July 18, 2004, 11:02:27 pm
Ah, ok - forgot albums could be private as well as personal.

Thanks for your help :D
Title: Re: Identifying a picture as belonging to a private album
Post by: Tarique Sani on July 19, 2004, 05:10:18 am
The function get_private_album_set is your friend