Global Variables

Blogger Installation Help

· 0 comments

Disqus uses Blogger gadgets, which allow Disqus to insert into your templates the necessary HTML and JavaScript code to get Disqus working. To do this, we assume several things that are common to all standard and official Blogger templates. If you have customized your Blogger template significantly, or are using a template that is not an official Blogger template, the Disqus gadget may not work with your template without some changes.

Below are the assumptions that the Disqus gadget makes when determining where and how Disqus is integrated into your template. To ensure the gadget works, verify your template is compatible with these assumptions.

Note: The Disqus gadget is not the only way to integrate Disqus with your blog. If you are comfortable with HTML/JavaScript and blogger templates, you can also use the Disqus Universal Code.

General Template

  • The blog is contained in a div with id Blog1. We also look for Blog2 through Blog19 if we cannot find Blog1.

  • Your post divs contain the class hentry. All standard Blogger templates use microformats.

  • Item pages are enabled. This means that each post on your blog has an individual post page. Blogger calls this page type item.

Index and Archive Pages

  • Inside each hentry post block, there is a span element with class post-timestamp. Inside the span, there is an anchor with class timestamp-link. The href of the anchor is the URL of the post’s item page. (i.e., the permalink URL).

  • Inside each hentry post block, there is a span element with class post-comment-link. The gadget will replace the contents of this span with the Disqus comment URL. If Disqus cannot find the post-comment-link span, the gadget will append the comment URL link to the post-timestamp span.

Item or Post Page

  • To get comment counts working, the same assumption made above on index pages are also made on item pages.

  • There is a div with id comments. This is the div that the gadget will use include the Disqus comment embed. Blogger uses this div for its own native comment display. The gadget clears Blogger’s native comments and replaces it with Disqus’s comments. Note that if you enable Blogger sync in your forum settings, Disqus comments will still be synced back to Blogger’s native comment system.

handapeunpost