aboutsummaryrefslogtreecommitdiffstats
path: root/blogthon.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'blogthon.cgi')
-rwxr-xr-xblogthon.cgi31
1 files changed, 17 insertions, 14 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index 6cdea07..a56dc28 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -285,10 +285,11 @@ else:
print ' </div>'
print ''
+ print ' <div class="entries">'
+ print ''
# Staticpage
if static_display != "":
content = open(staticpages_dir + static_display, "r")
- print ' <div class="entry">'
print ' <div class="entry_title">' + re.sub('\d+?-', '', static_display) + '</div>'
print ' <div class="entry_content">'
print ' <p>'
@@ -302,7 +303,6 @@ else:
print ' <div class="entry_border_right"></div>'
print ' <div class="entry_border_top"></div>'
print ' <div class="entry_border_bottom"></div>'
- print ' </div>'
content.close()
# Entry
else:
@@ -318,7 +318,6 @@ else:
if post_display == title or not post_display:
if allentries_display == "1" or entry_counter < entries_per_page:
content = open(entry, "r")
- print ' <div class="entry">'
if permalinks:
print ' <div class="entry_title"><a href="?p=' + title + '" class="entry_title">' + title + '</a></div>'
else:
@@ -333,8 +332,6 @@ else:
print ' <div class="entry_border_right"></div>'
print ' <div class="entry_border_top"></div>'
print ' <div class="entry_border_bottom"></div>'
- print ' </div>'
- print ''
# Comments...
# ... are shown when post_display and comments_file isn't false
@@ -343,6 +340,9 @@ else:
if comments_file:
comments_file = glob.glob(entries_dir + title + '.comments')
comments_content = open(comments_file[0], "r")
+ print ''
+ print ' </div>'
+ print ''
print ' <div class="comments">'
for line in comments_content:
if line.split(".", 1)[0] == "-":
@@ -354,7 +354,6 @@ else:
print ' <div class="comments_content">'
print ' ' + line.strip() + '<br />'
print ' </div>'
- print ' </div>'
print ''
comments_content.close()
@@ -362,14 +361,15 @@ else:
random_int_a = random.randint(1,9)
random_int_b = random.randint(1,9)
cquizv = random_int_a + random_int_b
- print ' <form action="" method="post">'
- print ' <input type="hidden" name="ctitle" value="' + title + '" />'
- print ' <input type="hidden" name="cquizv" value="' + str(cquizv) + '" />'
- print ' <label for="cname">name:</label><input type="text" id="cname" name="cname" />'
- print ' <br /><label for="ctext">text:</label><textarea rows="5" cols="80" id="ctext" name="ctext"></textarea>'
- print ' <br /><label for="cquiz">' + str(random_int_a) + '+' + str(random_int_b) + '=</label><input type="text" id="cquiz" name="cquiz" />'
- print ' <br /><input type="submit" id="submit" value="post comment" />'
- print ' </form>'
+ print ' <form action="" method="post">'
+ print ' <input type="hidden" name="ctitle" value="' + title + '" />'
+ print ' <input type="hidden" name="cquizv" value="' + str(cquizv) + '" />'
+ print ' <label for="cname">name:</label><input type="text" id="cname" name="cname" />'
+ print ' <br /><label for="ctext">text:</label><textarea rows="5" cols="80" id="ctext" name="ctext"></textarea>'
+ print ' <br /><label for="cquiz">' + str(random_int_a) + '+' + str(random_int_b) + '=</label><input type="text" id="cquiz" name="cquiz" />'
+ print ' <br /><input type="submit" id="submit" value="post comment" />'
+ print ' </form>'
+ print ''
if comments == "True":
comments_file = glob.glob(entries_dir + title + '.comments')
@@ -377,6 +377,7 @@ else:
print ' <div class="entry_comments">'
print ' <a href="?p=' + title + '" class="entry_comments">no comments</a>'
print ' </div>'
+ print ''
elif comments_file and not post_display:
comments_content = open(comments_file[0], "r")
comments_counter = 0
@@ -385,6 +386,7 @@ else:
print ' <div class="entry_comments">'
print ' <a href="?p=' + title + '" class="entry_comments">comments (' + str(comments_counter) + ')</a>'
print ' </div>'
+ print ''
comments_content.close()
content.close()
@@ -393,6 +395,7 @@ else:
if not month_display and not post_display and not allentries_display and entry_counter == entries_per_page: # Display pagelist
print ' <div class="entry"><a href=?a=1>View all entries...</a></div>'
+ print ' </div>'
print ''
print ' </body>'
print '</html>'