New version of comments module, must more reliable and polished.
This commit is contained in:
parent
75ca494424
commit
f71c7866f4
2 changed files with 113 additions and 44 deletions
|
|
@ -1,26 +1,27 @@
|
|||
% cdir = $local_path^'_werc/comments'
|
||||
% if(test -d $cdir) {
|
||||
<hr /><h2>Comments</h2>
|
||||
% for(c in `{ls $cdir/}) {
|
||||
<div><b>By: <i>
|
||||
% cat $c/user
|
||||
</i></b>
|
||||
<br />
|
||||
% cat $c/body | escape_html | sed 's,$,<br />,'
|
||||
<hr /></div>
|
||||
% }
|
||||
% }
|
||||
|
||||
<hr />
|
||||
|
||||
% notices_handler
|
||||
% # XXX should post to bridge_post or similar
|
||||
<form action="" method="post">
|
||||
<textarea name="comment_text" id="comment_text" cols="80" rows="16"></textarea>
|
||||
<textarea name="comment_text" id="comment_text" cols="80" rows="16">%($"saved_comment_text%)</textarea>
|
||||
<br />
|
||||
<input type="hidden" name="document_uri" value="%($req_path%)" />
|
||||
<input type="submit" name="post_comment" value="Post a comment" />
|
||||
% if(! check_user) {
|
||||
<label>User: <input type="text" name="comment_user_name" value="" /></label>
|
||||
<label>Password: <input type="password" name="comment_user_password" value="" /></label>
|
||||
<div style="font-size: 70%">If you are not registered enter your desired user/password and your account will be created when your comment is approved.</div>
|
||||
|
||||
% if(~ $#logged_user 0 && ! ~ $#allow_new_user_comments 0) {
|
||||
<label>New user name:
|
||||
<input type="text" name="comment_user" value="%($"post_arg_comment_user%)" />
|
||||
</label>
|
||||
|
||||
<label>Password:
|
||||
<input type="password" name="comment_passwd" value="" />
|
||||
</label>
|
||||
|
||||
<label>Repeat password:
|
||||
<input type="password" name="comment_passwd2" value="" />
|
||||
</label>
|
||||
<div style="font-size: 70%">
|
||||
Enter your desired user name/password and after your comment has been reviewed by an addmin it will be posted and your account will be enabled. If you are already registered please <a href="/_users/login">login</a> before posting.
|
||||
</div>
|
||||
% }
|
||||
</form>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue