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
--
KirstinWeber - 19 Apr 2007
Answer
If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list 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#FuncSETM. 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