CPG 1.3.2 - Upload files and edit them all at once - Page 3 CPG 1.3.2 - Upload files and edit them all at once - Page 3
 

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

CPG 1.3.2 - Upload files and edit them all at once

Started by mstralka, August 27, 2004, 06:15:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ytknows

I got this working, but I have one tiny problem... the custom user fields aren't showing the correct info
see below

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg76.exs.cx%2Fimg76%2F8047%2Fuploadphp4mr.gif&hash=44e56945bd54f34d1cce066f935b7dfff1bf1316)

anyone know how to fix this? i've tried and tried and cannot find where to correct this... any help or a point in the right direction will be greatly appreciated. the upload.php file i'm using is attached below.

Justin

Yes, I got the same Problem:

Only three of four custom fields are displayed, and the description of all three is "1."

Any one knows where to look?

thx

Justin

Justin

#42
there's an error in the upload.php from the upload. zip.

Search for:


// Check for user defined fields.
if(!empty($CONFIG['user_field1_name[]'])) {
$form_array[] = array($CONFIG['user_field1_name[]'], 'user1', 0, 255, 1);
}

if(!empty($CONFIG['user_field2_name'])) {
$form_array[] = array($CONFIG['user_field2_name[]'], 'user2', 0, 255, 1);
}

if(!empty($CONFIG['user_field3_name'])) {
$form_array[] = array($CONFIG['user_field3_name[]'], 'user3', 0, 255, 1);
}

if(!empty($CONFIG['user_field4_name'])) {
$form_array[] = array($CONFIG['user_field4_name[]'], 'user4', 0, 255, 1);
}



and replace with



// Check for user defined fields.
if(!empty($CONFIG['user_field1_name'])) {
$form_array[] = array($CONFIG['user_field1_name'], 'user1', 0, 255, 1);
}

if(!empty($CONFIG['user_field2_name'])) {
$form_array[] = array($CONFIG['user_field2_name'], 'user2', 0, 255, 1);
}

if(!empty($CONFIG['user_field3_name'])) {
$form_array[] = array($CONFIG['user_field3_name'], 'user3', 0, 255, 1);
}

if(!empty($CONFIG['user_field4_name'])) {
$form_array[] = array($CONFIG['user_field4_name'], 'user4', 0, 255, 1);
}





Regards,

Justin


PS:

As someone earlier in this thread asked for:
Here's what I changed additionally(!) in upload.php to display one parent category up with (parent-cat / sub-cat) in the pull-downs,

find:


$vQuery = "SELECT cat.name FROM " . $CONFIG['TABLE_CATEGORIES'] . " cat, " . $CONFIG['TABLE_ALBUMS'] . " alb WHERE alb.aid='" . $album_id . "' AND cat.cid=alb.category";
   


and replace with


$vQuery = "SELECT ifnull(concat(catp.name,' / ',cat.name),cat.name) name FROM " . $CONFIG['TABLE_ALBUMS'] . " alb ," . $CONFIG['TABLE_CATEGORIES'] . " cat left outer join  " . $CONFIG['TABLE_CATEGORIES'] . " catp on catp.cid = cat.parent WHERE alb.aid='" . $album_id . "' AND cat.cid=alb.category";


ytknows


NekoChris

I also have the problem where after applying this mod and then uploading via urls I get a white screen with only the continue button and the theme dropdown. Any suggestions how to fix that?

luke

I followed the instructions in this thread and got this mod working - thanks to mstralka for the mod and the extra fixes added here, it makes uploading lots of photos much easier  :D

However since installing this mod I've noticed quotes in titles & captions are being escaped and saved to the DB, so if I have a title which is say:
QuoteThis is John's friend "Jill"

I get:
QuoteThis is John\'s friend \"Jill\"

If I use my upload.php from before I added the mod, the extra slashes are not added.

If I remove addslashes() from the variables around line 2275 (eg following " (int)$HTTP_POST_VARS['album'][$x]; ") the slashes, well, aren't added. However addslashes() are in the original upload.php, so are the any implications for removing them like so:

with the mod, lines like this:
$title = addslashes($HTTP_POST_VARS['title'][$x]);
would become:
$title = $HTTP_POST_VARS['title'][$x];

? If there are issues with this (ie I assume addslashes() are there in the original upload.php for a reason!) please let me know :)

Cheers!
luke

duckxtales

hi,

can someone upload their working copy of upload.php? I cant seem to get it to work. thanks..

duckxtales

i have my upload.php attached below if anyone can help...  ???

FedericaSanta

hi,

can someone upload their working copy of upload.php?

Thanks!!

DefenceTalk.com

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.defencetalk.com%2Fpictures%2Fsignature_cpg.php&hash=c0098ed5314d39beb9e8799c7c8787a9a0353b45)

NeoBladeFX

#50
Hi All ^_^ This mod is something that is seriously needed and it seems to be working for others. I've followed the instructions and did the fixes and the upload section isn't broken. however I still only get one upload displayed at a time. There is improvement though as the " Move all photos to:" section has appeared but when theres only one image displayed at the time its not quite the same.

It seems I'm almost there so I've attached my current upload.php file here for inspection. I've gone through the mod a few times now but can't see, to find the section that will display all the uploaded images at once amongst all the other comments and bug fixes from other members. Fantastic work though by everyone on this. Once I have it working I'll re-post the whole thing as one file giving credit to the original editors of course - Hopefully this will make the mod easier to follow with all fixes included.

If anyone is able to fix my upload.php though I would be rather greatful. Many thanks.

EDIT - Ignore all that, I think I've got it working ^_^ I'm at work atm so can't check but if it is working I'll post it up.

Stramm

Quote from: NeoBladeFX on June 23, 2005, 06:02:44 PM
Hi All ^_^ This mod is something that is seriously needed and it seems to be working for others. I've followed the instructions and did the fixes and the upload section isn't broken. however I still only get one upload displayed at a time. There is improvement though as the " Move all photos to:" section has appeared but when theres only one image displayed at the time its not quite the same.

It seems I'm almost there so I've attached my current upload.php file here for inspection. I've gone through the mod a few times now but can't see, to find the section that will display all the uploaded images at once amongst all the other comments and bug fixes from other members. Fantastic work though by everyone on this. Once I have it working I'll re-post the whole thing as one file giving credit to the original editors of course - Hopefully this will make the mod easier to follow with all fixes included.

If anyone is able to fix my upload.php though I would be rather greatful. Many thanks.

EDIT - Ignore all that, I think I've got it working ^_^ I'm at work atm so can't check but if it is working I'll post it up.

admin mode -> config -> user settings -> Allow users to assign uploaded photos at once (instead of one-at-a-time)
set this to 'yes'... then it should work

NeoBladeFX

#52
Thanks for the reply. I was very sure I did that as it looked like a simple mistake. Trouble is my locall installation doesn't really like me (probably due to my firewallm same happens with phpBB) so the only way to really know is for me to try it out online. Going to test it now while making a backup. Hope it works and if it does many thanks to everyone here as this mod was seriously needed!

EDIT - Ok, everytime I click on YES to "Allow users to assign uploaded photos at once (instead of one-at-a-time)" and click on save, it doesn't... So when I go back into the config, its back on NO.

Any ideas on how to force it instead? At first I thought it was just my locall installation but it seems its also happening to the online one too. Any help would be appreciated.

NeoBladeFX

#53
Hmm... I'm thinking it could be a problem with the very first step with the DS query. When I log into phpmyadmin and go to submit the query, I get the text "You have to choose at least one Column to display".

Column from where exactly? Usually a mate of mine does the DB stuff but he hasn't been online for months...

EDIT: Fixed as he popped online ^_^

Now I just get a "Critical Error - Script called without the required parameter(s). " I'm going to do it all from the beggining once again and see if I've missed anything or not. Certainly doesn't help that the bug fixes and that are all fragmented and that most of the people who have it working are not around to help. I've even used someone elses upload.php from this thread and applied  the bug fix and I get the same error...

EDIT 2: Right I've re-done the mod this time without doing the bug fixes etc in hope that the original poster updated his hack to include it all and it works to a degree... When uploading more than one image all of the images load up fine when deciding upon which album to put them in & descriptions etc. When submitting the images though I just get a blank info screen on the "Continue" button and only one image is added to the gallery. I've added the bugfix to put the...

// That was the last one. Create a redirect box.
pageheader($lang_info);
msg_box($lang_info, $final_message, $lang_continue, 'index.php', "100%");
pagefooter();

// Exit the script.
exit;
}
}
}
} //end for loop


...in and I had to delete the ")" bracket right at the end of my upload file too, to get the file working. I've added my upload file here as everything else seems to work bar the actual inclusion of the files themselves. Any help would be appreciated.

Summi

Hi,

i've got big trouble with integrating and combinating the 2 mods "miltiple file upload using a zip" and "upload files and edit them at once" into my coppermine 1.3.3.

My main problem is, that the unzip-function does not work. My server is supporting the unzip function.

http://forum.coppermine-gallery.net/index.php?topic=7750.0  (-> zip upload)
http://forum.coppermine-gallery.net/index.php?topic=9391.0  (-> multiple edit)

I would be very happy, if anybody could post a working copy of all the files that are needed for this mod (eg. upload.php, m-zip.php, lang/english.php, groupmgr.php)
Please post as an attachement, so i could download it.

If you are running coppermine 1.3.2, please post these too. I could integrate the changes from 1.3.2 to 1.3.3 manually.

Thanx for your help,
Summi

DJ TrEVo

Here my working upload.php file...

I hope It can be useful!

Enjoy ^_^

u-n-i

thanks for this mod

but a question

what about watermark hack

will that work witht his ?
i mean will it watermark all images placed at once ?

thanks

FedericaSanta

Quote from: DJ TrEVo on September 02, 2005, 01:20:12 AM
Here my working upload.php file...

I hope It can be useful!

Enjoy ^_^

Hy,

it' s impossible to download . Can you repost it, please?

Joachim Müller


u-n-i