[Solved]: How to set "me only" as a default album view permission [Solved]: How to set "me only" as a default album view permission
 

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

[Solved]: How to set "me only" as a default album view permission

Started by mfaizalar, March 27, 2008, 12:49:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mfaizalar

Hi,

I'm looking for a way to make the album viewable by the owner and admin only at the very first it was created. Meaning that the default permission for "Album can be viewed by" column is "me only". At the moment, I could see that the default value is "everybody (public album)". Pls let me where and how to make the changes.

Appreciate if any expertise out there can help me on this. I'm no coder but can try to understand the instruction ;D


mfaizalar


mfaizalar

Hi Nibbler,
I've tried out based on suggestion from the link given. But still the first album permission is set to "public album". I want "me only". Where did I go wrong? Attached is my delete.php file. Hope you don't mind to scrutinize it very fast  :)

Nibbler


mfaizalar

I have removed the comments but still not working as what I am expecting. Appreciate if you can show how's the right way to do it. Thx!

mfaizalar

Oppss.. I guess I got it already!! Hooraayyy!!!!

Below is the code added:


if (GALLERY_ADMIN_MODE){           
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description) VALUES ('$category', '".addslashes($op['album_nm'])."', 'NO',  '{$op['album_sort']}', '')";   
} else {
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, visibility) VALUES ('$category', '".addslashes($op['album_nm'])."', 'NO',  '{$op['album_sort']}', '', " . (FIRST_USER_CAT + USER_ID) . ")";
}
cpg_db_query($query);


Thx Nibbler  ;D