wiki:AddCommentMacro

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

Comment added

Add comments to wiki pages

Description

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

Download

AddCommentMacro for 0.8.
AddCommentMacro for 0.9

Source

You can check out the source for AddCommentMacro from Subversion at http://trac-hacks.org/svn/addcommentmacro.

Example

Comment by athomas on Mon 29 Nov 2004 21:48:09 EST

This is a comment, with WikiFormatting.

Comment by athomas on Mon 29 Nov 2004 22:00:56 EST

This is another comment, at a later date.

Comment by anonymous on Tue 07 Dec 2004 04:14:57 EST

This is really great, thanks!

Comment by anonymous on Mon 03 Jan 2005 21:09:19 EST

Kauf mich...

Comment by anonymous on Sat 26 Feb 2005 13:02:20 EST

Test

Comment by anonymous on Fri 11 Mar 2005 05:02:28 EST

testing a comment

Comment by somerandomperson on Tue 15 Mar 2005 11:10:07 EST

Comment with a made up username

Comment by Davo on Sun 27 Mar 2005 23:30:11 EST

Very Interesting. Let's if wiki things work in here.

Code

Comment by anonymous on Wed 20 Apr 2005 17:46:03 EST

?@>25@:0

Comment by anonymous on Wed 04 May 2005 07:42:01 EST

Does this work with the current trunk? Is there any further documentation? Testing this on my SandBox page, when I clicked Add Comment, it took me to WikiStart#commentpreview.

Comment by anonymous on Tue 17 May 2005 22:25:41 EST

See http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/AddComment.py for an updated version - I wish I've been able to add it on this site, but I do not have a login here, and the escape sequence are in trouble inside the AddComment macro ;-)

Comment by athomas on Wed 18 May 2005 01:56:58 EST

Thanks for the new version, I'll add it with a note that is for trunk.

You could have logged a ticket though, this being Trac ;)

Comment by eblot on Sat 04 Jun 2005 04:18:27 EST

The recent update in Trac engine 1701 enforces security checks with POST HTTP method.

A dirty workaround is to edit the macro, replace "method='post'" with "method='get'", around line 81.

I think that the [[AddMacro]] should be embedded in the official trac macro store.

Comment by athomas on Tue 07 Jun 2005 00:10:32 EST

I had a look at trunk but I think I'll stick with coding against 0.8.x as trunk is a bit too much pain to keep track of.

Comment by alexkw@… on Fri 17 Jun 2005 13:40:55 EST

After installing AddComment to 0.8.3 and adding the [[AddComment]] macro, I get this:

Error: Macro AddComment(None) failed
No module named wiki.formatter

Any ideas?

Comment by anonymous on Thu 23 Jun 2005 10:26:07 EST

The same problem as alexkw@….. any suggestions?

Comment by athomas on Mon 27 Jun 2005 10:42:41 EST

The version of AddCommentMacro for trunk will not work with 0.8.x. Download the version for Trac < 0.9.

Comment by George Bush on Fri Aug 19 00:29:02 2005

I'm hungry! Someone get me a pretzel...

Comment by Shib on Thu Sep 22 20:12:40 2005

Indifference will certainly be the downfall of mankind, but who cares?

Comment by anonymous on Thu Sep 22 20:30:24 2005

----
[
== '''''[
{{{

----

}}}
]''''' ==
]

Comment by anonymous on Wed 21 Dec 2005 19:04:56 EST

good macro!

Comment by neotyk on Sat 31 Dec 2005 03:50:14 AM EST

in polish: czad!!!

Comment by ddd on Fri 13 Jan 2006 02:30:14 AM EST

hello world


Comment by anonymous on Fri 20 Jan 2006 01:48:26 AM EST

test hello world

AddComment(appendonly)?

Author/Contributors

Author: athomas
Contributors: eblot (ported Trac to trunk)

TagIt(macro,athomas,0.8,0.9,eblot)?