wiki:AddCommentMacro

Version 55 (modified by rjollos, 2 years ago) (diff)

Added link to Trac repository browser.

Add comments to wiki pages

Description

The AddCommentMacro allows for easy addition of comments to a page, in a standard format. Each comment is added in the following form:

==== Comment by <user> on <date> ====
<comment-body>

The comment body supports normal TracWiki WikiFormatting.

Comments are added after the first line that starts with [[AddComment]].

The AddCommentMacro supports previewing and adheres to the TracPermissions scheme, only allowing comments to be added if the user has write access to the page.

Since [21] the AddCommentMacro can fulfill the role of an append only Wiki page. By passing the argument appendonly to the macro, comments can be appended to the page even when the user does not have permission to modify the page. This is potentially unsafe, but can be useful.

Bugs/Feature Requests

Existing bugs and feature requests for AddCommentMacro are here.

If you have any issues, create a new ticket.

Install

Easy Install instructions for installing latest versions of the macro:

Trac 0.10.x

$> easy_install http://trac-hacks.org/svn/macropostplugin/0.10
...
$> easy_install http://trac-hacks.org/svn/addcommentmacro/0.10
...
Done.

Trac 0.11.x and 0.12.x

$> easy_install http://trac-hacks.org/svn/macropostplugin/0.11
...
$> easy_install http://trac-hacks.org/svn/addcommentmacro/0.11
...
Done.

Trac.ini

Don't forget to add:

macropost.web_ui.macropostmodule = enabled
addcomment.* = enabled

to the [components] section of trac.ini, or use the WebAdmin interface to enable both plug-ins

Download

Download all versions as a zip file.

Requirements

You need to install MacroPostPlugin first, or the 'preview' and 'submit' buttons won't work.

Source

You can check out AddCommentMacro from here using Subversion, or browse the source with Trac.

Change Log

[8746] by osimons on 2010-09-10 16:25:48
AddCommentMacro: New name for anonymous was not picked up. Fixes #4710. Thanks for the patch!
[8745] by osimons on 2010-09-10 16:12:32
AddCommentMacro: Not raise an error for permission issue. Render the form with all fields disabled instead. Closes #4959.
[3887] by osimons on 2008-06-23 12:58:56

AddCommentMacro:

  • Wiki page preview got us a double set of editing toolbars. Fixed.
  • Also adding some extra logging and deleting the redirect marker in search of possible issue with redirect (that I can't replicate).

Author/Contributors

Author: athomas
Maintainer: osimons
Contributors: eblot (ported Trac to trunk), osimons (0.11 version)