X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/0017d477fca613825981de879b2bd219bef177c5..69065b8e79cce13648db711ed1fefaf6f41713fd:/doc/todo/supporting_comments_via_disussion_pages.mdwn?ds=sidebyside diff --git a/doc/todo/supporting_comments_via_disussion_pages.mdwn b/doc/todo/supporting_comments_via_disussion_pages.mdwn index 4f2096594..50bc17ba3 100644 --- a/doc/todo/supporting_comments_via_disussion_pages.mdwn +++ b/doc/todo/supporting_comments_via_disussion_pages.mdwn @@ -1,4 +1,7 @@ -I would love to see more traditional support for comments in ikiwiki. One way would be to structure data on the discussion page in such a way that a "comment" plugin could parse it and yet the discussion page would still be a valid and usable wiki page. +I would love to see more traditional support for comments in ikiwiki. One +way would be to structure data on the discussion page in such a way that a +"comment" plugin could parse it and yet the discussion page would still be +a valid and usable wiki page. For example if the discussion page looked like this: @@ -16,7 +19,9 @@ For example if the discussion page looked like this: mauris ut felis. Vestibulum risus nibh, adipiscing volutpat, volutpat et, lacinia ut, pede. Maecenas dolor. Vivamus feugiat volutpat ligula. -Each header marks the start of a new comment and the line immediately following is the comments meta data (author, email/url, datestamp). Hopefully you could structure it in such a way that the scope +Each header marks the start of a new comment and the line immediately +following is the comments meta data (author, email/url, datestamp). +Hopefully you could structure it in such a way that the scope This would allow: @@ -28,4 +33,130 @@ This would allow: Is this simple enough to be sensible? --- [[AdamShand]] \ No newline at end of file +-- [[AdamShand]] + +> Well, if it's going to look like a blog, why not store the data the same +> way ikiwiki stores blogs, with a separate page per comment? As already +> suggested in [[discussion_page_as_blog]] though there are some things to +> be worked out also discussed there. +> --[[Joey]] + +>> I certainly won't be fussy about how it gets implemented, I was just trying to think of the lightest weight most "wiki" solution. :-) -- Adam. + +>>> As a side note, the feature described above (having a form not to add a page but to expand it in a formated way) would be useful for other things when the content is short (timetracking, sub-todo list items, etc..) --[[hb]] + +I've been looking into this. I'd like to implement a "blogcomments" +plugin. Looking at the code, I think the way to go is to have a +formbuilder_setup hook that uses a different template instead of the +standard editpage one. That template would not display the editcontent +field. The problem that I'm running into is that I need to append the new +content to the old one. + +-- [[MarceloMagallon]] + +> Anything I can do to help? --[[Joey]] + +>> Figured it out. Can you comment on the code below? Thanks. -- [[MarceloMagallon]] + +So, I have some code, included below. For some reason that I don't quite get it's not updating the wiki page after a submit. Maybe it's something silly on my side... + +What I ended up doing is write something like this to the page: + + [[blogcomment from="""Username""" timestamp="""12345""" subject="""Some text""" text="""the text of the comment"""]] + +Each comment is processed to something like this: + +
Text of the comment...
+
\n}; + $r .= '- ' . gettext("From") . "
- $from
\n" if defined $from;
+ $r .= '- ' . gettext("Date") . "
- $date
\n" if defined $date;
+ $r .= '- ' . gettext("Subject") . "
- $subject
\n"
+ if defined $subject;
+ $r .= "
\n" . $text . "