[Solved]: How do I give guests the permission to upload pics in every album [Solved]: How do I give guests the permission to upload pics in every album
 

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

[Solved]: How do I give guests the permission to upload pics in every album

Started by Icmesa3000, June 24, 2008, 02:41:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Icmesa3000

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

Nibbler

Run a query directly in phpmyadmin.

UPDATE cpg_albums SET uploads = 'YES'

Change the prefix as required.


Icmesa3000

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']}', '')";

Nibbler

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.

Icmesa3000

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]

Nibbler

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.

Icmesa3000

Ah okay, I'm an absolut beginner with phpMyAdmin  ;) ;D Now It works! Thank you so much!