0
My JomSocial integration does not seem to be working right. Comments are not showing up in the stream. Also, curious if you have a provision somewhere for adding notice of a new Playlist made.
I found your jomsocial.xml and jomsocial.php in the plugins/muscol/jomsocial/ folder.
I tried to add a song notification with the following,
In the jomsocial.xml file I added the field,
Then in the jomsocial.php file I added,
function onSaveSong($song_id)
{
if(file_exists( JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php') && $this->params->get('notify_song')){
CFactory::load( 'libraries' , 'activities' );
$user = JFactory::getUser();
$link = MusColHelper::routeSong($song_id);
$link = str_replace("administrator/", "", $link);
$act = new stdClass();
$act->actor = $user->id;
$act->target = 0;
$act->title = "{actor} ".JText::_('ADDED_SONG')." " . JRequest::getVar('name') ."" ;
$act->app = 'myalbums';
$act->cid = $user->id;
CActivityStream::add($act);
include_once JPATH_ROOT.'/components/com_community/libraries/core.php';
include_once JPATH_ROOT.'/components/com_community/libraries/userpoints.php';
CuserPoints::assignPoint('muscol.add.asong');
}
}
The three lines after the CActivityStream::add($act); were an attempt to add User Points to saving a song.
I also put a jomsocial_rule.xml file in /components/com_muscol/jomsocial_rule.xml
com_muscol
Play Song
Give point when a Song is played.
muscol.play.asong
true
1
1
This has the User Point for Adding a Song being registered in the JomSocial User Points but they are not working. Neither the add Song showing up in the stream or and points being added is working. They say to put the rule file in the components directory and it didn't register until I did that. When Albums are created they are showing on the wall and giving points and I set up the points for that the same way. I cannot get Added Comments to show or give points and have not been able to either get added Songs to show or get points for them.
I figure I am leaving out a needed helper or something and wondered if you could help. I really need to get this working.
Thanks for any help you may be able to give.
I found your jomsocial.xml and jomsocial.php in the plugins/muscol/jomsocial/ folder.
I tried to add a song notification with the following,
In the jomsocial.xml file I added the field,
Then in the jomsocial.php file I added,
function onSaveSong($song_id)
{
if(file_exists( JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php') && $this->params->get('notify_song')){
CFactory::load( 'libraries' , 'activities' );
$user = JFactory::getUser();
$link = MusColHelper::routeSong($song_id);
$link = str_replace("administrator/", "", $link);
$act = new stdClass();
$act->actor = $user->id;
$act->target = 0;
$act->title = "{actor} ".JText::_('ADDED_SONG')." " . JRequest::getVar('name') ."" ;
$act->app = 'myalbums';
$act->cid = $user->id;
CActivityStream::add($act);
include_once JPATH_ROOT.'/components/com_community/libraries/core.php';
include_once JPATH_ROOT.'/components/com_community/libraries/userpoints.php';
CuserPoints::assignPoint('muscol.add.asong');
}
}
The three lines after the CActivityStream::add($act); were an attempt to add User Points to saving a song.
I also put a jomsocial_rule.xml file in /components/com_muscol/jomsocial_rule.xml
This has the User Point for Adding a Song being registered in the JomSocial User Points but they are not working. Neither the add Song showing up in the stream or and points being added is working. They say to put the rule file in the components directory and it didn't register until I did that. When Albums are created they are showing on the wall and giving points and I set up the points for that the same way. I cannot get Added Comments to show or give points and have not been able to either get added Songs to show or get points for them.
I figure I am leaving out a needed helper or something and wondered if you could help. I really need to get this working.
Thanks for any help you may be able to give.
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »