Experimental project

This is a sandbox project, which contains experimental code for developer use only.

The inlineDisqussions Drupal Module is an extension of the original jQuery plugin published by tsi@inlineDisqussions.

It quickly adds inline commenting functionality to Drupal websites by targeting elements and adding a Disqus comment thread for each instance. In other words you can add inline commenting to every paragraph in an article or designate comments by section or deginated structure.

inlineDisqussions is a jQuery plugin to allow inline comments on your site. Comments threads are created with the power of the awesome (and free) Disqus, they are created dynamically and attached to the specific sections (paragraph, usually, but not necessarily) of your post. The original use-case was naturally a blog post so you could comment next to each paragraph, but you could use this to have comment threads on every section of any web page - think of commenting on every product in a one-page catalog, on each picture in a photo gallery etc.

Project: https://github.com/tsi/inlineDisqussions

Basics

The inlineDisqussions Module provides a settings page to set the Disqus short-name and comment block options like position and background color.

jQuery("p").inlineDisqussions({
  identifier: 'disqussion',
  displayCount: true,
  highlighted: false,
  position: 'right',
  background: 'white',
  maxWidth: 9999
});

LIMITATIONS

There is (at least) one - each paragraph gets a unique ID to get the right comment thread attached to it, these IDs are automatically generated according to the order paragraphs appear in. That means that if you ever change the order of your paragraphs or add a new paragraph to the top of your article you might cause a wrong comment thread to be attached to that paragraph.

WORKAROUND: You can add a data-disqus-identifier attribute to the paragraph to force it to get a specific comments thread, something like this:

<p data-disqus-identifier="disqussion-12">
  Lorem ipsum...
</p>

Project information