Developer

Creating a Comment Section

Introduction

A comment section is needed to be added to our page to make it more interactive to user, either to facilitate conversation media to our user or to track the impression of our content. In this page, we will guide you to build a comment section to your page. 

There are several third-party comment service provider, such as Disqus, Commento, or Hyvor Talk, that allows us to easily integrate their commenting functionality into our website.

Using Disqus

Follow these steps to adding the Disqus commenting functionality to our website. 

  1. After creating a Disqus account, make sure to choose "I want to install Disqus on my site". 

  2. Create a new Disqus site by filling up the required fields. 

  3. We will be navigated to the CMS platform list that our website use, choose Install with Universal Code as our CMS platform doesn't listed there. 

  4. Go to our code, we need to define the comment container element in our page HTML by copy paste code below to the HTML script. The comment section position often at the near bottom of the page, so the container can be placed there. 

    <div id="disqus_thread"></div> 
  5. Next we will add the JavaScript code. Copy paste the code in this link here to bottom of the <body> tag in your index.thml

  6. Change several variables like: 

    • PAGE_URL needs to be change into the URL of our page website 

    • PAGE_IDENTIFIER can be filled with the ContentID from Nimvio CMS 

    • WEBSITE_NAME is the name that we input when creating the Disqus site. 

 

Using Commento

Follow these steps to adding the Commento commenting functionality into the website. 

  1. After signing-in to the Commento dashboard, create a new site. 

  2. Go to the HTML code and copy paste code below to define the comment section container. 

    <div id="commento"></div>
  3. Go to the JavaScript code and copy paste the attribute below into script tag to load the commenting feature and all settings will be automatically loaded.

    defer src="https://cdn.commento.io/js/commento.js"

 

Using HyvorTalk

Follow these steps to adding the Hyvor Talk commenting functionality to our website 

  1. Sign-up first to be able to access their console as we need their generated WebsiteID before we use their comment functionality. 

  2. Go to the HTML code and put this attribute of script tag that placed in the <head> or bottom of <body>.

    async src="https://talk.hyvor.com/embed/embed.js" type="module"
  3. As Hyvor Talk already provide web component that ready to be used from their script, the tag <hyvor-talk-comments> can be used to define the comment section in our page. You can add more attribute to the component to config more options. 

    <hyvor-talk-comments
    	website-id="YOUR_WEBSITE_ID"  
    	page-id="YOUR_PAGE_ID" 
    ></hyvor-talk-comments>
  4. Put value in the attributes to make the component identify your website.
    • YOUR_WEBSITE_ID can be retrieved in the Dashboard > Settings > Website.
    • YOUR_PAGE_ID is an unique identifier. In this case can be filled with Content ID from our CMS or let it empty as Hyvor Talk will take canonical URL from the page.

Result

Images below are the result of adding comment functionality from the three providers mentioned above in our sample page.

Disqus Commento Hyvor Talk
https://media.nimvio.com/Project_c1457a00-729a-456c-841b-5c10710e8a18/Media/Resources/Guide/Developer%20-%20Create%20a%20Comment%20Section/2023-07-25_9-03-03_published.png

 

https://media.nimvio.com/Project_c1457a00-729a-456c-841b-5c10710e8a18/Media/Resources/Guide/Developer%20-%20Create%20a%20Comment%20Section/2023-07-25_10-40-36_published.png

 

https://media.nimvio.com/Project_c1457a00-729a-456c-841b-5c10710e8a18/Media/Resources/Guide/Developer%20-%20Create%20a%20Comment%20Section/2023-07-25_10-41-12_published.png

 

What's Next?

Congratulations! You have finished guide on creating a comment section with Nimvio and integrate it with 3rd party commenting service provider. Keep exploring others below: