Advanced search  

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

Pages: [1]   Go Down

Author Topic: Modify ownership of GPG pictures from phpBB page  (Read 4766 times)

0 Members and 1 Guest are viewing this topic.

rstober

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Scrappin' Gallery
Modify ownership of GPG pictures from phpBB page
« on: June 14, 2005, 07:07:39 pm »

Good Morning,

I have a specialized system where many of the images in the gallery are uploaded by a single account. Certain information is encoded into the title of each image, so that I can identify the user who is suppossed to own this image. For example, for a customerNumber 5010 and scanId 1186508221 the title of the image would be 5010.1186508221. This tells me that customerNumber 5010 should be the owner of this image. But remember, the file was uploaded by a different account.

So I want to change the ownership of this image when user 5010 logs in. I hacked the phpBB login.php script to try to connect to the CPG database and m,ake the change as shown below:

#
# change ownership of scanId $sn to the username that cooresponds to customerID $cn
#
define('IN_COPPERMINE', true);
require('../gallery/include/init.inc.php');
$sql = "UPDATE cpg_pictures SET owner_name = '" . $row['username'] . "', owner_id = " . $row['user_id'] . " WHERE title = '" . $cn . "." . $sn . "'";
if ( !($gallery = db_query($sql)) ) {
   message_die(GENERAL_ERROR, 'Could not update cpg_pictures table', '', __LINE__, __FILE__, $sql);
}
« Last Edit: June 15, 2005, 11:01:38 pm by TranzNDance »
Logged

rstober

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Scrappin' Gallery
Re: Modify ownership of GPG pictures from phpBB page
« Reply #1 on: June 14, 2005, 09:04:14 pm »

Good Morning,

My contact information was stripped from my original posting. This is a SERIOUS inquiry. If you wish to make some money, and you can have the skills to help me, please reply to this posting. I've turned notifications on, and will respond immediately upon reading the notification.

There are two things I need done:

1. Fix the damage I caused while trying to do this myself

2. Make my desire to change the ownership of previously uploaded images from phpBB a reality

Thank you,

Robert
Logged

Nibbler

  • Guest
Re: Modify ownership of GPG pictures from phpBB page
« Reply #2 on: June 14, 2005, 09:34:44 pm »

If you PM or email me your FTP and phpmyadmin I'll fix it for you and do the mod properly. I'll close your other thread.
Logged

rstober

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Scrappin' Gallery
Re: Modify ownership of GPG pictures from phpBB page
« Reply #3 on: June 14, 2005, 10:48:28 pm »

Nibbler,

I sent you the FTP info and the phpmyadmin info to mail@ic-gallery.com. I hope that was right address! Please let me know whether or not you've received it...

Thank you!

Robert
Logged

rstober

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Scrappin' Gallery
Re: Modify ownership of GPG pictures from phpBB page
« Reply #4 on: June 15, 2005, 08:30:11 pm »

This is now done, with much help from "Nibbler". Many thanks to Nibber. I've been using the Internet for many years, and rarely have I found someone so willing to help out without asking for anything at all in exchange. Nibbler is truely a fine individual who knows plenty about Coppermine and phpBB!

Thanks again Nibber, and cheers!  :)

I'd close this thread, if I knew how....

Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 19 queries.