Hi,
I am using Article Factory Manager together with JomSocial. I wold love for greater integration between the two. (And I think you can tell by the number of times the topic "Integration with JomSocial" have been read, that I am not the only one. ) It would probably mean a greater exposure for Article Manager, and possible more revenue for you guys aswell. Now to my specific question, and also a good start to offer some practical steps on how to start.
My suggestion would be to start the integration by creating a plugin that will add an "activity" into JomSocials activity stream, whenever a users publishes a new article.
Luckily: there is already a plugin that does the same for normal content (com_content).
And while I am not a programmer- I am guessing that it wouldn't take too much of an effort to adapt this existing plugin to also work with Article Factory Manager?
If someone could help me in the right direction I would be more then willing to help out with testing this.
How do I change this plugin to also work with com_articleman ?---
Here are the bits I THINK are the most relevant pieces of code, but I have also attached the original plugin as a zip-file.
Examples of code:
require_once( JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php' );
require_once( JPATH_ROOT . DS . 'components' . DS . 'com_content' . DS . 'helpers' . DS . 'route.php');Comment: Need to include articleman somehow, maybe with this?
// include Article Manager Component.
require_once(JPATH_SITE . DS . "components" . DS . "com_articleman" . DS . "class" . DS . "articleman_engine.php");
Then, instead of using the standard route - helper, I think I should use articleman somehow in the section below, right?
// Add activity logging
CFactory::load ( 'libraries', 'activities' );
$act = new stdClass();
$my = CFactory::getUser( $article->created_by );
$message = $this->params->get( 'newarticlemessage' , '{multiple}{actors}{/multiple}{single}{actor}{/single} added a new article' );
$link = JRoute::_( ContentHelperRoute::getArticleRoute( $article->id . ':' . $article->alias , $article->catid , $article->sectionid ) );
$message .= ' <a href="' . $link .'">' . $article->title . '</a>';
$act->cmd = 'article.create';
$act->actor = $my->id;
$act->target = 0;
$act->title = JText::_( $message );
$act->content = $article->text;
$act->app = 'article';
$act->cid = $my->id;
CActivityStream::add( $act );