Fórum

Portlet Activity & Stream

thumbnail
Jaynil A Bagdai, modificado 11 Anos atrás.

Portlet Activity & Stream

Regular Member Postagens: 119 Data de Entrada: 03/03/12 Postagens Recentes
I want to display custom message in activity feeds portlet, when user logged in.
Does any body know how to display custom message?

Thanks in advance.
thumbnail
Prakash Khanchandani, modificado 11 Anos atrás.

RE: Portlet Activity & Stream

Expert Postagens: 329 Data de Entrada: 10/02/11 Postagens Recentes
You can use hook to override the JSP in the activity feeds portlet to display your custom message.

If you require something else you can kindly elaborate on what you want.

Thanks
thumbnail
Jaynil A Bagdai, modificado 11 Anos atrás.

RE: Portlet Activity & Stream

Regular Member Postagens: 119 Data de Entrada: 03/03/12 Postagens Recentes
Prakash Thanks for your answer.
Here is my requirement.

Any custom portlet I add in portal and any activity I make on those portlets I want those activities to be displayed on activity feed portlet.
Apart from that I want to customize it in a way that I can specify that the activity should be displayed to all member's of portal or not.

Can you help me out in this?

Thanks
thumbnail
Prakash Khanchandani, modificado 11 Anos atrás.

RE: Portlet Activity & Stream

Expert Postagens: 329 Data de Entrada: 10/02/11 Postagens Recentes
You need to create a custom activity interpreter for your plugin portlet's entities and also there would be code modification required at service layer whenever you add and update your custom entities in the database.

Also you can check implementation of Blogs, Calendar, Wiki in liferay source for creating a social activity interpreter, starting point would be to check out the following files (in liferay source):
1) portal-web/docroot/WEB-INF/liferay-portlet.xml
2) look for this tag: <social-activity-interpreter-class>
3) And also look for the implementation classes like: com.liferay.portlet.blogs.social.BlogsActivityInterpreter

Hope this helps you get started.
thumbnail
Jaynil A Bagdai, modificado 11 Anos atrás.

RE: Portlet Activity & Stream

Regular Member Postagens: 119 Data de Entrada: 03/03/12 Postagens Recentes
I implemented same things but it looks like entry is being added in social activity table but I am not able to see it in activity portlet.

If I want to enable that activity from my hook of login then where should I specify class which extends BasicSocialActivityInterpreter?
How can I add that entry in liferay-portlet.xml?

Thanks
thumbnail
Prakash Khanchandani, modificado 11 Anos atrás.

RE: Portlet Activity & Stream

Expert Postagens: 329 Data de Entrada: 10/02/11 Postagens Recentes
what does login hook got to do with Social activity?

For every custom entity you create in custom plugin portlet which should be displayed as an activity you should make an ActivityInterpreter and specify it in liferay-portlet.xml of that portlet.
thumbnail
Jaynil A Bagdai, modificado 11 Anos atrás.

RE: Portlet Activity & Stream

Regular Member Postagens: 119 Data de Entrada: 03/03/12 Postagens Recentes
Here is my requirement that I am calling an API to authenticate user first from that API, so I have created hook for preLoginAction.
If user is not registered in liferay then I am creating user in liferay with UserLocalServicUtil class and when I add new user in liferay, I want to display a message in activity stream portlet that this user has been joined liferay.

I hope now you are clear with my requirement. Any idea of this kind of implementation.

Thanks