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: Changing new album premissions to registered by default.  (Read 3995 times)

0 Members and 1 Guest are viewing this topic.

aunrea

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 36
    • Spot Design
Changing new album premissions to registered by default.
« on: January 07, 2007, 06:32:41 pm »

I have searched for the answer to this on the forum for over an hour and can only find people who have solved it but don't say how.

Is there a way to change default permission when an album is created to registerd users only?

I have tried changing the line in delete.php to

Code: [Select]
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, visibility) VALUES ('$category', '".addslashes($op['album_nm'])."', 'NO',  '{$op['album_sort']}', '', '2')";
But that didn't work. I wasn't sure it would because that was a solution to changing it to admin access by default. So how do I do registered by default.
« Last Edit: January 08, 2007, 12:57:34 am by Nibbler »
Logged

Nibbler

  • Guest
Re: Changing new album premissions to registered by default.
« Reply #1 on: January 07, 2007, 10:13:05 pm »

That is the solution.
Logged

aunrea

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 36
    • Spot Design
Re: Changing new album premissions to registered by default.
« Reply #2 on: January 08, 2007, 12:34:20 am »

I checked it again but it wasn't working. Then I realized there were two lines of the code that need to be changed. I thought there was only one. It works now.
Logged

nivar

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Changing new album premissions to registered by default.
« Reply #3 on: January 11, 2007, 03:57:49 am »

im looking for same solution, could you point me on the right direction.
thanks in advace.
Logged

aunrea

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 36
    • Spot Design
Re: Changing new album premissions to registered by default.
« Reply #4 on: January 11, 2007, 07:26:39 pm »

In delete.php you need to find:

Code: [Select]
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description) VALUES ('$category', '".addslashes($op['album_nm'])."', 'NO',  '{$op['album_sort']}', '')";
and replace it with:

Code: [Select]
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, visibility) VALUES ('$category', '".addslashes($op['album_nm'])."', 'NO',  '{$op['album_sort']}', '', '2')";
There are two instances of this. This will changed the default album permissions to registered.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.