Default Album permission Default Album permission
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Default Album permission

Started by kary, January 13, 2006, 11:05:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kary

Can I set the album default permission to private?

Paver

There isn't a Coppermine setting for that, but you can do so manually.  When you add a new album, Coppermine doesn't set the album permission explicitly, it uses the default setting for that field (which is the 'visibility' field of the 'cpg_albums' table).  So if you set the default value of the 'visibility' field, that will become the default permission for new albums.  phpMyAdmin is the easiest way to do so; if you haven't used this tool already, you should start - it's tremendously useful.  If your webhost doesn't have it installed already, go download it - it's easy to configure and start using.

For the values of the 'visibility' field, the easiest way to figure out which value you want for the default is to set one album to what you want in Coppermine, then look at that value in the database using phpMyAdmin.  Then set the default value of 'visibility' to this value.  As an overview, small numbers refer to group IDs and numbers greater than 10000 refer to user IDs.  '0' of course refers to 'Everybody'.

jarppa

#2
Hmm... how can I do so that every album that users create is automatically private? I think that this can be done, by editing script that creates the album.
I tried to find out the script but no luck. I saw that albmgr.php script has function Album_Create, but I don't understand what that does.

What I'm trying to do is, users are able to upload images to public albums(created by admin) + they will have private albums, but they don't have own public albums.

Any ideas?

I got it... modify delete.php
FIND...

$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos) VALUES ('$category', '" . addslashes($op['album_nm']) . "', 'NO',  '{$op['album_sort']}')"

Change...

$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, visibility) VALUES ('$category', '" . addslashes($op['album_nm']) . "', 'NO',  '{$op['album_sort']}','$category')"