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: [Solved]: How to set "me only" as a default album view permission  (Read 3990 times)

0 Members and 1 Guest are viewing this topic.

mfaizalar

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 16

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
« Last Edit: April 03, 2008, 12:30:40 pm by Nibbler »
Logged

mfaizalar

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 16
Re: How to set "me only" as a default album view permission
« Reply #2 on: March 28, 2008, 11:17:52 am »

Thx dude! I'll hv a look n try it out 1st..
Logged

mfaizalar

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 16
Re: How to set "me only" as a default album view permission
« Reply #3 on: April 02, 2008, 05:58:10 am »

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  :)
Logged

Nibbler

  • Guest
Re: How to set "me only" as a default album view permission
« Reply #4 on: April 02, 2008, 10:36:09 am »

The part that makes it 'me only' is commented out.
Logged

mfaizalar

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 16
Re: How to set "me only" as a default album view permission
« Reply #5 on: April 03, 2008, 12:12:32 pm »

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

mfaizalar

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 16
Re: How to set "me only" as a default album view permission
« Reply #6 on: April 03, 2008, 12:20:18 pm »

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

Below is the code added:

Code: [Select]
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
Logged
Pages: [1]   Go Up
 

Page created in 0.013 seconds with 15 queries.