Skip Ribbon Commands
Skip to main content

Using Disqus with SharePoint 2013

 

Brian Jones

15/05/2015

​When creating a blogging site for Fuse Collaboration we did not want to use the out of the box SharePoint blog templates for reasons discussed in a later blog.

I decided instead to use a publishing site for blogging with a publishing page per blog post.

I needed to find a solution which would allow vistors to comment on our blogs which was easy to implement, secure and prevented spam. For this solution I turned to Disqus.

https://disqus.com/ 

You can create an account on disqus and connect your blog to disqus. The benefits of this are that disqus prevents spam by requiring users to login using a Disqus, Facebook, Google or Twitter account.

Site administrators can then manage comments from the diqus website.

Disqus provides many other features and tools that I won't go into in this blog.

When disqus is added to your SharePoint page it provides a nice user friendly interface for viewing and adding comments.

Disqus.PNG 

You can also embed your comment count into SharePoint display templates so that you can see the comment count next to posts in your search results.

DisqusComment.PNG 

This blog explains how we added Disqus to our blog site and will hopefully help you achieve the same results.

The Blog Post Page

The first thing you want to do is create a Disqus account, log in and register your site. Once you have done that click on the cog in the top right hand corner and select Admin, click on the Settings tab and click on the Install link which is in the top right.

On the Choose your platform page select Universal Code, you will need this code so keep this page open.

Return to your SharePoint site. 

To add the disqus to your blog post page you have a couple of options. You can either put the code within your Page Layout as I did or you can use a content editor webpart.

 Locate the code in Step 1 and copy/paste that into the script editor in the cotent query webpart.

Thats it!

The comments window will now appear on your page and can be used.

 

The Display Template

Adding the comments count to the display template was a little more difficult than adding the comment box to the blog post page.

Open your display template in a text editor and where you want the comment count to appear add the following line.

<a href="_#= ctx.CurrentItem.Path =#_#disqus_thread"></a>

 

Save and publish the display template

On the page where you will be using this display template add a content editor webpart and edit the HTML source. In the HTML source window add the following script, replacing websiteshortname with the shortname of your site as shown on the disqus web site.

<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES * * */
    var disqus_shortname = 'websiteshortname';
   
    /* * * DON'T EDIT BELOW THIS LINE * * */
    window.onload = function () {
        var s = document.createElement('script'); s.async = true;
        s.type = 'text/javascript';
        s.src = '//' + disqus_shortname + '.disqus.com/count.js';
        (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
    };
</script>

This script is a slight amendment to the script provided in step 1 of the how to display comment count section of the disqus page you should have open in another tab/window. For this reason you could copy that code and amend it slightly adding the windows.onload = and removing the extra ().

If you have any questions or require more details then feel free to leave a comment.

 

 


 About us

Fuse Collaboration Services is a Cloud Solution Provider and Microsoft Gold Partner specialising in delivering SharePoint, Skype for Business, and Azure cloud-based solutions. Based in Northampton, UK.

Microsoft Gold Partner Logo showing 5 competencies

Read more

 Latest Tweets

 Latest Blog

 

 

Skype for Business and so much more…195<p class="lead"> Yes? Then this is an important read!</p><p>We all know (hopefully!) <a href="/_layouts/15/FIXUPREDIRECT.ASPX?WebId=4fc45909-2b6d-48b9-bcf9-a446e9d472d6&amp;TermSetId=c98895cd-d37f-4406-9cff-5480b4f829b6&amp;TermId=4cd8262c-9c67-4bcb-8f13-65e8ffa6299a">what Skype for Business is</a> but what is different about the version we can offer? </p><p>Fuse has been working ​with the UK's leading Skype for Business provider since they began operating four years ago. Working alongside our partners you will receive the usual unified communications inherent in Skype for Business but further to this you will have access to call centre solutions, call monitoring, call analytics and 24-hour support. The support is available globally and frees up IT staff allowing them to increase their productivity and availability. </p><p>Further to the above features you will have access to an online portal which will allow you to quickly commission and decommission users, configure/reconfigure call groups, manage users and telephone numbers, configure interactive voice response(IVR), call routing, on hold marketing and call reporting.</p><p>Working with the solution we offer, you will be given the benefit of not having a long-term contract tying you in to a lengthy subscription. You can down scale or upscale monthly, giving you the control of your budgets. The flexible scale up/down in line with organisational changes is an important bonus to many customers. </p><p>The monthly price works out at half the price of competitors with call bundles and next to no downtime. </p><p> <strong>The benefits are&#58;</strong></p><ul><li>Reduced annual costs as one monthly cost includes unlimited free outbound calls to UK and line telephone numbers. International call packages are available. Free calls to UK mobile numbers available as an add on</li><li>Flexible working - inbound and outbound business calls and online meetings from anywhere with an internet connection</li><li>Encrypted and secure communication<br></li><li>End to End Fully Managed Service</li><li>24 hr, 7 days a week dedicated support; online support and contact centre</li><li>Online Visual Management and Analytics Portal</li><li>Global solution, from reslient datacenters with multiple providers</li><li>Audio and video conference facility for up to 250 participants – even if they're not on Skype for Business. All they need is a phone or internet connection.</li><li>Fixed monthly fee per user that is payable on a monthly subscription</li><li>Integration with Outlook/SharePoint to show availability/presence (on premise or O365)</li><li>Increases productivity - Collaboration between teams is simplified due to the ability to share files etc.</li><li>Instant messaging with dancing emojis!</li></ul><hr />​​ <div class="well well-lg"><p class="lead">​To book a demo contact Fuse Collaboration on 01604 797979 or email fuse@fusecollaboration.com </p></div>​​ <p>Fuse Collaboration is a Microsoft accredited Gold Partner, License and Systems Specialist</p>​ ​l.ozier@fusecollaboration.com | Louise Ozier | 693A30232E777C6675736563735C6C2E6F7A696572 i:0#.w|fusecs\l.ozier26/06/2017 23:00:002017-06-26T23:00:00ZDoes your business make lots of phone calls?29/06/2017 15:18:4669https://www.fusecollaboration.com/ourblog/Pages/Forms/AllItems.aspxhtmlFalseaspx

 Contact us

Our address
12-14 Brookfield, Duncan Close
Moulton Park, Northampton
NN3 6WL
P: +44(0)1604 797979
Contact Us