Step 1: Disable the built-in comment function
Login as the administrator and disable the comment option.Click the comment link and uncheck the checkbox for enable comments.
If you were using Disqus as your comment provider you should disable it too. The settings is at the bottom of the Comments setting page.
Step 2: Adding the Facebook Comments plugin to your template
The next thing you need to do is to add some code to your PostView.ascx.
The PostView.ascx is for the current theme that is used for the blogengine.net.
for eg:if the current theme is standard then the facebook comment plugin code should be put in the PostView.ascx of the standart theme.
Example Code
<h3>Comments</h3>
<%if(this.Location == BlogEngine.Core.ServingLocation.SinglePost) { %>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId=142835752451555&xfbml=1"></script>
<fb:comments href="" num_posts="2" width="500"></fb:comments>
<% } %>
The source for the facebook comment box social plugin could be obtained from facebook.
Reference: http://www.whatsupweb.net/post/2011/04/24/Implementing-Facebook-Comment-box-with-BlogEnginenet.aspx
Login as the administrator and disable the comment option.Click the comment link and uncheck the checkbox for enable comments.
If you were using Disqus as your comment provider you should disable it too. The settings is at the bottom of the Comments setting page.
Step 2: Adding the Facebook Comments plugin to your template
The next thing you need to do is to add some code to your PostView.ascx.
The PostView.ascx is for the current theme that is used for the blogengine.net.
for eg:if the current theme is standard then the facebook comment plugin code should be put in the PostView.ascx of the standart theme.
Example Code
<h3>Comments</h3>
<%if(this.Location == BlogEngine.Core.ServingLocation.SinglePost) { %>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId=142835752451555&xfbml=1"></script>
<fb:comments href="" num_posts="2" width="500"></fb:comments>
<% } %>
The source for the facebook comment box social plugin could be obtained from facebook.
Reference: http://www.whatsupweb.net/post/2011/04/24/Implementing-Facebook-Comment-box-with-BlogEnginenet.aspx
When I implement this or any other way of adding the comments plugin to the BlogEngine, it shows all of the comments for the entire site on each blog post. Is there a way to show comments for each individual post? I can't make a new plugin for each blog entry.
ReplyDelete