coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: jdbaranger on October 18, 2003, 04:52:21 PM

Title: Incomplete Album Name & Incomplete Upload Name - SOLVED
Post by: jdbaranger on October 18, 2003, 04:52:21 PM
Hello !

This is a wonderfull program, so i've upgraded to RC2 version last week, but i've a problem : The album name is incomplete for all new uploads : field owner_name keeps empty in table cpg_pictures when i do new uploads. This is my question :

Which modifications should i do to make the field owner_name be completed in the table Pictures, so that the Owner Name can appear in front of Album Name

This is a fonctionality i really miss

Thanks a lot

Jean-Denis
Title: Incomplete Album Name & Incomplete Upload Name - SOLVED
Post by: hyperion on October 18, 2003, 05:04:20 PM
Is this the problem to which you refer?

http://forum.coppermine-gallery.net/index.php?topic=553
Title: Incomplete Album Name & Incomplete Upload Name - SOLVED
Post by: jdbaranger on October 18, 2003, 05:14:59 PM
No, i've no problem with comments. Let me descibe my problem :

When a user TOTO uploads a file in a gallery GALLERY1, the Album Name sould be TOTO / GALLERY1 in pages such as displayimage.php.

Actually, the Album Name is only GALLERY1 because the field owner_name in the table cpg_pictures is empty.

Where is the problem ? How coul'd i restore this function ?

Thanks,

Jean-Denis
Title: Incomplete Album Name & Incomplete Upload Name - SOLVED
Post by: irapeau on October 19, 2003, 12:34:51 PM
YES, I am interested too !  :cry:
Title: Incomplete Album Name & Incomplete Upload Name - SOLVED
Post by: jdbaranger on October 19, 2003, 02:19:37 PM
More informations : The field owner_id is correct, but not the field owner_name.

Where are those fields completed ?

Coul'd someone have an answer ?  :idea:

Thanks ,

jean-Denis
Title: Incomplete Album Name & Incomplete Upload Name - SOLVED
Post by: jdbaranger on October 19, 2003, 02:43:39 PM
I finnaly find the answer.

In picmgmt.inc.php, search the following line :

$query = "INSERT INTO {$CONFIG['TABLE_PICTURES']} (pid, aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip) VALUES ('', '$aid', '" . addslashes($filepath) . "', '" . addslashes($filename) . "', '$image_filesize', '$total_filesize', '{$imagesize[0]}', '{$imagesize[1]}', '" . time() . "', '$user_id', '$title', '$caption', '$keywords', '$approved', '$user1', '$user2', '$user3', '$user4', '$raw_ip', '$hdr_ip')";
And replace it with these two lines :

$username=$USER_DATA['user_name'] ;
$query = "INSERT INTO {$CONFIG['TABLE_PICTURES']} (pid, aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip) VALUES ('', '$aid', '" . addslashes($filepath) . "', '" . addslashes($filename) . "', '$image_filesize', '$total_filesize', '{$imagesize[0]}', '{$imagesize[1]}', '" . time() . "', '$user_id', '$username' , '$title', '$caption', '$keywords', '$approved', '$user1', '$user2', '$user3', '$user4', '$raw_ip', '$hdr_ip')";


Maybe there's a more simple way but this one performs good result