Keyword

how do u enable notifcations of comments

  • Brad Steenkamp
  • Brad Steenkamp's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #64192 by Brad Steenkamp
how do u enable notifcations of comments was created by Brad Steenkamp
I have comments set to require approval, but need a way for either the admin or the author to be notified that there is a new comment waiting for approval. Is there a plugin for it, or is it already built in (which i would image it is)

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

More
13 years 2 months ago #64193 by william white
Replied by william white on topic Re: how do u enable notifcations of comments
Ill have to look at 2.5.5 to see, not sure.
for 2.4.1, check out k2autonotify at K2joom.com (will be updated for 2.5.5 hopefully in the near future)

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

  • Brad Steenkamp
  • Brad Steenkamp's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #64194 by Brad Steenkamp
Replied by Brad Steenkamp on topic Re: how do u enable notifcations of comments
I am unfortunately using joomla 1.7 (of which its not compatible), so really hoping its available in 2.5.5

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

  • Brad Steenkamp
  • Brad Steenkamp's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #64195 by Brad Steenkamp
Replied by Brad Steenkamp on topic Re: how do u enable notifcations of comments
Is there any other route to achieve notification of comments? It really sounds like something that would be built in! Im unfortunately using joomla 1.7, so can use the addon module. Please, there must be another way to achieve this!!

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

More
13 years 2 months ago #64196 by william white
Replied by william white on topic Re: how do u enable notifcations of comments
As far as i know, unless you use another commenting system, there is not.
I am also waiting on the upgrade...

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

More
13 years 2 months ago #64197 by Dan Grant
Replied by Dan Grant on topic Re: how do u enable notifcations of comments
Does anyone know if v2.5.5 addressed any of this?

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

More
13 years 2 months ago #64198 by william white
Replied by william white on topic Re: how do u enable notifcations of comments
He's working on it
see his home page post at www.jiliko.net/

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

More
13 years 1 month ago #64199 by Dan Grant
Replied by Dan Grant on topic Re: how do u enable notifcations of comments
Thanks William. Looks like Mr.Nolbert is back hot on the trail!

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

More
13 years 1 month ago - 13 years 1 month ago #64200 by rawling
Replied by rawling on topic Re: how do u enable notifcations of comments
Work and tested for K2.5.6 with recaptcha ON or OFF and joomla 2.5.2 and google email account.

1. Site-configuration-server-post (or edit configuration.php):

public $mailer = 'smtp';
public $smtphost = 'smtp.gmail.com';
public $smtpsecure = 'ssl';
public $smtpport = '465';
and add your google email login and password:
public $smtpuser = '';
public $smtppass = '';

2. Edit file components\com_k2\models\item.php

Near line 1018 seek last 3 line of end of function comment() :
This email address is being protected from spambots. You need JavaScript enabled to view it. with your  mail for notification (or more mail wia comma)
4. add to your k2.ini language file:
K2_NEWCOMMENT_EMAIL="New comment from my site"

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

More
13 years 1 month ago #64201 by william white
Replied by william white on topic Re: how do u enable notifcations of comments
@rawling Do you have skypename>??

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

More
13 years 1 month ago #64202 by rawling
Replied by rawling on topic Re: how do u enable notifcations of comments
I have skype, but i not speak by english.
Better write my by email - This email address is being protected from spambots. You need JavaScript enabled to view it.

About my previous post: this code work on my real site and localhost (denwer) with php mail function.
This code of mail notification was taken and adapte from free old plugin k2_autoarchiver: getk2.org/community/New-to-K2-Ask-here-first%21/10843-k2-autoarchiver-plugin

Instead gmail can use other mail servers that forward mail to SMTP protocol. This is better than use php mail function (for example for Acymailing), the SMTP certifcate of mail server (in this case gmail) better of certificate of your hosting, ensure that the mails does not put into spam.

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

More
13 years 1 month ago #64203 by anoush
thanks, works with k2 2.5.1 joomla 2.5.2 and local mta
i didn't understand since in comment preference there's email field for report

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

More
13 years 3 weeks ago #64204 by rawling
Replied by rawling on topic Re: how do u enable notifcations of comments
New added:

1) IP address
2) URL of K2 item with komment
$mailer =& JFactory::getMailer();
			$config =& JFactory::getConfig();
			$sender = array(
			$config->getValue( 'config.mailfrom' ),
			$config->getValue( 'config.fromname' ) );
			$mailer->setSender($sender);
 			$recipient = explode(",", "[email protected], [email protected]");
			$mailer->addRecipient($recipient);
			$mailer->setSubject(JText::_('K2_NEWCOMMENT_EMAIL'));
			$userIP = $_SERVER['REMOTE_ADDR'];
			$baselink = '<a href="'. JURI::base();
			$link = K2HelperRoute::getItemRoute($item->id.':'.urlencode($item->alias), $item->catid.':'.urlencode($item->category->alias)). '">Comment Link</a>';
			if  (!trim($commentURL)=="") {
				  $commentURL = "Site: ". $commentURL. "<br>";
			}
			$body = 'Name: '. $userName.  '<br/>'. 'E-mail: '. $commentEmail. '<br/>'. $commentURL. 'Comment: '. $commentText. '<br/>'. 'IP: '.$userIP. '<br/>'. 'Comment Link: '.$baselink. $link;
 			$mailer->setBody($body);
			$mailer->isHTML(true);
			$mailer->Send();

		}

 		$mainframe->close();
	}

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

More
12 years 9 months ago #64205 by Paul Boutin
Replied by Paul Boutin on topic Re: how do u enable notifcations of comments
YOU ROCK RAWLING :woohoo: :woohoo: :woohoo: :woohoo: :woohoo:

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

More
12 years 8 months ago #64206 by robm
Wonderfull thanks!

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

More
11 years 11 months ago #64207 by Tim Lord
Replied by Tim Lord on topic Re: how do u enable notifcations of comments
Hi there,

I've just tried to implement this now on a client site but adding the code to the configuration.php breaks the whole site before I can go any further.

I am trying it on a Joomla 3 site running K2 2.6.6 and it looks like the code is a bit different in the K2 php files as well.

Do you think this could work on Joomla 3 and on the latest version of K2 and if so could you offer any advice on the same please? I really need to get this implemented and it is driving me crazy!

Many thanks in advance

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


Powered by Kunena Forum