Merge branch 'master' of http://git.fucktheforce.de/blogthon
This commit is contained in:
commit
953be3681a
14
blogthon.cgi
14
blogthon.cgi
@ -140,9 +140,21 @@ else: # Show regular entry
|
|||||||
for line in content:
|
for line in content:
|
||||||
print ' ' + line.strip() + '<br />'
|
print ' ' + line.strip() + '<br />'
|
||||||
if comments == "True":
|
if comments == "True":
|
||||||
|
comments_file = glob.glob(entries_dir + title + '.comments')
|
||||||
|
print str(comments_file)
|
||||||
|
if not comments_file:
|
||||||
print ' <div class="comment">'
|
print ' <div class="comment">'
|
||||||
print ' <ul><li><a href=? class="comment">comments</a></li></ul>'
|
print ' <ul><li><a href=? class="comment">no comments</a></li></ul>'
|
||||||
print ' </div><br />'
|
print ' </div><br />'
|
||||||
|
else:
|
||||||
|
comments_content = open(comments_file[0], "r")
|
||||||
|
comments_counter = 0
|
||||||
|
for line in comments_content:
|
||||||
|
if line.split(".", 1)[0] == "-": comments_counter += 1
|
||||||
|
print ' <div class="comment">'
|
||||||
|
print ' <ul><li><a href=? class="comment">comments (' + str(comments_counter) + ')</a></li></ul>'
|
||||||
|
print ' </div><br />'
|
||||||
|
comments_content.close()
|
||||||
|
|
||||||
print ' </p></div>'
|
print ' </p></div>'
|
||||||
print ' <br /><br />'
|
print ' <br /><br />'
|
||||||
|
8
entries/Demo.comments
Normal file
8
entries/Demo.comments
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
-. xeno Sun Mar 1 12:00:00 2009
|
||||||
|
.Hi,
|
||||||
|
.
|
||||||
|
.I hope you like my software. To delete this entry, just delete the file
|
||||||
|
.entries/Demo.comments.
|
||||||
|
.
|
||||||
|
.Best regards,
|
||||||
|
.xeno
|
@ -73,8 +73,8 @@ a.entrytitle:link, a.entrytitle:hover, a.entrytitle:visited, a.entrytitle:active
|
|||||||
}
|
}
|
||||||
|
|
||||||
a.comment:link, a.comment:hover, a.comment:active, a.comment:visited {
|
a.comment:link, a.comment:hover, a.comment:active, a.comment:visited {
|
||||||
font-family: Arial;
|
font-family: Helvetica;
|
||||||
font-size: 8px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: set tw=0 ts=4:
|
# vim: set tw=0 ts=4:
|
||||||
|
Loading…
Reference in New Issue
Block a user