I've made a sub-page because I have some fairly lengthy suggestions for changing the Comments2 macro. I'm not proposing to change the core functionality in any way, but merely to tighten up the user interface in various ways.

User Interface

The following images are screenshots of the current version and mockups of how I envision a slightly tweaked user interface.

CommentsLoggedIn.png CommentsLoggedOut.png

This is mainly just collecting the buttons and misc. fields together in one place. When someone has read an article or information page, they usually have a comment in the front of their mind -- Let them write that first and then worry about their name, password and emoticons later :)

There is no need to show the password field when the user is logged in since it cannot be changed anyway. The password field in my version is fairly short (to save space), but this is not a very high security item so tho password doesn't have to be very long.

Anonymous posting

I would further suggest that the user be allowed to enter a message without entering a password. The comment would still appear in the list of comments, but the user will be offered a random password that can be used to delete the message later. This makes it easier to quickly enter a message without having to understand what the password feature is. When entering a message without a password, the following message could appear:

You did not enter a password. Your message has been posted and the following random password has been generated for you: h75sfjAh If you wish to delete your message later, click the red X and enter this password.

That will make it self-explanatory and next time the user can pick his/her own password, or just ignore it again.

HelpOnComments page

An optional help link or help icon could be placed within or near the comments area (the latter doesn't require any change to the macro). This lead to a separate page in the wiki with a brief explanation of the comments feature, including the password and the smileys. Example:

A wiki admin installing the comments feature would also copy this page into the underlay directory (unless the comments macro makes it into the default install ...). The contents of a sample HelpOnComments page is pasted follows:



Smileys

You can also select a smiley from the drop-down box. The following symbols are available.

Markup Display Markup Display Markup Display Markup Display
X-( X-( :D :D <:( <:( :o :o
:( :( :) :) B) B) :)) :))
;) ;) /!\ /!\ <!> <!> (!) (!)
:-? :-? :\ :\ >:> >:> |) |)
:-( :-( :-) :-) B-) B-) :-)) :-))
;-) ;-) |-) |-) (./) (./) {OK} {OK}
{X} {X} {i} {i} {1} {1} {2} {2}
{3} {3} {*} {*} {o} {o}    



logged_in_another_proposal.jpg If you want to have multiple comment areas on one page, reducing the size of the GUI is important. -- AndyCrews 2024-05-03 10:33:21

CommentsLoggedIn-2.png

CommentsLoggedIn-3.png

This feature could be enabled by a parameter like smileys=1 and similarly flags=1. Which symbols are included in each of those lists could be defined in an array at the start of the PageComments.py file. -- HenrikOmma

It is helpful for the comments to be numbered so people can refer to each other's comments and carry on conversation or rebuttal. This is how WordPress does it and I really like it. Also, I like their overall layout which I duplicated below (minus the bullets). Here is another layout link

  1. Comment first
    • Comment by Yompkee | 12/21/2005 - 5:00 pm
  2. Comment second
    • Comment by TroyK | 12/21/2005 - 5:30 pm
  3. Re: #2....... I know someone named Troy too.
    • Comment by Yompkee | 12/21/2005 - 5:50 pm
  4. Re: #1 I see you managed to make the first comment. Good job!!
    • Comment by DavidD | 12/21/2005 - 6:10 pm

Also, if the time (5:00 pm) is hyperlinked with a unique link or anchor, that would enable people to link to particular comments. It certainly isn't essential, just a "nice to have" feature.

Hide /PageCommentData from Navigation bar

If I have Navigation(children) macro in the page I see /PageCommentData in it. Is it posible to hide this link?

Bugs

Problems

  • When i delete comments, the wrong comment get's deleted. I have set cfg.datetime to cfg.date to display only date. Now I see comments get references by date. Can this be separated? The way they are displayed, and the way they are deleted? Or could they be deleted by some id other than date?-- JureKodzoman 2006-05-10 06:59:52

    • Epoch second value generated from mktime method could be a better key for a comment but it could cause a problem on the backward compatibility with the previous versions of pagecomment2. I'll take it into considerations on the next update. BTW, for quick resolution, try to make it remained as it does but change how to display the datetime as follows: Modify the showcomment() function as the following (around 862 line)
      •        htmlcommentitem = u'\n'.join(htmlcomment) % {
                    'cellstyle': cellstyle,
                    'icon': getsmiley(item['icon']),
                    'author': converttext(item['name']),
                    'text': converttext(item['text'], item['markup']),
                    #'date': item['date'],
                    'date': formatcfgdatetime(item['date']),
                    'delform': htmlcommentdel
                    }
        using this utility function (just append this code at the end of macro file),
           1 def formatcfgdatetime(strdatetime):
           2     import datetime
           3     request = Globs.macro.request
           4     try:
           5         EpochSeconds = time.mktime(time.strptime(strdatetime, request.cfg.datetime_fmt))
           6     except ValueError:
           7         return strdatetime
           8     now = datetime.datetime.fromtimestamp(EpochSeconds)
           9     if request.user.datetime_fmt:
          10         datetime_fmt = request.user.datetime_fmt
          11     else:
          12         datetime_fmt = request.cfg.datetime_fmt
          13     # OR custom datetime format
          14     #datetime_fmt = '%B %d, %Y'
          15     return now.strftime(str(datetime_fmt))
        

        Good luck -- SeungikLee 2006-05-11 09:31:01

  • Using MoinMoin in team environment, the PageComment2 macro has the problem of it's /PageCommentData pages #acl set to All: . Since none of my team users are allowed to view all pages, only the wiki admin can search through page comments. It would be nice for the /PageCommentData to have the same acl as it's parent. (This would clutter the RecentChanges page a bit - but it's worth the annoyance) RemcoBoerma 2008-02-25 10:25:00

CSS Idea

  • Instead of using hardcoded styles, please consider using CSS styles which can then be defined in screen.css? Or perhaps to make it someway that CSS stylsheet defined values override hardcoded styles. The problem is now that hardcoded values override those in css although classess are defined. I understand that not everyone has the will to edit CSS, especially if he uses more than one theme, but if it could be made to satisfy both it would be great -- JureKodzoman 2006-05-10 06:59:52

    • I'm sure that the macro goes with css at the future updates. Thanks. -- SeungikLee 2006-05-11 09:31:01

    • I took a stab at this in the patch I just posted in ../Patches. Take a look and see if it does about what you had in mind. I don't know if I got all of the hard-coded stuff out of the .py and into the .css, but it's at least a start. Regards, GlenWhitney 2007-01-07 02:10:00

Internationalisation?

  • How can be the macro messages easily translated to other languages? How could we make the macro better for wikis written in other languages than English? -- JózsefJároli 2007-03-26 10:51:41

MoinMoin: MacroMarket/PageComment2/Ideas (last edited 2009-11-09 06:54:19 by ThomasWaldmann)