coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: Icmesa3000 on June 24, 2008, 02:41:42 PM

Title: [Solved]: How do I give guests the permission to upload pics in every album
Post by: Icmesa3000 on June 24, 2008, 02:41:42 PM
Hello,

I have about 3000 albums  . How can I set the permission at one step to "Visitors can upload files" for all albums. If I click at every album "yes" it will take a very, very, very long time!

Thank you very much
Title: Re: How do I give guests the permission to upload pics in every album
Post by: Nibbler on June 24, 2008, 02:59:04 PM
Run a query directly in phpmyadmin.

UPDATE cpg_albums SET uploads = 'YES'

Change the prefix as required.
Title: Re: How do I give guests the permission to upload pics in every album
Post by: Joachim Müller on June 24, 2008, 03:00:05 PM
http://forum.coppermine-gallery.net/index.php/topic,43322.0.html
Title: Re: How do I give guests the permission to upload pics in every album
Post by: Icmesa3000 on June 24, 2008, 03:53:26 PM
Thank you, but it won't work  :-[

I have changed:


cpg14x_albums

ALTER TABLE `cpg14x_albums` CHANGE `uploads` `uploads` ENUM( 'YES', 'NO' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'YES'

delete.php

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

and

$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, visibility) VALUES ('$category', '".addslashes($op['album_nm'])."', 'YES',  '{$op['album_sort']}', '', " . (FIRST_USER_CAT + USER_ID) . ")";
               } else {
               $query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description) VALUES ('$category', '".addslashes($op['album_nm'])."', 'Yes',  '{$op['album_sort']}', '')";
Title: Re: How do I give guests the permission to upload pics in every album
Post by: Nibbler on June 24, 2008, 04:14:44 PM
That sets the default for new albums to 'YES'. What you asked for was to mass change existing files so use the UPDATE query I posted.
Title: Re: How do I give guests the permission to upload pics in every album
Post by: Icmesa3000 on June 24, 2008, 05:03:37 PM
Yes I did that, but it won't work  :'(

http://img413.imageshack.us/img413/2076/image1cw4.jpg [Edit GauGau] Replaced hotlinked image with attachment [/Edit]
Title: Re: How do I give guests the permission to upload pics in every album
Post by: Nibbler on June 24, 2008, 05:09:15 PM
That screenshot doesn't show anything relevent. Click on the SQL tab and paste in

UPDATE cpg14x_albums SET uploads = 'YES'

and submit the form.
Title: Re: How do I give guests the permission to upload pics in every album
Post by: Icmesa3000 on June 24, 2008, 05:18:35 PM
Ah okay, I'm an absolut beginner with phpMyAdmin  ;) ;D Now It works! Thank you so much!