Hi,
I have integrated 4Images with Invision Board. It works well. I have just added this mod. Now, i cant figure out what it wrong with it.
The code as it stands:
// Validated picture message --------------------------
//-----------------------------------------------------
$current_time = time();
$row = array();
$sql = "SELECT user_email, user_name, user_allowemails FROM ".USERS_TABLE." WHERE user_id = $user_id";
$result = $site_db->query($sql);
$row = $site_db->fetch_array($result);
$user_allowemails = ($row['user_allowemails']);
$recipient_email = ($row['user_email']);
$recipient_name = ($row['user_name']);
$cut_url = str_replace("admin", "", $script_url);
$image_url = $cut_url."details.php?".URL_IMAGE_ID."=".$image_id."";
if ($user_allowemails == 1) {
$site_email = new Email();
$site_email->set_to($recipient_email);
$site_email->set_from($config['site_email'], $config['site_name']);
$site_email->set_subject("Image Validation Results");
$site_email->register_vars(array(
"recipient_name" => $recipient_name,
"lang_image_add_success" => $lang['image_add_success'],
"validation_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
"site_name" => $config['site_name'],
"yr_image_name" => strtoupper($image_media_file),
"image_url" => $image_url,
));
$site_email->set_body("validation_email", $config['language_dir']);
$site_email->send_email();
}
//-------------------------------------------------------
Now, in Invision Board, we have a few different fields, namely.
user_email is just email
user_name is just name
user_allowemails could be one of two: allow_admin_emails or email_full (both of wich are toggled with a 1 or a 0)
user_id is just id
Now, i replaced all of those. And i dont get an error message. Just nothing happens. No mail gets send, and the image is added to the gallery.
Any insight would be helpfull.
I havent posted the Declined code, because if this gets sorted, then im sure i can sort that...
Thanks.
Ian