×
Blue Eagle (1.5.0) for K5.1 is released (20 Jul 2018)

Please update the Kunena Blue Eagle to 1.5.0 if you use Kunena 5.1.
We made several bug fixes and improvements. Also Blue Eagle has now all the features from Crypsis.
Download: www.kunena.org/download/templates/category/blue-eagle-5

× This is not a support forum for JomSocial or its related products. For JomSocial support you should visit JomSocial .

The information given in this category is intended to guide users who want to use JomSocial with Kunena and, mostly, was written by Kunena users. The information here is not necessarily accurate, up-to-date nor is it intended to replace the support given by the developers of JomSocial.

If you are having problems then, for your own benefit, it would save us all a lot of time if you would kindly post your configuration report when you ask for help from this forum. If you do not post your configuration report we will not ask you for it but you will probably not get your problem solved, either.

Question Showing new replies to thread in JomSocial notifications?

More
4 years 7 months ago #1 by ComposerRyan
Hi, I am using the latest versions of Kunena and Jomsocial for Joomla 3 and was needing to know if it was possible to show new replies to thread in JomSocial's notifications system.

If so, that would be great! I would love to be notified of when someone has replied to my topic on the forums, as this would make a MAJOR difference.

Any ideas?

Thanks for your help and Kunena ROCKS! Have a Happy Holiday,

Ryan

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

More
3 years 8 months ago - 3 years 8 months ago #2 by xamire
open this file : plugins/kunena/community/activity.php

inside public function onAfterReply bracket
find this piece of code:
// Do not add private activities
if ($act->access > 20) return;
CFactory::load ( 'libraries', 'activities' );
CActivityStream::add ( $act );

then add this code :
This text is hidden from guests
		//add by imari.co use it at your own risk! It might slow your site some, but it shouldn't.
		//add notif after reply
		$user =& JFactory::getUser();
		$posturl = $message->getPermaUrl();
		$actorname = $user->name;
		$db =& JFactory::getDbo();
		$date	=& JFactory::getDate();
		$query = $db->getQuery(true);
		$query = "SELECT userid FROM #__kunena_messages WHERE thread = '$message->thread' AND userid != '$user->id' GROUP BY userid";
		$db->setQuery($query);
		$results = $db->loadObjectList();
		$jumlah = count($results);
		if($jumlah > 0) {
			foreach($results as $hasil) {
				$poster[] = $hasil->userid;
			}
			$jmlposter = count($poster);
			for($i=0;$i<$jmlposter;$i++) {
				$rep = new stdClass();
				$rep->id = null;
				$rep->actor = $message->userid;
				$rep->target = $poster[$i];
				$rep->content = '{actor} has replied to your forum topic : {msg}';
				$rep->type = 0;
				$rep->cmd_type = 'notif_forum_reply';
				$rep->status = 0;
				$rep->created = $date->toMySQL();
				$rep->params = '{"url":"'.$posturl.'","msg_url":"'.$posturl.'","msg":"'.$message->subject.'","actor":"'.$actorname.'","actor_url":"index.php?option=com_community&view=profile&userid='.$user->id.'"}';
				$db->insertObject('#__community_notifications', $rep);
			}
		}

change this code to your own language:
$rep->content = '{actor} has replied to your forum topic : {msg}';

it means that {actor} has replied your forum topic : {msg}
Last edit: 3 years 8 months ago by xamire.

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to add attachements.
  • Not Allowed: to edit your message.
Time to create page: 0.077 seconds