Set this up:
[[Jot? &action=`comments` &placeholders=`1` &output=`0` &subscribe=`0` ¬ifyAuthor=`0` &captcha=`0` &canmoderate=`Site Admins` &canpost=`Registered Users` &canedit=`Registered Users` &pagination=`5` &tplComments=`CustomComments`]]
[+jot.html.comments+]
[+jot.html.form+]
Chunk: CustomComments:
<div class="jot-content">
<div class="jot-mod">
[+jot.user.canedit:is=`1`:and:if=`[+comment.createdby+]`:is=`[+jot.user.id+]`:or:if=`[+jot.moderation.enabled+]`:is=`1`:then=`
<a href="[+jot.link.edit:esc+][+jot.querykey.id+]=[+comment.id+]#jf[+jot.link.id+]" onclick="return confirm('Are you sure you wish to edit this comment?')" title="Edit Comment"><img src="[(base_url)]manager/media/style/MODx/images/icons/logging.gif" width="16" height="16" alt="Edit Comment" border="0" /></a><br />
`:strip+]
</div><br />
<div style="border:1px solid #fff;" class="jot-message">[+comment.content:wordwrap:esc:nl2br:parseLinks+]</div>
</div>
Now you need to log in as a user with maximum rights of ’Registered Users’ and post a comment by removing
&action=`comments`. This because if you post it as site admin a registered user
can’t edit this post. When post it put back &action=`comments` and it should work.
I haven’t made a custom tpl for editing form and there is still much to do, then you will need to assign your users to their own user group in order only being able to change their comments.
//You might remove parseLinks from comment placeholder, its a phx modifier I have for automatic linking!
<?php
/*
* phx:parseLinks
*/
$t = $output;
$t = ereg_replace("[a-zA-Z]+://([.]?[a-zA-Z0-9_/-])*", "<a rel='noindex, nofollow' target='_blank' href=\"\\0\">\\0</a>", $t);
$t = ereg_replace("(^| |\n)(www([.]?[a-zA-Z0-9_/-])*)", "\\1<a rel='noindex, nofollow' target='_blank' href=\"http://\\2\">\\2</a>", $t);
return $t;
?>
http://modxcms.com/forums/index.php/topic,31194.msg189230.html#msg189230