set ablum DEFAULT to "Visitors can upload files"=yes? set ablum DEFAULT to "Visitors can upload files"=yes?
 

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]

Main Menu

set ablum DEFAULT to "Visitors can upload files"=yes?

Started by bpops, September 21, 2005, 05:58:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bpops

Hello, I am really enjoying setting up my coppermine gallery, and was wondering if there was a way to set the album to allow visitors to upload files by default?
I plan on having a large gallery I want all my members to be able to upload to, and I don't want to spend the time setting each album individually.
Thanks for the help.

And Thanks to the dev team for this great product!

Bpops

Abbas Ali

If you know how to use phpMyAdmin, then this would be very easy.

Open your database in phpMyAdmin and run following query

Quote
ALTER TABLE `cpgPrefix_albums` CHANGE `uploads` `uploads` ENUM( 'YES', 'NO' ) DEFAULT 'YES' NOT NULL

Replace cpgPrefix with table prefix you used for coppermine.

Note : This will affect only the new albums which you create from now onwards.
Chief Geek at Ranium Systems

bpops


bpops

hmm.. okay I used phpmyadmin and ran the code with myprefix. I checked the table strucutre and it did work. the default value is now set to YES.
although when I make a new table, it still is NO. I suppose the php in the gallery sets it to NO. so do you (or anyone else) know where in the code this is set? I'd like to change it

Abbas Ali

Edit delete.php

Find and REPLACE (somewhere around line 253)


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


with


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

Chief Geek at Ranium Systems

bpops

Thanks again, I'll do this as soon as I get home.
You can mark this as solved as I'm sure it will work now!