掲示板

Most commented, most viewed journal articles

12年前 に X Man によって更新されました。

Most commented, most viewed journal articles

Junior Member 投稿: 41 参加年月日: 12/01/05 最新の投稿
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
thumbnail
12年前 に Tejas Kanani によって更新されました。

RE: Most commented, most viewed journal articles

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
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.
12年前 に X Man によって更新されました。

RE: Most commented, most viewed journal articles

Junior Member 投稿: 41 参加年月日: 12/01/05 最新の投稿
Tejas Kanani, thank you.
But Asset publisher does not get the most commented article, so how can I get them?

Thank you
thumbnail
12年前 に Tejas Kanani によって更新されました。

RE: Most commented, most viewed journal articles

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
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.
thumbnail
12年前 に Jignesh Vachhani によって更新されました。

RE: Most commented, most viewed journal articles

Liferay Master 投稿: 803 参加年月日: 08/03/10 最新の投稿
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
thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: Most commented, most viewed journal articles

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
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
12年前 に X Man によって更新されました。

RE: Most commented, most viewed journal articles

Junior Member 投稿: 41 参加年月日: 12/01/05 最新の投稿
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
12年前 に X Man によって更新されました。

RE: Most commented, most viewed journal articles

Junior Member 投稿: 41 参加年月日: 12/01/05 最新の投稿
emoticon
Sorry, Jignesh Vachhani
I did not notice that I will extend BasePersistenceImpl
I will try again.

Thank you
11年前 に resmi joseph によって更新されました。

RE: Most commented, most viewed journal articles

New Member 投稿: 18 参加年月日: 11/02/02 最新の投稿
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?
thumbnail
11年前 に Jignesh Vachhani によって更新されました。

RE: Most commented, most viewed journal articles

Liferay Master 投稿: 803 参加年月日: 08/03/10 最新の投稿
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
thumbnail
9年前 に Jitendra Rajput によって更新されました。

RE: Most commented, most viewed journal articles

Liferay Master 投稿: 875 参加年月日: 11/01/07 最新の投稿
For most viewed journal articles you can user Popular Journal Article app available on Liferay market place.