Tags:
create new tag
view all tags

Question

  • I want to count the number of topics in our twiki in order to show its growth over time.
  • I tried to use the Spreadsheet plugin but it does not work. I used %CALC{"$SET(my_var, %TOPICLIST{"$name, "}%) $LISTSIZE($GET(my_var)) "}%
  • It would be great if I could count only the topics created by the users of the wiki except the topics that exists after installation.
  • Thanks for your help.

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RedHat
Web server: Apache
Perl version: I think 5.005 (I am not admin of the server, only for the wiki)
Client OS: MS Windows XP service pack 2
Web Browser: Internet Explorer 6
Categories: Missing functionality

-- KirstinWeber - 19 Apr 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

If you use CALC you need to make sure that there are now newlines. TOPICLIST adds newlines between topics. This is the proper format:

%CALC{$SET(topics, $LISTSIZE(%TOPICLIST{"$name" separator=", "}%))$GET(topics)}%

You could do this for each web, using $SETM(topics, + ...).

Alternatively do a FormattedSearch on all webs, excluding TWiki web. The format parameter is as follows: format="$percntCALC{$SETM(topics, + 1)}$percnt"..

-- PeterThoeny - 19 Apr 2007

Thanks for your help. The first solution works fine. But I do not understand the second one because it is to short. I do not know how to replace the dots. The third solution looks good but I do not know which text I have to add. Without specifying a search text nothing happens.

-- KirstinWeber - 20 Apr 2007

On second option, read the docs at SpreadSheetPlugin. The ... is the same list manipulation of the first option, e.g. $LISTSIZE(%TOPICLIST{"$name" separator=", "}%)

For the third option see VarSEARCH docs. Do a search for ".*" with type="regex" to catch all topics, something (untested) like:

%SEARCH{ ".*" scope="topic" type="regex" nonoise="on" web="all, -TWiki" format="$percntCALC{$SETM(topics, + 1)}$percnt"" }%

-- PeterThoeny - 20 Apr 2007

Thanks. I have read the documentation but I didn't understand it. Now I have understood your explanations and examples. I'm German and sometimes it is easier to understand an example than the explanation in a documentation.

-- KirstinWeber - 23 Apr 2007

Change status to:
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2007-04-23 - KirstinWeber
 
  • 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.