Version 51 (modified by anonymous, 9 years ago) (diff)


Add comments to wiki pages


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

==== Comment by <user> on <date> ====

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. 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.


Easy Install instructions for installing latest versions of the macro:

Trac 0.10.x

$> easy_install
$> easy_install

Trac 0.11.x

$> easy_install
$> easy_install


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


AddCommentMacro for 0.8.
AddCommentMacro for 0.9.
AddCommentMacro for 0.10.
AddCommentMacro for 0.11.
Download as a zip file [download:addcommentmacro here].


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


You can check out the source for AddCommentMacro from Subversion at

Change Log

16765 by rjollos on 2017-08-26 02:58:15
TracAddCommentMacro 0.3: Add license info
16760 by rjollos on 2017-08-25 18:54:20
TracAddCommentMacro 0.3: Run autopep8 on codebase
16397 by rjollos on 2017-03-25 09:37:00
Remove obsolete "0.9" code
16395 by rjollos on 2017-03-25 09:25:02
Remove obsolete "0.8" directories
8746 by osimons on 2010-09-10 14:25:48
AddCommentMacro: New name for anonymous was not picked up. Fixes #4710. Thanks for the patch!


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