Forums

notify the author of the article

lemur 02 Feb, 2009
Hi,

there is a mail notification for the authors of comments.

there is also a notification for admin.

is it possible to notify the author of the article?

Thanks.
Max_admin 02 Feb, 2009
Hi lemur,

with a small hack, or you can wait for the next release, what do you think ?

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Shane C. Mason 12 Feb, 2009
Max,

This is exactly what I need we well. I don't mind doing the hack, could you point me in the right direction though? When is the next release scheduled?

Thanks for any help you can give me on this. Chrono-Comments is by far the best solution out there, but I *need* this one feature.
Max_admin 12 Feb, 2009
Hi Shane,

you will find one line like the one below in the components/com_chronocomments/chronocomments.php

JUtility::sendMail($from, $fromname, $recipients, $subject, $email_body, $mode);


add this code below it :


global $mainframe;
$database =& JFactory::getDBO();
$query     = "SELECT * FROM #__users WHERE id='".$row->created_by."'";
$database->setQuery( $query );
$user = $database->loadObject();

JUtility::sendMail($fromemail, $fromname, $user->email, $subject, $email_body, $mode);


you will need to give some values to the variables in the last line!

let me know how this goes

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Shane C. Mason 12 Feb, 2009
Thanks Max, that's perfect. I will do that tonight and let you know.
miguelzuniga 03 Mar, 2009
Hey Everyone,

First of all nice job on this component, its pretty simple for my users to work with and has everything it needs to be a comments system.

Well anyway, I wanted to contribute a little bit, I was also trying to send a notification email to the author of the article everytime someone wrote down a comment.

Using the instructions provided on the last post I made a little tweak my self also.

With this code you'll be able to send an email containing the text of the comment to the respective author of the article they are writing on.


                global $mainframe;
                $tmpdb =& JFactory::getDBO();
                $pageid = $post['pageid'];
                $tmpquery     = "SELECT DISTINCT #__users.email FROM #__users JOIN #__content on #__users.id = #__content.created_by and #__content.id ='".$pageid."'";
                $tmpdb->setQuery( $tmpquery );
                $tmpuser = $tmpdb->loadObject();
                JUtility::sendMail("email@from.com", "fromName", $tmpuser->email, "Subject here", $post['text'], true, NULL, NULL, NULL, NULL, NULL );



You can set it up on the com_chronocomments/chronocomments.php between the send verification and send admin notification email.

I hope this was what you were looking for.

Regards

Miguel 😀
Max_admin 03 Mar, 2009
Thanks for sharing this! 🙂

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.