Private album icons Private album icons
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Private album icons

Started by NevilleX, September 25, 2005, 11:02:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NevilleX

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

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:


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