Messaging

Display the last comments of Disqus

If you use Disqus to manage your comments, it is possible to display the last comments in a menu or in a page.

After configuring Disqus you can make your site more dynamic adding a personalized widget of latest comments on Disqus.

 

1. Adding the widget

The last comments widget can be added to different places on your site :

  • In a menu : go to Settings > Menu > add a widget (if you have more than one menu structures, be sure to select the menus concerned, for example the menu of the blog or add the widget on every site menu)
  • on a page : click on add a line Next, select the category Gadgets then Free zone(HTML) and integrate the following code :
<div id="RecentComments" class="dsq-widget">
<script type="text/javascript" src="http://user-disqus.disqus.com/recent_comments_widget.js?num_items=5&hide_mods=0&hide_avatars=0&avatar_size=32&excerpt_length=50"></script>
</div>

Before saving, change user-disqus in the above text by your name on disqus. The recent comments will display on your site.

2. Personalize the widget

Most settings of the Disqus widget can be personalized to make your account personalized. All you need to do is edite the following code :

<div id="RecentComments" class="dsq-widget">
<script type="text/javascript" src="http://user-disqus.disqus.com/recent_comments_widget.js?num_items=5&hide_mods=0&hide_avatars=0&avatar_size=32&excerpt_length=50"></script>
</div>
  • the number of comments displayed : represented by the code num_items=5, which translates to the 5 last comments displayed.
  • to display the mod comments : represented by the code hide_mods=0, zero means that they will be displayed, replace the 0 by 1 to hide mod comments.
  • display avatars : code hide_avatars=0, the code works the same as the previous setting, we choose to display the avatar, to hide the avatar you just put 1.
  • the size of the avatar is expressed in pixels : avatar_size=32 or 32 pixels.
  • the maximum characters displayed in each comment : excerpt_length=50 this means that the first 50 characters are displayed for each comment.
Activer les commentaires

Activate the comments on your site

In this tutorial, we explain how to manage the inherent comment system of emyspot.

Disqus

Activate Disqus site

In this tutorial, we explain how to manage the Disqus comment system of emyspot.