From 5d2010c6e107e9bd7044b951695db233e77531f3 Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Sun, 8 Mar 2009 18:07:16 +0100 Subject: Comments: * Added a first form with a name and a text field * Some little fixes --- blogthon.cgi | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'blogthon.cgi') 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 '

' + print '

' 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 '
' - print ' ' + line.split(".", 1)[1] + ' wrote at ' + print '
' + print ' ' + line.split(".", 1)[1].strip() + ' wrote at ' elif line.split(".", 1)[0] == "+": - print ' ' + line.split(".", 1)[1] + ':
' + print ' ' + line.split(".", 1)[1].strip() + ':

' else: line = line.split(".", 1)[1] - print '   ' + line.strip() + '
' + print '   ' + line.strip() + '
' comments_content.close() + # Form for adding comments + print '


' + print '
' + print ' ' + print '
' + print '
' + print '
' + if comments == "True": comments_file = glob.glob(entries_dir + title + '.comments') if not comments_file and not post_display: -- cgit v1.2.3