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

 

 

‘We’d love you to stick around’. But stick around where?3728<p class="lead">Here at Fuse Collaboration Services both our personal and professional email inboxes are receiving a steady flow of emails from companies asking us to stay on their mailing lists. This is the most obvious and public aspect of the new GDPR that is currently being implemented.</p><p>There are a couple of positive side-effects from these new regulations, not least that by forcing you to opt in to mailing lists to make sure you are only receiving what you want to receive a company will really know how engaged you are, making your email address all the more valuable when it comes to marketing.</p><p>Companies have been responding to the GDPR changes by re-working their data management policies, but how much time is being put into how these policies can be enacted day-to-day, especially away from the aforementioned marketing email lists?</p><p>For example, if you have written a policy that says that emails are going to be stored for one year before deletion, how are you going to store them away from an active email server (thereby reducing the burden on a day-to-day server), or keep hold of them once a member of staff leaves? Or what happens if data is accidentally deleted by a member of staff?</p><p>Furthermore, data security is made all the more important as more and more companies opt for a flexible working approach where their staff can work from remote locations, such as home or (dare we say it) a high street coffee chain with its free Wi-Fi access.</p><p>Domestic or public internet access networks are unlikely to have the same levels of security as a company's, which makes it all the more important that any data transfer between a central hub and remote laptop is encrypted and has the latest security.</p><p>Chris Evans of Computer Weekly has highlighted <a href="https&#58;//www.computerweekly.com/feature/GDPR-brings-serious-implications-for-data-storage" target="_blank"> <span style="text-decoration&#58;underline;">five areas</span></a>&#160;which will impact the day-to-day work of the data storage manager under GDPR, including&#58;</p><ul><li>encryption; </li><li>detailed application-to-storage mapping;</li><li>security and audit; </li><li>validation of test and development requirements;</li><li>and collaborating closely with colleagues.</li></ul><p>Ultimately, you need to be able to give all your customers, clients, stakeholders and staff the confidence that their data and documents are stored securely, but also in a way that allows you to respond to data requests quickly and efficiently without having to wade through a mound of irrelevant information.</p><p>You also need to have the peace of mind that any deleted information can be recovered within your policy timetables, whether they be one year, five years, or longer than that.</p><p>There is also a danger that you could be sucked into a one-size-fits-all approach using policy and storage templates that have been designed for organisations that are in a different sector or are of a vastly different size to your own.</p><p>Fuse's data back-up and storage solutions tick all of the boxes you need to have that peace of mind to concentrate on your main business, namely growing as a company, while also being tailored to your specific needs.</p><p>Fuse uses a mixture of cloud-based packages to meet your requirements and allow your staff to access their relevant information <em>securely </em>regardless of where they are working. Our solutions are also easy to monitor by your in-house IT team, so that in the unlikely event of a data breach it can be identified, resolved and reported quickly.</p><div class="well well-lg"><p class="lead">Give us a call on 01604 797979 and we can have a chat about how you can make sure your data policy matches your day-to-day operations and requirements.</p></div> | Chris Wearmouth | 693A30232E777C6675736563735C632E776561726D6F757468 i:0#.w|fusecs\c.wearmouth16/05/2018 23:00:002018-05-16T23:00:00ZData security and rentention in a cloud based infrastructureData security in a cloud based infrastructure14/06/2018 09:56:102550htmlFalseaspx

 Contact us

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