]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/allow_displaying_number_of_comments.mdwn
make it more generic?
[ikiwiki.git] / doc / todo / allow_displaying_number_of_comments.mdwn
1 My `numcomments` Git branch adds a `NUMCOMMENTS` `TMPL_VAR`, which is
2 useful to add to the `forumpage.tmpl` template to emulate (the nice
3 bits of) a more usual webforum.
4
5 Please review... and pull :)
6
7 -- [[intrigeri]]
8  
9 > How is having this variable for showing a count of the comments 
10 > better (or more forum-ish) than the COMMENTSLINK variable which
11 > includes a count and a link to the comments, and is already displayed
12 > in inlinepage.tmpl?
13
14 > `num_comments` will never return undef.
15
16 > I see no need to add a second pagetemplate hook.
17 > The existing one can be added to. Probably inside its `if ($shown)`
18 > block.
19
20 > It may also be a good idea to either combine the calls to `num_comments`
21 > used for this and for the commentslink, 
22 > or to memoize it. I'm thinking generally memoizing it may be a good idea
23 > since the comments for a page will typically be counted twice when it's
24 > inlined.
25 > --[[Joey]] 
26
27 [[patch]]
28
29 >> Well, the COMMENTSLINK variable fits my needs. Sorry for
30 >> the disturbance. [[done]] --[[intrigeri]]