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