Index: openacs-4/packages/xowiki/xowiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v diff -u -r1.60.2.3 -r1.60.2.4 --- openacs-4/packages/xowiki/xowiki.info 13 Sep 2007 12:39:37 -0000 1.60.2.3 +++ openacs-4/packages/xowiki/xowiki.info 2 Nov 2007 11:31:42 -0000 1.60.2.4 @@ -8,7 +8,7 @@ f xowiki - + Gustaf Neumann A more generic xotcl-based wikis example with object types and subtypes based on the content repository (with category support) @@ -53,12 +53,12 @@ BSD-Style 0 - + - + Index: openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/Attic/xowiki-portlet-procs.tcl,v diff -u -r1.83.2.10 -r1.83.2.11 --- openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 23 Oct 2007 12:05:13 -0000 1.83.2.10 +++ openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 2 Nov 2007 11:31:42 -0000 1.83.2.11 @@ -721,6 +721,46 @@ namespace eval ::xowiki::portlet { ############################################################################# # + # list the most frequent visitors + # + + Class create most-frequent-visitors \ + -superclass ::xowiki::Portlet \ + -parameter { + {title "Most Frequent Users"} + {parameter_declaration { + {-max_entries:integer "15"} + }} + } + + most-frequent-visitors instproc render {} { + my get_parameters + ::xowiki::Page requireCSS "/resources/acs-templating/lists.css" + + TableWidget t1 -volatile \ + -columns { + Field user -label Visitors -html { align right } + Field count -label Visits -html { align right } + } + db_foreach [my qn get_pages] \ + [::xo::db::sql select \ + -vars "sum(count) as sum, user_id" \ + -from "xowiki_last_visited" \ + -groupby "user_id" \ + -orderby "sum desc" \ + -limit $max_entries] { + t1 add \ + -user [::xo::get_user_name $user_id] \ + -count $sum + } + return [t1 asHTML] + } + +} + +namespace eval ::xowiki::portlet { + ############################################################################# + # # Display unread items # # Currently moderately useful