In 1.7.9 läuft es nicht!
Der Code der ersetzt wird, ist anders und sieht so aus:
if (!$error) {
$sql = "INSERT INTO ".COMMENTS_TABLE."
(image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date)
VALUES
($id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")";
$site_db->query($sql);
$commentid = $site_db->get_insert_id();
update_comment_count($id, $user_info['user_id']);
$msg = $lang['comment_success'];
$site_sess->set_session_var("msgdetails", $msg);
redirect(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : "").(($page > 1) ? "&page=".$page : ""));
}
}
unset($row);
unset($spam_row);
}
Ich habe das so abgeändert.... aber bekomme kein Mail
if (!$error) {
$sql = "INSERT INTO ".COMMENTS_TABLE."
(image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date)
VALUES
($id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")";
$site_db->query($sql);
$commentid = $site_db->get_insert_id();
update_comment_count($id, $user_info['user_id']);
$msg = $lang['comment_success'];
$site_sess->set_session_var("msgdetails", $msg);
redirect(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : "").(($page > 1) ? "&page=".$page : ""));
$sql = "SELECT image_name FROM ".IMAGES_TABLE." WHERE image_id = $id";
$image_name = $site_db->query($sql);
$sql = "SELECT user_id FROM ".IMAGES_TABLE." WHERE image_id = $id";
$user_id = $site_db->query($sql);
$recipient_name = $image_row['user_name'];
$recipient_email = $image_row['user_email'];
$site_sess->set_session_var("msgdetails", $msg);
redirect(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : "").(($page > 1) ? "&page=".$page : ""));
// Start Emailer für comments
include(ROOT_PATH.'includes/email.php');
$site_email = new Email();
$site_email->set_to($recipient_email);
$site_email->set_from($config['site_email'], $config['site_name']);
$site_email->set_subject("Neuer Kommentar zu deinem Bild");
$site_email->register_vars(array(
"user_name" => $image_row['user_name'],
"recipient_name" => $recipient_name,
"image_name" => $image_row['image_name'],
"comment_date" => format_date($config['date_format']." ".$config['time_format'], time()),
"site_name" => $config['site_name'],
"image_url" => $image_url,
"comment_text" =>$comment_text,
"comment_headline"=>$comment_headline,
));
$site_email->set_body("comment_email", $config['language_dir']);
$site_email->send_email();
// Start Admin-Mail
$recipient_name = $config['site_name'];
$recipient_email = $config['site_email'];
$site_email = new Email();
$site_email->set_to($recipient_email);
$site_email->set_from($config['site_email'], $config['site_name']);
$site_email->set_subject("Neuer Kommentar wurde geschrieben");
$site_email->register_vars(array(
"user_name" => $image_row['user_name'],
"recipient_name" => $recipient_name,
"image_name" => $image_row['image_name'],
"comment_date" => format_date($config['date_format']." ".$config['time_format'], time()),
"site_name" => $config['site_name'],
"image_url" => $image_url,
"comment_text" =>$comment_text,
"comment_headline"=>$comment_headline,
));
$site_email->set_body("comment_email", $config['language_dir']);
$site_email->send_email();
}
}
unset($row);
unset($spam_row);
}