• Using Disqus comments in Sitefinity

    by Venkata Koppaka | Nov 10, 2011

    In my previous post I explained how to use Disqus in a development environment.

    In this post I will talk about how to use Disqus comments in Sitefinity Blogs.

    Getting started with Disqus is pretty simple, go to Disqus.com and signup, all you need is to provide Site information (site where you will use Disqus comments) and your moderator information. 

    Now navigate to Disqus developers section where you will find an universal code that you can embed. Copy that code and paste it into a user control in your Sitefinity Web Application. 

    Below is how how your user control will look like - 

    You would need to change "disqus_shortname" to your disqus short name. This is how your control setup will look like - 

    Now navigate to Sitefinity's backend and go to Design-> Widget Templates and look for "Full Blog Post Item" template and edit the template. 

    At the top of the Widget Template add the below lines to register your Disqus Comments control. 

    Now scroll to the end of the template where you will find a section where Sitefinity's default Comments controls can be found. Below image will show you where they are -

    replace these controls with the disqus comments control that has been registered above, below is how it would look like -  

    Reload your comments page and you should now see Disqus comments as your comments system in Sitefinity Blog Post.

    To download a sample of code used in this post Click here and if you want to see a running sample, well if you are reading this post, this is a running sample :) 

    Hope this helps

    Cheers

    Venkata

    Go comment!
  • Developing with Disqus on localhost

    by Venkata Koppaka | Nov 06, 2011

    Disqus is a popular comment platform which can be integrated to any website by using simple Javascript snippet code.

    This article talks about how to develop with Disqus, on localhost or on your development environment.

     When you are running Disqus for the first time, disqus tries to verify your URL, if your URL fails to match certain criteria you will be presented with "We were unable to load Disqus" message. Unfortunately this message will also be shown when you are running your website locally.

    To overcome this error message and still have Disqus working correctly when developing(in localhost scenarios) you will have to set disqus_developer variable before your regular Disqus JavaScript snippet. Below is how you would do it -

    var disqus_developer = 1;

    Hope this helps

    Cheers

    Venkata

    Go comment!