Keyword

K2 Add Jomsocial Activity Stream

More
13 years 3 weeks ago #99683 by Ilia
K2 Add Jomsocial Activity Stream was created by Ilia
Hey all,

How to make a Aktiviti Stream function adds only after publication, not after  save?

Here's a hack, the problem with the publication and the author.

 In administrator/components/com_k2/models/item.php ~ Line 632case 'save':default:add this altered version of Nico's code,//
//jomsocial activity stream include$JSinstallchk = JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php';//activity stream - added a blogif ( file_exists($JSinstallchk)) {require_once($JSinstallchk);}$contentTitle = $row->title;$link = 'index.php?option=com_k2&view=item&id='.$row->id.;$item->link=$link;$act = new stdClass();$act->cmd = 'wall.write';$act->actor = $user->id;$act->target = 0; // no target$act->title = JText::_('{actor} has created blog link.'"'>'.$contentTitle.'');$act->content = '';$act->app = 'wall';$act->cid = 0;CFactory::load('libraries', 'activities');CActivityStream::add($act);//

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


Powered by Kunena Forum