Now-a-days comments are the essential part of blogging or social world. Earlier we stored comments data in database/XML file. It is a big headache to handle the data maintenance and storage space. To overcome this, Disqus provide the comments plugin it is easy to use and it can install through if have basic knowledge in programming.
Disqus is a blog comment hosting service that offers a platform for social integration, social networking, user profiles, analytics, mobile commenting and so on.It is directly integrated with the most popular services like WordPress, Drupal, Wix etc..
Setup Disqus Plugin
Register in the Disqus Account in the link Disqus Signup Link
Sign up by using your email Id and password or you can signup using Facebook, Twitter or Google. You can see in many ways we add the Disqus forum such as blogger,Wordpress , Wix etc.. We want to use Disqus integrate in our application so select install manually with Universal Code. For more details please see the link https://coreprogramm.disqus.com/admin/install/platforms/universalcode/
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://coreprogramm.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
(ii) For displaying comment count need to add the below code
<script id="dsq-count-scr" src="//coreprogramm.disqus.com/count.js" async></script>
How to integrate the Disqus in .NET Core MVC applicationLet's create a .NET Core MVC application and check how to integrate Disqus Forum into it.
Step-1 : Open VS 2017 >> File New Project >> Choose .NET Core Web application
Choose Web application as MVC |
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function () { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://coreprogramm.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<script id="dsq-count-scr" src="//coreprogramm.disqus.com/count.js" async></script>
</> The Source Code is available in Github.com/CoreProgramm/
Summary
Post a Comment