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
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.
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
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.
Quote from: Αndré 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.
This is a list of my Coppermine DB tables. Here is not "upload_create_album_directory".
Open cpg15x_config.
Quote from: Αndré on October 25, 2012, 07:05:27 PM
Open cpg15x_config.
In cpg15x_config no row with the name "upload_create_album_directory" .
Then add a new row.
Quote from: Αndré on October 26, 2012, 06:40:24 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.
Just execute the following query in PHPMyAdmin:
INSERT INTO cpg15x_config (name, value) VALUES ('upload_create_album_directory', '1');
Quote from: Αndré on October 26, 2012, 04:53:27 PM
Just execute the following query in PHPMyAdmin:
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
Please post a link to your gallery and a test user account with upload privileges.
Quote from: Αndré on October 29, 2012, 02:44:46 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 ...
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.
Quote from: Αndré 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.
http://vesodimov.eu/gallery/
[removed FTP data]
I just removed the provided FTP data. Please post a Coppermine user account.
Quote from: Αndré on October 30, 2012, 10:03:31 AM
I just removed the provided FTP data. Please post a Coppermine user account.
user: andre
pass: 112233
Works as expected in my testbed, but not in your gallery. Please attach your zipped upload.php file to your next reply.
Hi.
Weird. The code says
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.
This is my config DB. Please see it.
Obviously this is a different table. It doesn't contain the row upload_create_album_directory. The table prefix in your screenshot is cpg15x_, the attached table's prefix is gallery_.
Execute this query:
INSERT INTO gallery_config (name, value) VALUES ('upload_create_album_directory', '1');
Quote from: Αndré on October 30, 2012, 02:38:58 PM
Obviously this is a different table. It doesn't contain the row upload_create_album_directory. The table prefix in your screenshot is cpg15x_, the attached table's prefix is gallery_.
Execute this query:
INSERT INTO gallery_config (name, value) VALUES ('upload_create_album_directory', '1');
Sorry. That's my mistake.
gallery_config is correct table.
I execute a query /insert data in SQL window and push
Go /. Then i see new table in
gallery_config. With Album manager i make new album called "2249" and upload a pictures in. But when I enter through FTP I can's see a folder "2249". That is my problem ???