Many users of 4images search this MOD, know I have a little idea to get this!
We can use it like the same way as we use the lightbox function!
features:- see for which files you´ll receive comments
- add / delete subscribed files
- view subscribed files with thumbnails
for examle:Users can click a button on details page e.g. called "subscribe", know the file will added like the same way 4images-files are added into the lightbox.
Now its a little bit tricky, but I think we can use this MOD from Vraxtor (
http://www.4homepages.de/forum/index.php?topic=2705.0):
//-----------------------------------------------------
// Start Emailer for comments
//-----------------------------------------------------
$recipient_name = $image_row['user_name'];
$recipient_email = $image_row['user_email'];
$image_url = $script_url."/details.php?".URL_IMAGE_ID."=".$id."";
$sql = "SELECT user_allowemails FROM ".USERS_TABLE." WHERE user_name = '$recipient_name'";
$result = $site_db->query($sql);
$row = $site_db->fetch_array($result);
$user_allowemails = ($row['user_allowemails']);
if ($user_allowemails == 1) {
$current_time = time();
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($lang['send_comment_emailsubject']);
$site_email->register_vars(array(
"user_name" => stripslashes($user_name),
"recipient_name" => stripslashes($image_row['user_name']),
"image_name" => $image_row['image_name'],
"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();
}
So we have to figured out to tell the emailer he should send this notification all users wich have subscribed to this file (when a comment is posted).
e.g.
1. user Hero (user_id=1) & user Max (user_id=2) subscribed to image trees (image_id=1)
2. a guest posted a comment for image 1
3. emailer search db which users will receive a notification for this comment and send user_id=1 & user_id=2 an email.
Hope somebody can help! Many users will be happy when this works