Manually Patch Your Blogger Template
IMPORTANT: Make a backup of your template just incase you make a mistake modifying it. This way you have something to reference.
STEP 1
Add this to your CSS area or CSS file
// Depending on your template, sometimes on some browsers, disqus doesn't auto-width 100% //
#disqus_thread, #disqus_thread #dsq-content {
width: 100%;
}
STEP 2
- Look for
<b:if cond='data:post.allowComments'>
<a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:post.numComments/> Comments</a>
</b:if>- Change to:
<b:if cond='data:post.allowComments'>
<!-- <a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:post.numComments/> Comments</a> -->
<!-- +disqus -->
<a class='comment-link commentslink' expr:href='data:post.url + "#disqus_thread"'>View Comments »</a>
<!-- -disqus -->
</b:if>
STEP 3
(this is for: the 0 Comment; 1 Comment; 10 Comments. This shows up when viewing a specific post.) (Note: Some templates do not have this, so if you can’t find it, don’t bump your head :p instead, skip to the next step.)
- Look for:
<b:if cond='data:post.numComments == 1'>
1 <data:commentLabel/>:
<b:else/>
<data:post.numComments/> <data:commentLabelPlural/>:
</b:if>- Change to:
<!-- <b:if cond='data:post.numComments == 1'> -->
<!-- 1 <data:commentLabel/>: -->
<!-- <b:else/> -->
<!-- <data:post.numComments/> <data:commentLabelPlural/>: -->
<!-- </b:if> -->
Comments:
STEP 4
- Look for:
<div id='backlinks-container'>
- Usually, above that bit (Step 4.1) you will find this:
<p class='comment-footer2'>
<a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:postCommentMsg/></a>
</p>- It may be enclosed on a DIV instead of a P element
- Sometimes its arranged differently, just look for any bits as shown on Step 4.1, also be sure it looks closely similar.
- Once you find it, change it to:
<!-- <p class='comment-footer2'> -->
<!-- <a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:postCommentMsg/></a> -->
<!-- </p> -->
STEP 5
- Look for:
<div id='backlinks-container'>
- Above it add:
<!-- +disqus -->
<div id='disqus_thread'/>
<div id='disqus_post_title' style='display:none;'><data:post.title/></div>
<div id='disqus_post_message' style='display:none;'><data:post.body/></div>
<script type='text/javascript'>
var disqus_url = '<data:post.url/>';
var disqus_title = document.getElementById('disqus_post_title').innerHTML;
var disqus_message = document.getElementById('disqus_post_message').innerHTML;
</script>
<script src='http://disqus.com/forums/DISQUS-SHORT-URL/embed.js' type='text/javascript'/>
<noscript><a expr:href='"http://DISQUS-SHORT-URL.disqus.com/?url=" + data:post.url'>View the entire comment thread.</a></noscript>
<a class='dsq-brlink' expr:href='"http://disqus.com"'>blog comments powered by <span class='logo-disqus'>Disqus</span></a>
<!-- -disqus -->Note: If above the code-bit on Step 5.1 there is </b:if>, then put the Step 5.2 code BEFORE </b:if>. If it isn’t there (there are some templates that doesn’t have it in that position), then just add it up.
Step 5.3: From the Step 5.2 code, change the DISQUS-SHORT-URL to well, your blog’s DISQUS URL.
Example: If your DISQUS URL is shortnname.disqus.com then change DISQUS-SHORT-URL to shortname.There are two to change!
STEP 6
- Look for:
</body>
* Right ABOVE it, add:
<!-- +disqus -->
<b:if cond='data:blog.pageType != "item"'>
<script type='text/javascript'>
(function() {
var links = document.getElementsByTagName('a');
var query = '?';
for(var i = 0; i < links.length; i++) {
if(links[i].href.indexOf('#disqus_thread') >= 0) {
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
}
}
document.write('<script type="text/javascript" src="http://disqus.com/forums/DISQUS-SHORT-URL/get_num_replies.js' + query + '"></' + 'script>');
})();
</script>
</b:if>
<!-- -disqus -->Step 6.3: From the Step 6.2 code, change the DISQUS-SHORT-URL to well, your blog’s DISQUS URL.
Example: If your DISQUS URL is shortname.disqus.com then change DISQUS-SHORT-URL to shortname.
STEP 7
Copy your final code to your Blogger’s Template and Save it.
STEP 8
Force Refresh your blog and blog-post to see the changes.
* Force refreshing tells your browser not to use your browser’s cache, instead fetch the files fresh from the server.
These instructions wre modified from Yukino's Guide
Patcher Ready Templates
Remove DISQUS from Blogger
Use any text editor (plain text mode) remove everything in between the following tags:
<!-- +disqus -->
<!-- -disqus -->
Once completed, DISQUS will be removed from your site.
