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: set ablum DEFAULT to "Visitors can upload files"=yes?  (Read 3515 times)

0 Members and 1 Guest are viewing this topic.

bpops

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
set ablum DEFAULT to "Visitors can upload files"=yes?
« on: September 21, 2005, 05:58:38 am »

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
« Last Edit: September 22, 2005, 04:07:42 pm by GauGau »
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: set ablum DEFAULT to "Visitors can upload files"=yes?
« Reply #1 on: September 21, 2005, 07:59:42 am »

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.
Logged
Chief Geek at Ranium Systems

bpops

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: set ablum DEFAULT to "Visitors can upload files"=yes?
« Reply #2 on: September 22, 2005, 04:44:27 am »

thanks so much!
I'll do this now
Logged

bpops

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: set ablum DEFAULT to "Visitors can upload files"=yes?
« Reply #3 on: September 22, 2005, 04:53:05 am »

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
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: set ablum DEFAULT to "Visitors can upload files"=yes?
« Reply #4 on: September 22, 2005, 07:43:05 am »

Edit delete.php

Find and REPLACE (somewhere around line 253)

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

with

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

Logged
Chief Geek at Ranium Systems

bpops

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: set ablum DEFAULT to "Visitors can upload files"=yes?
« Reply #5 on: September 22, 2005, 03:56:13 pm »

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!
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 19 queries.