I’m trying to get non-spammy commenting working on my Confluence site and it’s a pain in the ass. The native solution is CAPTCHA-based, and that’s been defeated by spammers.
I have a semi-solution using (as with Fnord) Disqus. Some notes for other folks attempting this:
- You have to use the raw Javascript functions of Disqus
- On Confluence, go into Site admin / Theme / Layout editor / Page footnotes
- Change Options to ‘Velocity then raw HTML’
- Change the shortname to that of your site
Here’s mine so far, with the short name munged:
1 2 3 4 5 6 7 8 9 10 11 12 | |
This seems to almost work, but the variables that tell Disqus what page it is seem to be unreachable. Normally, you set
1 2 | |
but I can’t tell how to read those. I’ve tried (from these docs)
1 2 | |
but those are not found.
Syntax was
1
| |
which produces an error visible in the Safari error console about req not being found.
I also tried (from these docs)
1 2 | |
but even content is not found. Perhaps some syntax error with the Velocity engine stuff, but the mixture of Velocity and Javascript is very poorly documented. I was unable to find anyone else using Disqus with Confluence, so if you have any tips do say so here!
At present, it’s almost working. The page portion loads, the Disqus portal seems happy, but due to the lack of URL is causing comments to not load on the page they should be attached to.
Update 3/10/12: I talked to one of the Disqus hackers at the PyCon convention, and he confirms that this approach works fine. If no URL or ID is set, Disqus sniffs the URL and comments will follow it as long as the URL is constant. Excellent.