Author Topic: Subscribe to Image for posted comments  (Read 8061 times)

0 Members and 1 Guest are viewing this topic.

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Subscribe to Image for posted comments
« on: October 26, 2006, 09:12:11 PM »
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):

Code: [Select]
//-----------------------------------------------------
// 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 :!: :wink:


Project offline

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Subscribe to Image for posted comments
« Reply #1 on: October 26, 2006, 09:17:14 PM »
Läuft der Mod noch ohne Probleme?

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: Subscribe to Image for posted comments
« Reply #2 on: October 26, 2006, 09:25:26 PM »
Läuft der Mod noch ohne Probleme?

Dieser MOD ja, dieser ist halt nur da, um die Eigentümer der jeweiligen Datei zu informieren, wenn ein Kommentar abgegeben wurde.
Laufen tut der ohne Probleme (meine Version ist 1.7.3)

Project offline

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Subscribe to Image for posted comments
« Reply #3 on: October 26, 2006, 09:27:20 PM »
Stellst Du mir Deine Galerie zur verfügung um diesen Mod zu modifizieren und zu testen?

HAbe nämlich kein Testsystem und das wäre mir zur Zeit zu viel Aufwand...

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: Subscribe to Image for posted comments
« Reply #4 on: October 26, 2006, 09:40:21 PM »
Also ich teste das alles offline. Habe auch offline schon probiert wie das mit der kopierten Lightbox aussieht und funzt. Die online Version bearbeite ich erst wenns offline funzt. Ich kann aber gerne eine weitere (frische) Galerie auf den Server spielen.

Also mein Problem liegt darin, dass der Emailer ja wissen muss, welchen Usern er die Benachrichtigung zukommen lassen soll und wenn dies z.B. mit den jetzigen Favoriten Dateien der User klappt, kann man ja das komplette Lightboxsystem kopieren und ein Subscribe System daraus machen.

Cu by Flo

Project offline

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Subscribe to Image for posted comments
« Reply #5 on: October 26, 2006, 10:05:49 PM »
Zu aufwendig, ich würde "[Mod] Mail Owner of image when Comment is Posted" anpassen und alle User IDs auslesen die zu der Bild ID passt...
Dabei würde man noch berücksichtigen das es ja die Einstellung "Emails von Administratoren erhalten" gibt und das wars dann schon...

Wenn mir jemand ein Testsystem mit dem oben genannten Mod zur verfügung stellt werde ich die Anpassungen vornehmen...

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: Subscribe to Image for posted comments
« Reply #6 on: October 26, 2006, 10:10:28 PM »
Zu aufwendig, ich würde "[Mod] Mail Owner of image when Comment is Posted" anpassen und alle User IDs auslesen die zu der Bild ID passt...
Dabei würde man noch berücksichtigen das es ja die Einstellung "Emails von Administratoren erhalten" gibt und das wars dann schon...

Wenn mir jemand ein Testsystem mit dem oben genannten Mod zur verfügung stellt werde ich die Anpassungen vornehmen...

Ich erstelle Dir gerade einen FTP Account mit allem was dazu gehört - mehr gleich per PM!

Project offline