Attention:

Do not try this on your live site. Always make a backup before and have a testing environment ready for this. If you do not have all items of the required ones, you do not need to go for this, it will not work.

Achievement:

Have a unique stream for each EasyBlog article that fully synchronizes with the EasySocial main stream. This unique stream shows items only created on that page. These items will appear on the main stream as well and if commented there, the comments will be on the article page synchronized in both ways.
Therefor the EasyBlog stream item created for each published article has to be inside the Stream anywhere module instead of the EasySocial main stream.

Requirements:

EasySocial - EasyBlog - User Blog App - Stream Anywhere module

How to:

Open /administrator/components/com_easyblog/includes/easysocial/easysocial.php and search for:


public function createBlogStream($blog, $isNew)

if (!$this->exists()) {
return false;
}

$postLib = EB::post($blog->id);
$stream = FD::stream();
$template = $stream->getTemplate();


Do not change this but insert the following code after the above one:


$url = EBR::_('index.php?option=com_easyblog&view=entry&id='.$blog->id);
$url = JString::str_ireplace( 'MENUITEM/' , '' , $url );
$anywhere_id = $url;
$template->setCurrentUrl($anywhere_id);
$params = new stdClass;
$params->pageTitle = !empty($pageTitle) ? $pageTitle : $blog->getTitle();
$template->setParams($params);


If you have a menu item for EasyBlog "create new article" we need to hide that part inside the url. Therefor you have to replace the "MENUITEM/" in the above code in line 3 by the alias of your menu item followed by a slash!

Be aware that an override of this file is not possible and you have to make a backup before and replace the file manually after each update.

This section can only be seen by users with a valid subscription.
If you have a valid subscription, please login now

Support is
Offline

It is currently off working hours and most of us aren't around.

Rest assured that we will get back to your issues as soon as the day starts tomorrow!

Your time
Stack Ideas time