Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.
Can not like a custom CActivityStream::add() entry
I am posting custom messages onto user's timelines using the
Stream API
. This is working very well, except that if someone Likes the entry in the stream, it doesn't show up after a refresh.
I had the exact same problem first (comments not showing up) and managed to fix this thanks to the example in that thread. However I can't find a solution for the Likes.
My code looks like this:
$act = new stdClass();
$act->cmd = 'wall.write';
$act->actor = $user->getId();
$act->target = 0;
$act->title = $translator->translate('Book review');
$act->content = "I posted a review of a book.";
$act->app = 'mycomponent.system';
$act->access = 20;
CFactory::load('libraries', 'activities');
$act->comment_type = 'profile.status';
$act->comment_id = CActivities::COMMENT_SELF;
CActivityStream::add($act);
Please you also create your the stream rule, you can see the sample / you can add new xml inside this file components/com_community/jomsoical_rule.xml
Did you know that we also provide Private Support Tickets?
Just use this form:
www.jomsocial.com/submit-support
Support provided that way is much faster and all your license details are added to the ticket so you don't need to send them :)
Should I still add something to jomsocial_rule.xml then? And if so, what exactly? Does that also mean I will have to update that file each time I upgrade JomSocial?
If you want I 'll create a private support ticket but this seems like an issue other people might be interested in too?