×
Kunena 5.1.7 Released - Security Release (20 Nov 2018)

The Kunena team has announce the arrival of Kunena 5.1.7 [K 5.1.7] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1. This is a Security release.

× 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 11 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
4 years 1 week ago - 4 years 1 week 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: 4 years 1 week 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.117 seconds