Author Topic: [Mod] Mail Owner of image when Comment is Posted  (Read 241213 times)

0 Members and 2 Guests are viewing this topic.

Offline SunnyUK

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #165 on: December 30, 2008, 02:27:58 PM »
Nice mod. Thank you very much.

Offline theskyboy

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #166 on: January 11, 2009, 12:25:08 AM »
Hi There

I have installed this MOD, however the e- mails are turning out like this:

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0
Arial;}}
{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\f0\fs20 Dear
\{user_name\},\par
\par
someone posted a comment on \{image_name\} at \{site_name\}.\par
To view the comment go to: \{image_url\}\par
Date: \{comment_date\}\par
\par
Best regards, \{site_name\}\par
}

I am using 1.7.6

Best wishes,

Nick

Offline bfarber

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #167 on: January 22, 2009, 12:43:07 AM »
There are obviously a lot of sharp people in here but I have a simple question.  Most of the mods I have reviewed carry on in response for an extensive length with multiple postings on corrections.  Is this mod with all changes and corrections listed in any one place?  This is a great idea and I am sure it works as well as the suggested modifications to the MOD.
It would probably take less than 15 minutes to add this mod but not when you have to run back and forth and read all the postings and clarifications or corrections or am I reading the comments wrong?
« Last Edit: January 22, 2009, 03:50:38 AM by bfarber »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #168 on: January 22, 2009, 01:39:27 AM »
Hello and welcome to 4images forum.

Unfortunately you are probably reading it right...at least in this particular case. Most recent mods are getting updated in the original instructions as fixes posted in the comments.
In this particular case it seems to be the author no longer active on this forum and you probably need go through the comments to get the whole mod...
However if you feel so generous, you could collect the needed changes and we'll gladly update the original instructions for future users ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Apfelkomplott

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #169 on: March 27, 2009, 03:27:09 PM »
Hallo zusammen.
Ich bekomme diesen MOD nicht ans laufen mit 4images 1.7.6 und dem Iceberg Template - in der Detailansicht wird nur noch eine weiße Seite ausgegeben. Warum nur? Das wäre der erste MOD, Konflikte dürften keine bestehen.

------
Hi there.
For some reason I don't know I can't get this MOD running with 4images 1.7.6 and the Iceberg template - in details page only a white page ist printed. But why? It's the first MOD, conflicts should not be there.
 
:oops:

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #170 on: May 31, 2009, 01:15:38 AM »
Mod ist in 1.7.7 eingebaut, bekomme aber keine Mail ?

-----

   
Did the modification in version 1.7.7 tested. But I receive no e-mail. Would that someone, perhaps to version 1.7.7 rewrite?
« Last Edit: May 31, 2009, 12:26:44 PM by Benny »

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #171 on: June 23, 2009, 01:23:58 PM »
I Used this Code:
//-----------------------------------------------------
// Start Emailer for comments
//----------------------------------------------------- 
   
$recipient_name $image_row['user_name'];
   
$recipient_email $image_row['user_email'];
   
$image_url $script_url."/img".$id;

   
$sql "SELECT user_allowmailcomments FROM ".USERS_TABLE." WHERE ".get_user_table_field("""user_name")." = '".$recipient_name."'";
$result $site_db->query($sql);
   
$row $site_db->fetch_array($result);
   
$user_allowmailcomments = ($row['user_allowmailcomments']);

   if (
$image_row['user_id'] != $user_info['user_id'] && $user_allowmailcomments == 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'],
     
"comment_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
     
"site_name" => $config['site_name'],
     
"image_url" => $image_url,
     
"comment_text" =>(stripslashes($comment_text)),
     
"comment_headline"=>(stripslashes($comment_headline)),
          ));
    
$site_email->set_body("comment_email"$config['language_dir']);
    
$site_email->send_email();
    }
//----------------------------------------------------  


If someone writes a comment, the following error:
An unexpected error occured. Please try again later.
There is also no e-mail!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #172 on: June 23, 2009, 03:15:29 PM »
And what kind of error shows when posted as admin?
also that message is covered in our error messages section An unexpected error occured. Please try again later.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Frank Götze

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Photography Portal Galerie
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #173 on: June 23, 2009, 03:17:03 PM »
Hi Benny,

der Mod funktioniert bei mir ohne Probleme in der 1.77. Kontrolliere bitte mal deine Userverwaltung und die hinterlegte E- Mailadresse.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #174 on: June 23, 2009, 10:39:29 PM »
And what kind of error shows when posted as admin?
also that message is covered in our error messages section An unexpected error occured. Please try again later.

This
Quote
Bad SQL Query: SELECT user_allowmailcomments FROM 4images_users WHERE user_name = 'Benny'
Unknown column 'user_allowmailcomments' in 'field list'

If the administrator saves a comment, then no errors and there will be no e-mail sent!

Hi Benny,

der Mod funktioniert bei mir ohne Probleme in der 1.77. Kontrolliere bitte mal deine Userverwaltung und die hinterlegte E- Mailadresse.

Was meinst du mit der Userverwaltung?
Und es ist meine E-Mail Adresse hinterlegt zu 100% korrekt ist, habe ich auch schon nachgesehen!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #175 on: June 24, 2009, 01:35:32 AM »
user_allowmailcomments is not part of this mod...you'll need add that field into 4images_users table manually. add it as TINYINT(1) :
Code: (MySQL Query (phpmyadmin)) [Select]
ALTER TABLE `4images_users` ADD `user_allowmailcomments` TINYINT( 1 ) NOT NULL ;
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #176 on: June 24, 2009, 10:45:57 AM »
Thanks Vano,
but there is still no e-mail. There is simply no e-mail sent!
   
Hi Vano, would you have this code may take a look? I think in the code does not error.

      $site_db->query($sql);
      
$commentid $site_db->get_insert_id();
      
update_comment_count($id$user_info['user_id']);
      
$msg $lang['comment_success'];
//-----------------------------------------------------
// Start Emailer for comments
//----------------------------------------------------- 
   
$recipient_name $image_row['user_name'];
   
$recipient_email $image_row['user_email'];
   
$image_url $script_url."/img".$id;

   
$sql "SELECT user_allowmailcomments FROM ".USERS_TABLE." WHERE ".get_user_table_field("""user_name")." = '".$recipient_name."'";
$result $site_db->query($sql);
   
$row $site_db->fetch_array($result);
   
$user_allowmailcomments = ($row['user_allowmailcomments']);

   if (
$image_row['user_id'] != $user_info['user_id'] && $user_allowmailcomments == 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'],
     
"comment_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
     
"site_name" => $config['site_name'],
     
"image_url" => $image_url,
     
"comment_text" =>(stripslashes($comment_text)),
     
"comment_headline"=>(stripslashes($comment_headline)),
          ));
    
$site_email->set_body("comment_email"$config['language_dir']);
    
$site_email->send_email();
    }
//----------------------------------------------------  
    
}
  }
  unset(
$row);
  unset(
$spam_row);
}

//-----------------------------------------------------
//--- Show Comments -----------------------------------
//-----------------------------------------------------

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #177 on: June 28, 2009, 02:17:38 PM »
Please help me  :(

Offline daymos

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #178 on: August 23, 2009, 12:11:12 AM »
Hi All.
I don't receive any comment_mail.

Code: [Select]
#
193.43.222.3 - - [22/Aug/2009:14:26:14 -0700] "POST /ajaxcomments.php?l=ukrainian&js&commentbg=1&l=ukrainian HTTP/1.1" 200 1409 "http://xxx.com/img653.htm?l=ukrainian" "Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 WebMoney Advisor"
#
193.43.222.3 - - [22/Aug/2009:14:26:35 -0700] "GET /admin/email.php?action=emailusers&l=ukrainian HTTP/1.1" 200 5281 "http://xxx.com/admin/index.php?action=nav&l=ukrainian" "Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 WebMoney Advisor"
193.43.222.3 - - [22/Aug/2009:14:26:35 -0700] "GET /admin/email.php?action=emailusers&l=ukrainian HTTP/1.1" 200 5281 "http://xxx.com/admin/index.php?action=nav&l=ukrainian" "Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 WebMoney Advisor"
#
193.43.222.3 - - [22/Aug/2009:14:26:40 -0700] "GET /admin/settings.php?action=modifysettings&l=ukrainian HTTP/1.1" 200 5538 "http://xxx.com/admin/index.php?action=nav&l=ukrainian" "Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 WebMoney Advisor"
#
193.43.222.3 - - [22/Aug/2009:14:26:40 -0700] "GET /admin/settings.php?action=modifysettings&l=ukrainian HTTP/1.1" 200 5538 "http://xxx.com/admin/index.php?action=nav&l=ukrainian" "Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 WebMoney Advisor"
#
193.43.222.3 - - [22/Aug/2009:14:26:46 -0700] "GET /admin/email.php?action=emailusers&l=ukrainian HTTP/1.1" 200 5281 "http://xxx.com/admin/index.php?action=nav&l=ukrainian" "Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 WebMoney Advisor"
#
193.43.222.3 - - [22/Aug/2009:14:26:47 -0700] "GET /admin/email.php?action=emailusers&l=ukrainian HTTP/1.1" 200 5281 "http://xxx.com/admin/index.php?action=nav&l=ukrainian" "Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 WebMoney Advisor"

But when I sent email from ACP
Code: [Select]
#
193.43.222.3 - - [22/Aug/2009:14:38:58 -0700] "POST /admin/email.php?l=ukrainian HTTP/1.1" 200 1446 "http://xxx.com/admin/email.php?action=emailusers&l=ukrainian" "Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 WebMoney Advisor"
#

What's wrong?

Offline webbug

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: [Mod] Mail Owner of image when Comment is Posted
« Reply #179 on: September 10, 2009, 03:36:34 PM »
Hi to all.

Why admins do not receive comments for their images?
I'm using 1.7.4

Thanks.

UPDATE : Fix it . Thanks

I have the same issue.  My email address is set correctly.

Do I need to set anything related to mail? like SMTP, its off at the moment.