MoinComments

Description

This is a collection of macros that enable blog like user comments on page by page basis. I'm developing this macros here.

The following macros are defined:

To install all you have to do is copy the py files under macro to your macro directory.

Configuration

You may define on your wiki configuration the following options:

Option

Description

comment_moderate

(Default: True) If enabled the comments will be copied to a moderation queue and have to be accepted/rejected by a moderator

comment_moderators

(Default: None) Mail new comment notification to a list of comma separated email addresses, use None to disable (available in svn r35)

comment_subscribed_notify

(Default: False) If true the users that subscribe the page where the comment was posted will be notified.

comment_passpartout_group

(Default: PasspartoutGroup) MoinMoin user group. The users defined on this group will not be moderated or have captchas shown.

comment_approval_page

(Default: CommentsApproval) This is the page name where the moderation queue is shown. Please note that the 'ApproveComments' macro must be present somewhere on this page. Also, this page is not auto-created, you have to create it at set the appropriate ACLs on it.

comment_store_addr

(Default: False) If enabled the commenter IP address will be saved in the comment file.

comment_cmt_per_page

(Default: 50) Number of comments to show per page. After this number pagination controls will be shown.

comment_recaptcha

(Default: False) If enabled the user will have to fill out a captcha (of the reCAPTCHA variety). Naturally if you want to use a reCAPTCHA you must also provide the following configuration options.

comment_recaptcha_public_key

(Default: None) String with the reCAPTCHA public key

comment_recaptcha_private_key

(Default: None) String with the reCAPTCHA private key

comment_recaptcha_use_ssl

(Default: False) Make the reCAPTCHA requests using ssl

This options should be defined on the wiki configuration file. None of this options is mandatory.

Download & Release Notes

Download

Release Version

Moin Version

Release Notes

moin-comments-0.1.tar.gz

0.1

1.8

-

moin-comments-0.2.tar.gz

0.2

1.9

-

Usage

On the pages where you want to have comments you must include:

<<AddComment>>

This will display a standard dialog to enter blog like comments.

To display the comments use:

<<Comments()>>

This will display the comments on the current page.

If you choose to have moderated comments you have to create the page where the moderation will take place. By default this page is: CommentsApproval on that page you must have the ApproveComments macro somewhere.

Wishlist

Feel free to add features you want to see implemented on these macros. Note that I can't promise that all features will be implemented!

Copyright © José Lopes, HelderGuerreiro

License

GPL

Bugs

In comments.css is a bug, that supresses the cell boarders of a table with border-style: none !important;.
Instead of of one .comments_form th, td { it must be two blocks with .comments_form th { and .comments_form td {.
-- RudolfReuter 2012-03-09 14:43:42

Discussion

I gave a try. Great work, I must say! Here is my feedback:

  1. This is a great approach to let people who don't know wikies leave comments.
  2. File macro/Comments.py, svn revision 31, line 128:

                max_pages = ( number_messages / cmt_per_page +
                            (1 if number_messages % cmt_per_page else 0 ))

    made my Python complain. I changed it to

                if number_messages % cmt_per_page:
                    offset = 1
                else:
                    offset = 0
                max_pages = ( number_messages / cmt_per_page + offset )
  3. I did an @import of your supplied CSS into mine, but it completely messed it up. I should take time to investigate a bit more.

  4. A clickable link (with some javascript behind) to show/hide the Add Comment box would be nice, because it takes a lot of space. Hidden by default.
  5. All labels of the Add Comment box should be configurable.
  6. The comments should be displayed in a much more compact way.
  7. When a new comment awaits approval, an e-mail should be sent to a user specified in the config.
  8. When a new comment is accepted, an e-mail should be sent to all users subscribed to the page.

If you plan to implement (some of) the above, but lack time, please just ask me for help. -- -- PascalBauermeister 2009-09-26 20:06:36


Hello José, thank you for that very useful macro. I found a new application: Contact Email. That avoids spam (no need for a captcha), and you can moderate the text too.

In the file wikiconfig.py you add 2 parameters:

comment_moderate = False
comment_subscribed_notify = True

By the way, it would be nice to update the file INSTALL with the new parameters.

Then you title your macro AddComment with Contact Email and subscribe the page. Text to insert into the page:

=== Contact Email ===
<<AddComment>>

When the user clicks on Send comment, the subscriber of the page will get the comment message as an Email.

Beware, when you test that function, you have to log out before you send, otherwise no Email will be send, because a notification Email is not send to the owner of the page.
-- RudolfReuter 2011-03-16 17:16:25

Great Work! -- DuffDave 2011-09-14 18:47:17


MoinMoin: MacroMarket/MoinComments (last edited 2012-09-28 14:38:04 by HelderGuerreiro)