In the ActivityData page i put this code and now i'm able to have statistics. I know it's temporary (poor database performances), but i hope it helps people having the same problem (sorry for the code quality, i'm sure it can be improved) :
#set($pattern='yyyy.MM.dd') #set($step=86400000) #set($scope=$xwiki.criteriaService.scopeFactory.ALL_PAGES) #set($dtf = $xwiki.jodatime.getDateTimeFormatterForPattern($pattern)) #set($interval=$xwiki.criteriaService.rangeFactory.createAllRange()) 1 Current week activity #set($currentPeriod=$xwiki.criteriaService.periodFactory.currentWeek) #set($periodStart=$xwiki.jodatime.getDateTime($currentPeriod.start)) #set($periodEnd=$xwiki.jodatime.getDateTime($currentPeriod.end)) #set($datejour=$periodStart.getMillis()) #set($nbElt = ($periodEnd.getMillis() - $periodStart.getMillis()) / $step) {table} Date | Views | Edit #foreach($i in [1..7]) #set($datefinjour=$datejour + $step) #set($period=$xwiki.criteriaService.periodFactory.createPeriod($datejour,$datefinjour)) #set($stats=$xwiki.statsService.getDocumentStatistics("view",$scope,$period,$interval)) #set($totalViews=0) #if($stats.size() > 0) #foreach($item in $stats) #set($docStats = $xwiki.getDocument($item.name)) #if ($docStats) #set($totalViews=$totalViews+$item.pageViews) #end #end #end #set($stats=$xwiki.statsService.getDocumentStatistics("save",$scope,$period,$interval)) #set($totalSave=0) #if($stats.size() > 0) #foreach($item in $stats) #set($docStats = $xwiki.getDocument($item.name)) #if ($docStats) #set($totalSave=$totalSave+$item.pageViews) #end #end #end $dtf.print($datejour) | $totalViews | $totalSave #set($datejour=$datefinjour) #end {table} -----Message d'origine----- De : users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] De la part de Dilipkumar Jadhav Envoyé : mardi 10 mars 2009 12:43 À : users@xwiki.org Objet : Re: [xwiki-users] Stats module configuration Hello friends, I've tried placing the new xwiki-plugin-jodatime-1.3.jar. Restarted tomcat and still no statistics. The result set like another friend said is still : NULL There is definitely valid data in the stats tables (when i query it through Sqlyog). Thank you.... _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -------------------------------------------------------------------------------- This e-mail is intended only for the addressee named above. It does not bind the sender, except in the case of an existing written convention with the addressee. This e-mail may contain material that is confidential and privileged for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender and delete all copies. While reasonable precautions have been taken to ensure that this e-mail and any attachments are free from any computer virus or similar defect, no liability will be accepted in that respect. Anyone accessing this e-mail must take their own precautions as to security and virus protection. KBL European Private Bankers S.A., 43 boulevard Royal L-2955 Luxembourg, R.C.S. Luxembourg B 6395, T (352) 47 97 1 _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users