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] 2   Go Down

Author Topic: About new albums  (Read 8372 times)

0 Members and 1 Guest are viewing this topic.

vesodimov

  • Coppermine novice
  • *
  • Country: bg
  • Offline Offline
  • Posts: 34
About new albums
« on: October 24, 2012, 02:30:27 pm »

Hi.
When i upload a pictures everithing is going to folder 10001. How make every upload in diferent album ? Today i upload pictures of my birthday. All is in folder 1001. I watn coppermine make a diferent album for this. How ?
Regards
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: About new albums
« Reply #1 on: October 25, 2012, 11:24:07 am »

Please don't mix the terms "album" and "folder". Albums will be created with the album manager (with the help of your web browser). Folders will be created in the file system, usually via FTP or automatically by Coppermine.

I guess you want Coppermine to create sub-folders on file system level for each album, right? If so, there's a hidden config option upload_create_album_directory. You have to manually set the value to one in your database's config table, using a tool like PHPMyAdmin.
Logged

vesodimov

  • Coppermine novice
  • *
  • Country: bg
  • Offline Offline
  • Posts: 34
Re: About new albums
« Reply #2 on: October 25, 2012, 01:08:04 pm »

Hi.
Thank you for answer. Yes, I want when I make a album with album manager Coppermine to create sub-folders on file system level for each album. But your explanations are too complexed to me. If you have a time please tell me when and how manually set the value to one in my database's config table.
Regards
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: About new albums
« Reply #3 on: October 25, 2012, 02:16:37 pm »

Open your Coppermine database with PHPMyAdmin (or your favorite tool), and you'll see a couple of tables. Now just find the row with the name upload_create_album_directory and change its value to '1' in the config table.
Logged

vesodimov

  • Coppermine novice
  • *
  • Country: bg
  • Offline Offline
  • Posts: 34
Re: Re: About new albums
« Reply #4 on: October 25, 2012, 02:46:59 pm »

Open your Coppermine database with PHPMyAdmin (or your favorite tool), and you'll see a couple of tables. Now just find the row with the name upload_create_album_directory and change its value to '1' in the config table.
This is a list of my Coppermine DB tables. Here is not "upload_create_album_directory".
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: About new albums
« Reply #5 on: October 25, 2012, 07:05:27 pm »

Open cpg15x_config.
Logged

vesodimov

  • Coppermine novice
  • *
  • Country: bg
  • Offline Offline
  • Posts: 34
Re: Re: About new albums
« Reply #6 on: October 25, 2012, 09:04:28 pm »

Open cpg15x_config.
In cpg15x_config no row with the name "upload_create_album_directory" .
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: About new albums
« Reply #7 on: October 26, 2012, 06:40:24 am »

Then add a new row.
Logged

vesodimov

  • Coppermine novice
  • *
  • Country: bg
  • Offline Offline
  • Posts: 34
Re: Re: About new albums
« Reply #8 on: October 26, 2012, 09:48:19 am »

Then add a new row.
This is not for me. I give up  :-[
But this is idea: if you want make this in next update of Coppermine. Will be great  ;)
Thanx and have a nice day.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: About new albums
« Reply #9 on: October 26, 2012, 04:53:27 pm »

Just execute the following query in PHPMyAdmin:
Code: [Select]
INSERT INTO cpg15x_config (name, value) VALUES ('upload_create_album_directory', '1');
Logged

vesodimov

  • Coppermine novice
  • *
  • Country: bg
  • Offline Offline
  • Posts: 34
Re: Re: About new albums
« Reply #10 on: October 27, 2012, 01:36:29 pm »

Just execute the following query in PHPMyAdmin:
Code: [Select]
INSERT INTO cpg15x_config (name, value) VALUES ('upload_create_album_directory', '1');
I open PHPMyAdmin and execute this. Result - new row with this data. But this is not working. I make album in Album manager, upload a pictures bur there is not new folder.  :-X
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: About new albums
« Reply #11 on: October 29, 2012, 02:44:46 pm »

Please post a link to your gallery and a test user account with upload privileges.
Logged

vesodimov

  • Coppermine novice
  • *
  • Country: bg
  • Offline Offline
  • Posts: 34
Re: Re: About new albums
« Reply #12 on: October 29, 2012, 03:24:38 pm »

Please post a link to your gallery and a test user account with upload privileges.
Hi.
I want to send you copy of DB. How do that ? I dont see how send you personal message ...
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: About new albums
« Reply #13 on: October 29, 2012, 03:32:48 pm »

Please post the link and the test user account (no admin account!) in this topic. After your issue is solved, we remove that data by request.
Logged

vesodimov

  • Coppermine novice
  • *
  • Country: bg
  • Offline Offline
  • Posts: 34
Re: Re: About new albums
« Reply #14 on: October 29, 2012, 06:40:09 pm »

Please post the link and the test user account (no admin account!) in this topic. After your issue is solved, we remove that data by request.

http://vesodimov.eu/gallery/

[removed FTP data]
« Last Edit: October 30, 2012, 10:00:14 am by Αndré »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: About new albums
« Reply #15 on: October 30, 2012, 10:03:31 am »

I just removed the provided FTP data. Please post a Coppermine user account.
Logged

vesodimov

  • Coppermine novice
  • *
  • Country: bg
  • Offline Offline
  • Posts: 34
Re: Re: About new albums
« Reply #16 on: October 30, 2012, 11:37:11 am »

I just removed the provided FTP data. Please post a Coppermine user account.
user: andre
pass: 112233
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: About new albums
« Reply #17 on: October 30, 2012, 12:39:24 pm »

Works as expected in my testbed, but not in your gallery. Please attach your zipped upload.php file to your next reply.
Logged

vesodimov

  • Coppermine novice
  • *
  • Country: bg
  • Offline Offline
  • Posts: 34
Re: About new albums
« Reply #18 on: October 30, 2012, 01:07:04 pm »

Hi.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: About new albums
« Reply #19 on: October 30, 2012, 02:08:36 pm »

Weird. The code says
Code: [Select]
        if ($CONFIG['upload_create_album_directory']) {
            $filepath .= '/'.$album;
            $dest_dir .= '/'.$album;
            if (!is_dir($dest_dir)) {
                mkdir($dest_dir, octdec($CONFIG['default_dir_mode']));
                if (!is_dir($dest_dir)) {
                    echo sprintf('error|'.$lang_db_input_php['err_mkdir'].'|1', $dest_dir);
                    exit;
                }
                @chmod($dest_dir, octdec($CONFIG['default_dir_mode'])); //silence the output in case chmod is disabled
                $fp = fopen($dest_dir . '/index.php', 'w');
                fwrite($fp, ' ');
                fclose($fp);
            }
        }

As creating the directory userpics/10002 worked as expected and the same code is used to create the sub-directory, it seems that the whole code block isn't executed (otherwise you'll get a error message if creating the directory fails). So the only reason is, that $CONFIG['upload_create_album_directory'] is false, so please double check your database's config table.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.024 seconds with 19 queries.