Fixed some bugs regarding the comment section-update

master
Stefan Krulj 14 years ago
parent 57875365cd
commit 1edd6cee16
  1. 5
      comment_section.py
  2. 4
      pylog.py

@ -1,4 +1,4 @@
import urllib, os
import urllib, os, sys
import pylog_config as cfg
__commentanchor="#disqus_thread" #The anchor name of the comment section
@ -18,7 +18,7 @@ def comments_init():
</script>"""
def disp_comments(file):
"""<div id="disqus_thread"></div>
print """<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'pylog'; // required: replace example with your forum shortname
@ -35,6 +35,7 @@ def disp_comments(file):
def disp_num_of_comments(file):
script = sys.argv[0][sys.argv[0].rindex('/')+1:]
sys.stdout.write('<a class="commentcount" href="'+cfg.topurl+script+'?')
sys.stdout.write(urllib.urlencode({'path': os.path.normpath(os.path.dirname(file)), \
'disp':os.path.normpath(file)}).replace('&','&amp;')+__commentanchor+'"></a>')

@ -263,12 +263,12 @@ try:
).strftime(cfg.datefmt),
print '</span></h1>'
comment_section.disp_actions[typ](validdisp)
disp_actions[typ](validdisp)
print '<hr>'
print '<div id="footer">'
print cfg.footer
disp_comments(validdisp)
comment_section.disp_comments(validdisp)
print '</div>'
else:
disp_list(path)

Loading…
Cancel
Save