Keyword

K2 Comments - Notifications

  • Goble002
  • Goble002's Avatar Topic Author
  • Away
  • Premium Member
More
1 week 5 days ago - 1 week 5 days ago #178578 by Goble002
K2 Comments - Notifications was created by Goble002
Hello,

I would like to get notified of K2 comments for approval.

BNR Comment Notify for K2 is no more available on JED.

I have tried the codes from  here and I do received email, however:

K2_COMMENT_ADDED_AND_WAITING_FOR_APPROVAL won't show up. Seems there are minor tweaks to be brought to this solution that has more than 8 years.

Code added:
$mainframe = &JFactory::getApplication();
$mail = &JFactory::getMailer();
$senderEmail = $mainframe->getCfg('mailfrom');
$senderName = $mainframe->getCfg('fromname');
$mail->setSender(array($senderEmail, $senderName));
$mail->setSubject(JText::_('K2_COMMENT_REPORT'));
$mail->IsHTML(true);     
$body = "
<strong>".JText::_('K2_NAME')."</strong>: ".$name." <br/>
<strong>".JText::_('K2_REPORT_REASON')."</strong>: ".$reportReason." <br/>
<strong>".JText::_('K2_COMMENT')."</strong>: ".nl2br($row->commentText)." <br/>
";        
$mail->setBody($body);
$mail->ClearAddresses();
$mail->AddAddress($params->get('commentsReportRecipient', $mainframe->getCfg('mailfrom')));
$mail->Send();

Just before this code:
[code]                $response->message = JText::_('K2_COMMENT_ADDED_AND_WAITING_FOR_APPROVAL');
                $response->cssClass = 'k2FormLogSuccess';
                echo json_encode($response);
            }
        }
        $app->close();
    }
[/code]

 
Last edit: 1 week 5 days ago by Goble002.

Please Log in or Create an account to join the conversation.

  • Goble002
  • Goble002's Avatar Topic Author
  • Away
  • Premium Member
More
1 week 5 days ago #178579 by Goble002
Replied by Goble002 on topic K2 Comments - Notifications
I have found this in the meantime :

getk2.org/extend/extensions/k2notify

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 week 5 days ago #178588 by Fotis
Replied by Fotis on topic K2 Comments - Notifications
I don't think it'll work, it's outdated. There are plan to modernize this plugin at some point in the future...

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum