Documentation

Comments counter widget

Widget code Bloggerstream must be inserted into the HTML code of the page. You can display the number of comments on the page with this widget

The standart code to insert combined widget is as follows:

<script type="text/javascript">
_hcwp = window._hcwp || [];
_hcwp.push({widget:"Bloggerstream", widget_id: WIDGET_ID, selector:  });
(function() {
if("HC_LOAD_INIT" in window)return;
HC_LOAD_INIT = true;
var lang = (navigator.language || navigator.systemLanguage || navigator.userLanguage ||  "en").substr(0, 2).toLowerCase();
var hcc = document.createElement("script"); hcc.type = "text/javascript"; hcc.async = true;
hcc.src = ("https:" == document.location.protocol ? "https" : "http")+"://w.hypercomments.com/widget/hc/WIDGET_ID/"+lang+"/widget.js";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hcc, s.nextSibling);
})();
</script>

, where

  • WIDGET_ID - ID of your widget

To get your widget code you can use admin panel "Settings"-"Widgets".

Widget settings

To configure the comments widget you need to add configuration settings into the array object _hcpw from the widget code. For example:

_hcwp = window._hcwp || [];
_hcwp.push({widget:"Mixstream", widget_id: WIDGET_ID, SETTINGS_KEY: SETTINGS_VALUE});

,where

  • SETTINGS_KEY - the name of widget settings option
  • SETTINGS_VALUE - the value of widget settings option
Widget configuration settings
Option Values By default Description
selector String null HTML selector of elements, that contains link to an article-counter of comments that you want to display in href atribute. For example, if you have an element:
<a class="myclass" href="http://example.com/pageid">Comment</a>
, the option value should be specified as .myclass and as a result Сomment will be changed to the number of comments on the page http://example.com/pageid.
If comments are attached to page ID xid, you should specify atribute data-xid="Page identificator" to the element. For example:
<a class="myclass" data-xid="Page identificator" href="http://example.com/pageid">Comment</a>
label String Comments({%COUNT%}) Allows you to set the format of comments number, instead of {%COUNT%} will be changed to comments number.