I ve integrated disqus with your module really easily, thanks for the great work !
I suggest to improve a little bit the documentation about the "injected variable" mode. I think it should be a little bit difficult to find the variable name for drupal beginners.

The documentation should explain that we ve to add a php snippet like this in a node template :

<?php if (!empty($node -> disqus_comments)) : ?>
  	<?php print $node -> disqus_comments; ?>
  <?php endif; ?>

Regards,

herve.

Comments

bkosborne’s picture

Agreed. I'll get this into the next release...

vacilando’s picture

That snippet only takes care of showing Disqus on nodes. Is there a more generic approach that would allow showing it on any page?

(Btw, this issue is related to #1275844: How to get full disqus form in a (page) view or panel pane?)

mohanrajthangarasu’s picture

Works fine for me (Drupal 6)and followed below steps.

Step1: Go to www.yoursite.com/admin/settings/disqus

Step2: Under "Visibility" Location should be set as "Injected Variable"

Step3: And then go to node.tpl.php or node-custom.tpl.php of your theme and paste the following code at your desired location

if (!empty($node -> disqus_comments)) :
print $node -> disqus_comments;
endif;

Step4: That's it. Done.

vacilando’s picture

@yamzalal, that's only working for nodes. We also need a snippet to include Disqus in any other page (e.g. on a view, panel, etc.)

bkosborne’s picture

Right... a few areas of the code will have to be reworked a bit here, because we send the URL and identifier of posts as node URLs/IDs... Not too difficult tho. I'll see what I can come up with

borjagut’s picture

Thank you!