Browse files

Trying out Disqus comments

  • Loading branch information...
1 parent 594a23e commit 47f028d581546a80983341c9ceabac561b1c3436 @lmorchard committed Mar 6, 2011
Showing with 19 additions and 0 deletions.
  1. +1 −0 lib/config.php-dist
  2. +18 −0 render.php
View
1 lib/config.php-dist
@@ -1,4 +1,5 @@
<?php
$base_path = "/Users/lorchard/Sites";
$base_url = "http://localhost/~lorchard/MarkdownRender";
+$disqus_shortname = 'decafbad-localhost';
View
18 render.php
@@ -57,6 +57,24 @@
<body>
<article>
<section><?=$text?></section>
+ <section class="comments">
+ <div id="disqus_thread"></div>
+ <script type="text/javascript">
+ var disqus_shortname = '<?= htmlspecialchars($disqus_shortname) ?>';
+
+ // var disqus_identifier = 'unique_dynamic_id_1234';
+ // var disqus_url = 'http://example.com/permalink-to-page.html';
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+ </section>
</article>
</body>
</html>

0 comments on commit 47f028d

Please sign in to comment.