diff --git a/blogthon.cgi b/blogthon.cgi
index 4cd53aa..6cdea07 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -285,17 +285,27 @@ else:
print ' '
print ''
- print '
'
-
- if static_display != "": # Show Staticpage
+ # Staticpage
+ if static_display != "":
content = open(staticpages_dir + static_display, "r")
- print '
' + re.sub('\d+?-', '', static_display) + '
'
- print '
'
+ print '
'
+ print '
' + re.sub('\d+?-', '', static_display) + '
'
+ print '
'
+ print '
'
for line in content:
print ' ' + line.strip() + ' '
- print '
'
+ print ' '
+ print '
'
+ print ' '
+ print ' '
+ print '
'
+ print '
'
+ print '
'
+ print '
'
+ print '
'
content.close()
- else: # Show regular entry
+ # Entry
+ else:
entry_counter = 0
for entry in entries:
date = time.strftime("%c", entry[0])
@@ -308,72 +318,82 @@ else:
if post_display == title or not post_display:
if allentries_display == "1" or entry_counter < entries_per_page:
content = open(entry, "r")
+ print '
'
if permalinks:
- print '
'
+ print '
'
else:
- print '
' + title + ' (' + date + ')
'
- print '
'
+ print '
' + title + '
'
+ print '
'
for line in content:
print ' ' + line.strip() + ' '
-
- # Comments are shown when post_display and comments_file
+ print '
'
+ print ' '
+ print ' '
+ print '
'
+ print '
'
+ print '
'
+ print '
'
+ print '
'
+ print ''
+
+ # Comments...
+ # ... are shown when post_display and comments_file isn't false
comments_file = glob.glob(entries_dir + title + '.comments')
if post_display:
if comments_file:
- print '
'
comments_file = glob.glob(entries_dir + title + '.comments')
comments_content = open(comments_file[0], "r")
+ print ' '
+ print ''
comments_content.close()
# Form for adding comments
random_int_a = random.randint(1,9)
random_int_b = random.randint(1,9)
cquizv = random_int_a + random_int_b
-
- print '
'
- print '
'
+ print '
'
+ print ' '
+ print ' '
+ print ' name: '
+ print ' text: '
+ print ' ' + str(random_int_a) + '+' + str(random_int_b) + '= '
+ print ' '
+ print ' '
if comments == "True":
comments_file = glob.glob(entries_dir + title + '.comments')
if not comments_file and not post_display:
- print ' '
+ print ' '
elif comments_file and not post_display:
comments_content = open(comments_file[0], "r")
comments_counter = 0
for line in comments_content:
if line.split(".", 1)[0] == "-": comments_counter += 1
- print ' '
+ print ' '
comments_content.close()
-
- print '
'
- print '
'
+
content.close()
entry_counter += 1
if not month_display and not post_display and not allentries_display and entry_counter == entries_per_page: # Display pagelist
print '
'
- print '
'
+ print ''
print '
' - print ' ' + line.split(".", 1)[1].strip() + ' wrote at ' + print '
' + print '
' + print '
' + print '