Edit the commens section in blogthon.cgi
This commit is contained in:
parent
8224638f1d
commit
40349e0713
31
blogthon.cgi
31
blogthon.cgi
@ -384,38 +384,39 @@ else:
|
||||
print ' </div>'
|
||||
print ''
|
||||
print ' <div class="comments">'
|
||||
print ' <div>'
|
||||
for line in comments_content:
|
||||
if line.split(".", 1)[0] == "-":
|
||||
print ' </div>'
|
||||
print ' <div class="comment">'
|
||||
print ' <div class="comment_author">' + line.split(".", 1)[1].strip() + '</div>'
|
||||
elif line.split(".", 1)[0] == "+":
|
||||
print ' <div class="comment_date">' + line.split(".", 1)[1].strip() + '</div>'
|
||||
#print ' <div class="comment_content">'
|
||||
else:
|
||||
line = line.split(".", 1)[1]
|
||||
print ' <div class="comment_content">'
|
||||
print ' ' + line.strip() + '<br />'
|
||||
print ' </div>'
|
||||
print ' </div>'
|
||||
print ''
|
||||
print ' </div>'
|
||||
comments_content.close()
|
||||
else:
|
||||
print ' </div>'
|
||||
print ''
|
||||
print ' </div>'
|
||||
print ' </div>'
|
||||
|
||||
# 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 ' <div class="submit_comment">'
|
||||
print ' <form action="" method="post">'
|
||||
print ' <input type="hidden" name="ctitle" value="' + title + '" />'
|
||||
print ' <input type="hidden" name="cquizv" value="' + str(cquizv) + '" />'
|
||||
print ' <label class="submit_comment_name">name:</label><input type="text" id="cname" name="cname" />'
|
||||
print ' <br /><label class="submit_comment_text">text:</label><textarea class="submit_comment_textarea" rows="5" cols="80" id="ctext" name="ctext"></textarea>'
|
||||
print ' <br /><label class="submit_comment_quiz">' + str(random_int_a) + '+' + str(random_int_b) + '=</label><input type="text" id="cquiz" name="cquiz" />'
|
||||
print ' <br /><input class="submit_comment_button" type="submit" id="submit" value="post comment" />'
|
||||
print ' </form>'
|
||||
print ' </div>'
|
||||
print ' <div class="submit_comment">'
|
||||
print ' <form action="" method="post">'
|
||||
print ' <input type="hidden" name="ctitle" value="' + title + '" />'
|
||||
print ' <input type="hidden" name="cquizv" value="' + str(cquizv) + '" />'
|
||||
print ' <label class="submit_comment_name">name:</label><input type="text" id="cname" name="cname" />'
|
||||
print ' <br /><label class="submit_comment_text">text:</label><textarea class="submit_comment_textarea" rows="5" cols="80" id="ctext" name="ctext"></textarea>'
|
||||
print ' <br /><label class="submit_comment_quiz">' + str(random_int_a) + '+' + str(random_int_b) + '=</label><input type="text" id="cquiz" name="cquiz" />'
|
||||
print ' <br /><input class="submit_comment_button" type="submit" id="submit" value="post comment" />'
|
||||
print ' </form>'
|
||||
print ' </div>'
|
||||
print ''
|
||||
|
||||
if comments == "True":
|
||||
|
Loading…
Reference in New Issue
Block a user