« 返回到 Portlets

Top Users portlet

The Top Users portlet shows the social equity scores and ranks of users within a community. The ranking is competition style, so don't be surprised to see a ranking such as 1,2,2,4.

The ranks are calculated on a daily basis, but the scores are real time, so there can be some discrepancies. The ranking is done by adding the contribution and participation scores, so it is based on personal equity.

The portlet only shows users who has a rank greater than zero, which means that a user will not be shown in the portlet on the first day he/she gets the first equity score.

1 附件
28971 查看
平均 (2 票)
满分为 5,平均得分为 4.0。
评论
讨论主题回复 作者 日期
I am desperately trying to give users rankings... Puj Z 2010年12月2日 下午2:04
Hi i have some user in top list ..... how can... Kristian Umek 2011年6月2日 上午7:53

I am desperately trying to give users rankings according to their social equity. For this, I used this method to get the scores in my jsp:
<%@ page import="com.liferay.portlet.social.service.SocialEquityUserLocalServiceUtil" %>
<%=SocialEquityUserLocalServiceUtil.getParticipationEquity(PortalUtil.getUserI­d(request)).getValue()%>
and
<%=SocialEquityUserLocalServiceUtil.getContributionEq­uity(PortalUtil.getUserId(request)).getValue()%>

But it throws NullPointerException at this line when trying to use the dynamic query to get the projectionList:

DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass( SocialEquityUser.class);

The Exception:

15:03:35,406 ERROR [jsp:154] java.lang.NullPointerException
at org.hibernate.criterion.DetachedCriteria.forClass(DetachedCriteria.java:88)
at com.liferay.portal.dao.orm.hibernate.DynamicQueryFactoryImpl.forClass(DynamicQue­ryFactoryImpl.java:35)
at com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil.forClass(DynamicQueryF­actoryUtil.java:23)
at com.liferay.portlet.social.service.impl.SocialEquityUserLocalServiceImpl.getEqui­tyValue(SocialEquityUserLocal
ServiceImpl.java:75)

Am I missing anything? Should I set something somewhere beforehand?
The socialEquityLog is active and the top user portlet shows my user with c-score 10 and p-score 5 already (I checked socialEquityLog table and there are two actions added for this user too).

Is there any other way to request the c-score and p-score of a specific user?
在 10-12-2 下午2:04 发帖。
Hi

i have some user in top list ..... how can remove (reset a rank) user from top users list ???

I delete a user which was in top list ... and now have a blank photo with no data in list ... how can delete this blank space in top users list ?????

by

thanks
在 11-6-2 上午7:53 发帖。