Tags:
create new tag
view all tags

Question

I'm embarrassed to see now that the code for this is readily available on the Support.WebHome home page, since I spent way too long trying to find out how to do this! The question/issue was how to create a list of just top contributors to the Wiki, along with the number of pages they've saved. The motivation was that perhaps people will be more inclined to contribute if they can "see their name in lights", or get some kind of social credit for contributing. There's always the WebChanges page, of course, but that doesn't show the top contributors in order. I'm documenting the solution here in the hopes that someone else won't have to spend quite as much time as I did figuring this out.

-- AnthonyRThompson - 22 Jul 2003

Answer

The solution is the code currently on Support.WebHome:

%TABLE{ sort="off" dataalign="left" }%
|*Top Contributors  <font size="-1">([[WebStatistics][more]])</font>*|
%INCLUDE{"%STATISTICSTOPIC%" pattern=".*?\-\-statTopContributors\-\-\>[^\|]+\|[^\|]+\|[^\|]+\|[^\|]+\|[^\|]+\|[^\|]+\|[^\|]+(\|[^\|]+\|).*"}%

What that does, based on my limited understanding of TWiki so far, is include the entire WebStatistics topic/page but search (grep) for a specific line. In this case, the line has --statTopContributors-->, several pipe separators, and then the magic cell with the top contributors ranked by number of topic saves. The pattern above is rather cryptic (at least on first glance), but the crux of it is that the part in parentheses (at the end) is what is ultimately returned to the including page.

Now, if only you could massage the output a but, such as turning it into a bulleted list... Oh well, at least there's such a list of top contributors at all smile

-- AnthonyRThompson - 22 Jul 2003

Thanks Anthony! Set from AskedQuestions to AnsweredQuestions.

-- PeterThoeny - 23 Jul 2003

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2003-07-23 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.