Foros de discusión
Most commented, most viewed journal articles
X Man, modificado hace 12 años.
Most commented, most viewed journal articles
Junior Member Mensajes: 41 Fecha de incorporación: 5/01/12 Mensajes recientes
Hello
My task is to develop a portlet that will display the latest, most commented and most viewed Journal articles?
So, How can I achieve that?
To get the latest, most commented and most viewed Journal articles:
Do I need to use the dynamic queries? Or I will use service layer of Liferay
Thank you in advance
My task is to develop a portlet that will display the latest, most commented and most viewed Journal articles?
So, How can I achieve that?
To get the latest, most commented and most viewed Journal articles:
Do I need to use the dynamic queries? Or I will use service layer of Liferay
Thank you in advance
Tejas Kanani, modificado hace 12 años.
RE: Most commented, most viewed journal articles
Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes
Hi X Man,
You can use Asset Publisher portlet for your requirement. Just use Asset type "Web Content" and Order By "View count" and that will list down all the journal articles based on their view counts so far.
You can use Asset Publisher portlet for your requirement. Just use Asset type "Web Content" and Order By "View count" and that will list down all the journal articles based on their view counts so far.
X Man, modificado hace 12 años.
RE: Most commented, most viewed journal articles
Junior Member Mensajes: 41 Fecha de incorporación: 5/01/12 Mensajes recientes
Tejas Kanani, thank you.
But Asset publisher does not get the most commented article, so how can I get them?
Thank you
But Asset publisher does not get the most commented article, so how can I get them?
Thank you
Tejas Kanani, modificado hace 12 años.
RE: Most commented, most viewed journal articles
Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes
Yes. Asset publisher has capability to display comments but it does not have any option to display results sorted by no of comments.
To combine all conditions in one shot, creating a new portlet and get all the articles using custom query is the best option.
To combine all conditions in one shot, creating a new portlet and get all the articles using custom query is the best option.
Jignesh Vachhani, modificado hace 12 años.
RE: Most commented, most viewed journal articles
Liferay Master Mensajes: 803 Fecha de incorporación: 10/03/08 Mensajes recientes
Hi
You can go with custom query concept of liferay.
For more details about custom query, you can check http://www.liferaysolution.com/2012/03/custome-query.html
You can go with custom query concept of liferay.
For more details about custom query, you can check http://www.liferaysolution.com/2012/03/custome-query.html
Hitoshi Ozawa, modificado hace 12 años.
RE: Most commented, most viewed journal articles
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
If you want to write you own porlet, here is some information on view count.
http://issues.liferay.com/browse/LPS-723
Comments are stored in a MBMessage which can be accessed by MBMessageLocalServiceImpl.
http://docs.liferay.com/portal/6.0/javadocs/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.html
http://issues.liferay.com/browse/LPS-723
Comments are stored in a MBMessage which can be accessed by MBMessageLocalServiceImpl.
http://docs.liferay.com/portal/6.0/javadocs/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.html
X Man, modificado hace 12 años.
RE: Most commented, most viewed journal articles
Junior Member Mensajes: 41 Fecha de incorporación: 5/01/12 Mensajes recientes
Thank you guys.
Jignesh Vachhani, I checked your link:
public List findBooks(String name) throws SystemException {
Session session = null;
session = openSession();
How can I get Session object?
I searched for openSession( ) method, it is in HibernateUtil.openSession() but I did not find this class in liferay 6.1
Thank you
Jignesh Vachhani, I checked your link:
public List findBooks(String name) throws SystemException {
Session session = null;
session = openSession();
How can I get Session object?
I searched for openSession( ) method, it is in HibernateUtil.openSession() but I did not find this class in liferay 6.1
Thank you
X Man, modificado hace 12 años.
RE: Most commented, most viewed journal articles
Junior Member Mensajes: 41 Fecha de incorporación: 5/01/12 Mensajes recientesSorry, Jignesh Vachhani
I did not notice that I will extend BasePersistenceImpl
I will try again.
Thank you
resmi joseph, modificado hace 11 años.
RE: Most commented, most viewed journal articles
New Member Mensajes: 18 Fecha de incorporación: 2/02/11 Mensajes recientes
How did u get the most commented and most viewed journal article? Is it though custom portlet code ? created any custom table or used mbmessage table?
Jignesh Vachhani, modificado hace 11 años.
RE: Most commented, most viewed journal articles
Liferay Master Mensajes: 803 Fecha de incorporación: 10/03/08 Mensajes recientes
Reshmi,
we can use custom query and to learn custom query, you can check http://www.liferaysolution.com/2012/03/custome-query.html
Best,
Jignesh
we can use custom query and to learn custom query, you can check http://www.liferaysolution.com/2012/03/custome-query.html
Best,
Jignesh
Jitendra Rajput, modificado hace 9 años.
RE: Most commented, most viewed journal articles
Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
For most viewed journal articles you can user Popular Journal Article app available on Liferay market place.