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 do I give guests the permission to upload pics in every album  (Read 4265 times)

0 Members and 1 Guest are viewing this topic.

Icmesa3000

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25

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
« Last Edit: June 24, 2008, 06:02:01 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: How do I give guests the permission to upload pics in every album
« Reply #1 on: June 24, 2008, 02:59:04 pm »

Run a query directly in phpmyadmin.

Code: [Select]
UPDATE cpg_albums SET uploads = 'YES'
Change the prefix as required.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

Icmesa3000

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: How do I give guests the permission to upload pics in every album
« Reply #3 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']}', '')";
Logged

Nibbler

  • Guest
Re: How do I give guests the permission to upload pics in every album
« Reply #4 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.
Logged

Icmesa3000

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: How do I give guests the permission to upload pics in every album
« Reply #5 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]
« Last Edit: June 25, 2008, 09:04:51 am by Joachim Müller »
Logged

Nibbler

  • Guest
Re: How do I give guests the permission to upload pics in every album
« Reply #6 on: June 24, 2008, 05:09:15 pm »

That screenshot doesn't show anything relevent. Click on the SQL tab and paste in

Code: [Select]
UPDATE cpg14x_albums SET uploads = 'YES'
and submit the form.
Logged

Icmesa3000

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: How do I give guests the permission to upload pics in every album
« Reply #7 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!
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 15 queries.