bulk upload of profile photos

I'm moving another database to dolphin, and I've (mostly) got the Profiles table populated.  Can someone guide me on what needs to be done to add photos in bulk?  In particular, I know that the photo gets cropped and different versions of the photos get put into /modules/boonex/photos/data/files, and an md5 hash is created in the database.  I guess I'm looking for the "hook" that gets fired after a photo has been uploaded, so that I can add them in bulk, something like this psuedo-code:

foreach member_id=>photo

add_photo_to_profile(member_id, photo)

and the function call would take care of the hash and cropping.

Thanks!

Tac

Quote · 28 Oct 2010

Have you tried using Navicat?  You should be able to download a free 30 day trial.  The software is great for database work.  The learning curve isn't too bad.  You should be able to get the basics down in an hour or so.

With respect to teh password hash, this is what I've used in the root of my script:

 

 

include('inc/header.inc.php');

$startID = 3; // start at 2 to skip admin
$endID = 2859;

for ($loop=$startID; $loop <= $endID; $loop++) {

// Create salt for user.
mysql_query("UPDATE `Profiles` SET `Salt` = CONV(FLOOR(RAND()*99999999999999), 10, 36) WHERE `ID` = '$loop'");

// Convert MD5 password to SHA1 with salt added to end.
mysql_query("UPDATE `Profiles` SET `Password` = SHA1(CONCAT(`Password`, `Salt`)) WHERE `ID` = '$loop'");

}

Quote · 28 Oct 2010

Thanks -- that works great for the passwords, but photos are more complicated, because they're in a separate table, and have to be modified before they can be used.

 

I'm tracing it now, I've traced it to the following line, but not sure where this is actually called.

this.queueEvent("upload_success_handler", [file, serverData, responseReceived]);
Quote · 28 Oct 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.