I changed the code around to add the comment and the picture within the E-mail. This makes a HUGE difference to me and maybe some other people. Please just change a few of the variables in the E-mail from website to what your site realy is. I also am adding code into editpics.php to make it so you can click all photos to not recieve comments within an album or indevidualy click on and off within that.
//Start New User Notification Code
$result = cpg_db_query("SELECT owner_id, filename, filepath, notify, sent, pwidth, pheight FROM {$CONFIG['TABLE_PICTURES']} WHERE pid=".$pid);
list($uid, $filename, $filepath, $notify, $sent, $pwidth, $pheight) = mysql_fetch_row($result);
// We can't send an email if this pic was uploaded by a guest
//User must request notification.
if ($uid && $notify == "Yes"){
// This can get the right info if the bridge is enabled or not.
$picture_owner_data = $cpg_udb->get_user_infos($uid);
//make sure we don't email ourself and that we arent being flooded
if(USER_ID != $uid && !$sent){
// check the user has specified an email address
if ($CONFIG['make_intermediate'] && max($pwidth, $pheight) > $CONFIG['picture_width']) {
$picture_url = normal_;
} else {
$picture_url = '';
}
// send an email to the owner of the picture
if ($picture_owner_data['user_email']){
$subject = "New website Comment by ".USER_NAME;
$mail_body = "Hi <b>".$picture_owner_data['user_name']."!</b>\n\n".USER_NAME." just wrote a comment on one of your photos:<br /><b>".$_POST['msg_body']."</b><br /><br /><a href='$CONFIG[site_url]displayimage.php?pos=-$pid'><img src='$CONFIG[site_url]albums/".$filepath."".$picture_url."$filename'></img></a><br />Click the image above to reply to the comment or click <a href='$CONFIG[site_url]displayimage.php?pos=-$pid'><b>HERE</b></a>.<br />\n";
$mail_body .= "More comments may be posted, but you won't receive any more notifications until you read them.<br />\n";
cpg_mail($picture_owner_data['user_email'], $subject, make_clickable($mail_body), 'text/plain', "website", 'name@website.com');
}
//Mark that we've sent a notification so the pic owner doesnt get flooded.
if(!$sent){
$result = cpg_db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET sent = 1 WHERE pid=".$pid);
}
}
}
// End User Notification Code.