I’m pleased to share that Horkan.com has been recognised as the 12th most widely read tech blog from the UK by Feedspot, based on RSS feed aggregation in their recent article “Top 70 UK Tech RSS Feeds“. This acknowledgement is a significant moment for me, reflecting a journey that began over 17 years ago.
Continue readingTag Archives: blogs-sun-com
Integrating Disqus and Roller Weblogger on blogs.sun.com
I’ve recently updated my site to use Disqus the blog comment hosting and conversation site.
Done this for two reasons:
- Firstly my usually frustration with any status quo means I want more functionality delivered yesterday, and although I’d started to have a look at the functionality I wanted and how I might add it as a Roller macro / velocity code I didn’t want to spend a huge amount of time coding it out (the functionality I specifically wanted was the separation of comments and trackbacks, as well as comment ‘threads’).
- Secondly to gain readership and comments from the sizeable blog comment audience that Disqus have built up (Disqus is estimated to be running on over 30,000+ servers).
I’ve already had a couple of comments from Disqus members, and I’ll have to see how it goes before I start heralding it as an unprecedented success, but I’m very pleased with the results (both aesthetic and functional).
Sadly the Disqus comment import function was initially provided for WordPress and Blogger, but apparently wasn’t fully functional; subsequently an update is due out soon that will hopefully include Roller Weblogger. See this Disqus forum entry, and it’s threads for more info: How do I import comments?
Given this was the case I wanted to make sure my blog supported my new Disqus commenting system, but would still show my old comments if there where any for an entry. Here are a few examples:
- No Comments at all:
What do Facebook, del.icio.us, and last.fm, all have in common this month? - Roller comments only: ¨C14CMicrosoft’s very public “Blue Screen of Death” crash out at the Beijing Olympics
- Disqus and Roller comments: ¨C16CDr. James Martin’s ‘Target Earth’, the 2008 Turing Lecture
The code I developed, which has to be separated into two components (number of comments associated with a blog entry, and comment entry form and comment display), is below, but if you use or copy it please note that you need to replace the Disqus supplied JavaScript for my site with your Disqus comments hosted sites JavaScript code. ¨C18C
Combined Roller Weblogger and Disqus Number of Comments code
For comment numbers I’ve broken it down into displaying “n Comments” for Disqus on it’s own, whilst “x Comments (new, via Disqus) and y Comments (legacy, via Roller)” for comments hosted on both systems.
This replaces the code in the Roller Weblogger “_day” template which displays the number of comments per blog entry.
Don’t forget to replace occurrences of ‘eclectic’, my blog handle, with yours (just one, about the fifth line from the end).
## Number of Comments <a href="$url.entry($entry.anchor)#disqus_thread">View Comments</a> #set($commentCount = $entry.commentCount) #if ($commentCount > 0) (new, via <a href="https://web.archive.org/web/20090830081824/http://www.disqus.com/" target="_blank">Disqus</a>) and #if ($commentCount == 1) <a href="$url.comments($entry.anchor)">$commentCount Comment</a> (old, via <a href="https://web.archive.org/web/20090830081824/http://rollerweblogger.org/" target="_blank">Roller</a>) #else <a href="$url.comments($entry.anchor)">$commentCount Comments</a> (old, via <a href="https://web.archive.org/web/20090830081824/http://rollerweblogger.org/" target="_blank">Roller</a>) #end #end <script type="text/javascript"> //<[CDATA[ (function() { var links = document.getElementsByTagName('a'); var query = '?'; for(var i = 0; i < links.length; i++) { if(links[i].href.indexOf('#disqus_thread') >= 0) { query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&'; } } document.write('<script type="text/javascript" src="https://web.archive.org/web/20090830081824/http://disqus.com/forums/eclectic/get_num_replies.js' + query + '"></' + 'script>'); })(); //]]> </script>
Combined Roller Weblogger and Disqus Comment entry and Comments display code
This basically displays the Disqus commenting system, along with any Disqus hosted comments, however if any ‘legacy’ Roller Weblogger hosted comments are found it displays those too.
It replaces the code in the Roller Weblogger “permalink” template which displays comments themselves (the same changes may need to be made to the “weblog” and “searchresults” templates too).
## Comments <h2>Comments (new, via <a href="https://web.archive.org/web/20090830081824/http://www.disqus.com/" target="_blank">Disqus</a>)</h2> <div id="disqus_thread"></div><script type="text/javascript" src="https://web.archive.org/web/20090830081824js_/http://disqus.com/forums/eclectic/embed.js"></script><noscript><a href="https://web.archive.org/web/20090830081824/http://eclectic.disqus.com/?url=ref">View the forum thread.</a></noscript><a href="https://web.archive.org/web/20090830081824/http://disqus.com/" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a> ##showWeblogEntryComments($model.weblogEntry) ##showWeblogEntryCommentForm($model.weblogEntry) <br></br> #set($commentCount = $entry.commentCount) #if ($commentCount > 0) <h2>Comments (old, via <a href="https://web.archive.org/web/20090830081824/http://rollerweblogger.org/" target="_blank">Roller</a>)</h2> #showWeblogEntryComments($model.weblogEntry) <br></br> #end
Additional benefits that I’ve picked up by implementing Disqus include:
- Following commentators.
- Having my, and my sites, comments followed.
- Being able to easily ‘reblog’ my comments and make blog entries out of them (looking forward to trying this, although I haven’t yet).
Finally here’s my Disqus profile for you to have a look at: http://www.disqus.com/people/wayne_horkan/
Links for this article:
- Recovered link: https://horkan.com/2008/09/09/disqus-integration-bsc-roller-weblogger
- Archived link: https://web.archive.org/web/20100715133830/http://blogs.sun.com/eclectic/entry/disqus_integration_bsc_roller_weblogger
- Original link:
http://blogs.sun.com/eclectic/entry/disqus_integration_bsc_roller_weblogger