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: Incomplete Album Name & Incomplete Upload Name - SOLVED  (Read 4149 times)

0 Members and 1 Guest are viewing this topic.

jdbaranger

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 169
    • Accro-Photo
Incomplete Album Name & Incomplete Upload Name - SOLVED
« 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
Logged
Jean-Denis

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Incomplete Album Name & Incomplete Upload Name - SOLVED
« Reply #1 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
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png)

jdbaranger

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 169
    • Accro-Photo
Incomplete Album Name & Incomplete Upload Name - SOLVED
« Reply #2 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
Logged
Jean-Denis

irapeau

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Incomplete Album Name & Incomplete Upload Name - SOLVED
« Reply #3 on: October 19, 2003, 12:34:51 pm »

YES, I am interested too !  :cry:
Logged

jdbaranger

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 169
    • Accro-Photo
Incomplete Album Name & Incomplete Upload Name - SOLVED
« Reply #4 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
Logged
Jean-Denis

jdbaranger

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 169
    • Accro-Photo
Incomplete Album Name & Incomplete Upload Name - SOLVED
« Reply #5 on: October 19, 2003, 02:43:39 pm »

I finnaly find the answer.

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

Code: [Select]
$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 :

Code: [Select]
$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
Logged
Jean-Denis
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 18 queries.