Adding a commenting system to your website is a very common requirement. Technically, creating a commenting system is easy. Create a form that accepts comments and display those comments within a list. When you start to drill into detail things can quickly start to grow, in terms of security you'll probably want a Recapture, you might want the person to get an email notification when someone replies, you will want a commenting approval system to prevent people spamming on your website.
With all that in mind in some instances, it doesn't make sense to reinvent the wheel and this is where Disqus comes in. Most people reading this will have probably unintentionally come across a Disqus comments section on a website, which looks like this:
Over the years I've implemented numerous commenting systems, so I'd say the plus points of Disqus is that its FREE, it looks good and it's quick and easy to implement. The downside is that your comments live on someone else servers. For some clients, this may be a show stopper. If you decide Disqus is for you then the rest of this tutorial will explain how to install it.
How To Install Disqus
Installing Disqus is pretty simple. First, you need to head over to Disqus and register an account.
Next, you need to head on over to the universal code page you'll see a 'Place the following code where you'd like Disqus to load'. Copy everything from here onto your Razor view of where you want the commenting system to display. If you look in the code you should see a commented out area:
I suggest you uncomment this value and use the Umbraco page ID as the unique identifier. You can then use code similar to the below within your ViewModel to populate those values
Which means your end Disqus script looks like this:
After that when you load your webpage you should see your comments!!!!
You'll need to add in extra allowed domains within the Disqus portal if you want to add in any development environments etc.. From my testing localhost couldn't be added into Disqus. As no one adds comments in my test environments, I don't see it as a show stopper, but, it is definitely something to consider.
Adding comments to your website can be very quick and simple with Disqus, I managed it within a few minutes. After installing it, my comments conversation even increased and I ended up with a higher number of people leaving comments. If you need to add a commenting system on your website, then I would recommend investing Disqus, however, if you run a large enterprise-level organization, having a Disqus branded commenting system, may look a little unprofessional!