diff options
author | Stefan Ritter <xeno@goliath.thehappy.de> | 2009-03-08 18:07:16 +0100 |
---|---|---|
committer | Stefan Ritter <xeno@goliath.thehappy.de> | 2009-03-08 18:07:16 +0100 |
commit | 5d2010c6e107e9bd7044b951695db233e77531f3 (patch) | |
tree | 996b13f6e15f645681074908b76a01dcbcf1b6a8 /blogthon.cgi | |
parent | e111b192fbf84915577b3388bd6ffbf60de5de8a (diff) |
Comments:
* Added a first form with a name and a text field
* Some little fixes
Diffstat (limited to '')
-rwxr-xr-x | blogthon.cgi | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/blogthon.cgi b/blogthon.cgi index 7a39863..5dd7d11 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -143,20 +143,28 @@ else: # Show regular entry # Comments are shown when post_display and comments_file comments_file = glob.glob(entries_dir + title + '.comments') if comments_file and post_display: - print ' <br><hr>' + print ' <br /><hr>' comments_file = glob.glob(entries_dir + title + '.comments') comments_content = open(comments_file[0], "r") for line in comments_content: if line.split(".", 1)[0] == "-": - print ' <br />' - print ' <i>' + line.split(".", 1)[1] + '</i><small> wrote at ' + print ' <br />' + print ' <b><i>' + line.split(".", 1)[1].strip() + '</i><small> wrote at ' elif line.split(".", 1)[0] == "+": - print ' ' + line.split(".", 1)[1] + ':</small><br />' + print ' ' + line.split(".", 1)[1].strip() + ':</small></b><br />' else: line = line.split(".", 1)[1] - print ' ' + line.strip() + '<br />' + print ' ' + line.strip() + '<br />' comments_content.close() + # Form for adding comments + print ' <br /><br /><br />' + print ' <form action=# method=get>' + print ' <label for="name">name:</label><input type="text" id="name" name="name">' + print ' <br /><label for="text">text:</label><textarea rows="5" id="text" name="text"></textarea>' + print ' <br /><input type="submit" id="submit" value="post comment">' + print ' </form>' + if comments == "True": comments_file = glob.glob(entries_dir + title + '.comments') if not comments_file and not post_display: |