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: Private album icons  (Read 4390 times)

0 Members and 1 Guest are viewing this topic.

NevilleX

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
    • SeGoodies
Private album icons
« on: September 25, 2005, 11:02:22 pm »

Is there a way to exclude category user galleries to show private album icon?
I would like to show private album icon only for albums in main categories, and users private albums to stay invisible.

NevilleX

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
    • SeGoodies
Re: Private album icons
« Reply #1 on: September 26, 2005, 09:28:30 pm »

OK, I guess there is no way to do that.
I have search the forums, and I have found another solution witch suit my needs.
To have all public albums available to "Everybody" for view but only certain albums to be protected:

Code: [Select]
$albums_to_restrict = array(34,23,5,random,lastup);
if (!USER_ID && in_array($_GET['album'], $albums_to_restrict)) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);

Only drawback is that Random and Last updated albums needs to be restricted too, because unregistred users can have access to full images via them. It is bad that all files that showes in this albums are protected, even ones that resides in unprotected albums.

Is this code safe? I would appreciate any suggestions how to improve this further.

Thank you very much!
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 15 queries.