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
Comment #1
bkosborneAgreed. I'll get this into the next release...
Comment #2
vacilando commentedThat 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?)
Comment #3
mohanrajthangarasu commentedWorks 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.
Comment #4
vacilando commented@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.)
Comment #5
bkosborneRight... 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
Comment #6
borjagut commentedThank you!