Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Identifying a picture as belonging to a private album  (Read 4208 times)

0 Members and 1 Guest are viewing this topic.

MGSteve

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Identifying a picture as belonging to a private album
« 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.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Identifying a picture as belonging to a private album
« Reply #1 on: July 18, 2004, 10:19:28 pm »

You can use the rss feeds mod, available here.

It respects album permissions.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

MGSteve

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Identifying a picture as belonging to a private album
« Reply #2 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?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Identifying a picture as belonging to a private album
« Reply #3 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.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

MGSteve

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Identifying a picture as belonging to a private album
« Reply #4 on: July 18, 2004, 11:02:27 pm »

Ah, ok - forgot albums could be private as well as personal.

Thanks for your help :D
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Identifying a picture as belonging to a private album
« Reply #5 on: July 19, 2004, 05:10:18 am »

The function get_private_album_set is your friend
Logged
SANIsoft PHP applications for E Biz
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.