Modify ownership of GPG pictures from phpBB page Modify ownership of GPG pictures from phpBB page
 

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

Modify ownership of GPG pictures from phpBB page

Started by rstober, June 14, 2005, 07:07:39 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

rstober

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);
}

rstober

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

Nibbler

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.

rstober

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

rstober

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....