I'm making a gallery with quite a lot of categories and lots of albums under each category. The thing is when an album is created inside a category, the default options is set to 'no' for "Visitors can upload files ".
I know you can edit the properties of an album and change it.
But it's not really easy work to change the settings for each new album created. Is there a way to mass edit the album properties of all the albums or change the default settings of newly created albums to allow visitors to upload files?
I searched for an answer but couldn't find one. Just spent around an hour reading stuff here but no luck. Help would be appreciated.
Both things are possible. Changing the default permissions is already posted - search the board.
To mass change existing albums, run an SQL query:
UPDATE cpg_albums SET uploads = 'YES'
Just searched again. Still couldn't find how to change the default settings. Could you tell how to do it? :-\
I need to change the default, so i don't have to do the database modification each time
by the way it's:
UPDATE cpg1410_albums SET uploads = 'YES'
the tables are prefixed with the version number i think with the default install
Figured out how to do it somehow:
file to edit:
root/cpg/delete.php
-----------------------------------------------------------------------
original code:
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description) VALUES ('$category', '" . addslashes($op['album_nm']) . "', 'NO', '{$op['album_sort']}', '')";
------------------------------------------------------------------------
edited code:
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description) VALUES ('$category', '" . addslashes($op['album_nm']) . "', 'YES', '{$op['album_sort']}', '')";
========================================================
This does the trick. And the SQL query Nibbler mentioned works for updating the already existing albums.
A question though. Is it how this is supposed to be done? ;D I don't know coz I figured this on my own. :P
That is correct. See http://forum.coppermine-gallery.net/index.php?topic=31034.0
problem solved. feel free to lock down the topic 8)