Most Popular
Recently Added
Recently Updated

Integrating the DISQUS comments platform with knowledgebase articles in the Support Center

Introduction

DISQUS is a free comments platform that can be installed on any website. It provides social network integration, user profiles, single sign-on, anti-spam, moderation, mobile commenting, and email notifications.

Instructions

Sign up for a free DISQUS account

  1. Register for a free account at DISQUS if you don't already have one.

  2. Enter your site information:

    • Site URL is the top-level URL of your Support Center.
      (e.g. http://support.example.com)
    • Site Name is the name of your Support Center.
      (e.g. Cerb5 Community)
    • Site Shortname is your subdomain at disqus.com where you can configure and moderate your comments system.
      (e.g. example.disqus.com)
  3. Enter your moderator information, or click the "Already have a profile?" link if you've used DISQUS before.

  4. Click the Continue button.

  5. Configure your basic settings and click the Continue button again.

You can ignore the installation step since the code is provided below.

Adding DISQUS comments to knowledgebase articles

  1. Open a new browser to Cerb5.

  2. Click on setup from the top right navigation menu.

  3. Click on Community Portals and select Configure from the menu.

  4. Select on your Support Center and click the Custom Templates tab.

  5. Click the Add Custom Template button and select [cerberusweb.kb] support_center/kb/article.tpl template from the dropdown.

Copy the following HTML and paste it just above the last </div> tag at the bottom of the article.tpl template. Replace <shortname> on the 4th line (var discus_shortname = '<shortname>';) with the DISQUS short name you created during registration.

<div id="disqus_thread"></div>
<script type="text/javascript">
    {devblocks_url assign=article_url full=true}c=kb&p=article&id={$article->id}{/devblocks_url}
    var disqus_shortname = '<shortname>'; // required: replace example with your forum shortname
    var disqus_identifier = 'kb_article_{$article->id}';
    var disqus_url = '{$article_url}-{$article->title|devblocks_permalink}';

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
</script>
<noscript>
    Please enable JavaScript to view the 
    <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
</noscript>
<a href="http://disqus.com" class="dsq-brlink">
knowledgebase comments powered by <span class="logo-disqus">Disqus</span>
</a>

Click the Save Changes button to save the template.

Test it!

  1. Open a knowledgebase article from your Support Center and scroll to the bottom. You should now see a DISQUS comment box:


Properties ID: 000076   Views: 10657   Updated: 2 years ago