Monday, May 20, 2024
55
rated 0 times [  62] [ 7]  / answers: 1 / hits: 16466  / 14 Years ago, thu, february 10, 2011, 12:00:00

we have a website where we have list a lot of events, and would like to add discussions to each of the events.



So we wanted to use disqus, and checked it out. Turns out they use global variables to configure the instance.



like;



var disqus_shortname = '';

var disqus_identifier = '';

var disqus_url = '';


This poses a problem for us, when we don't want to use the same identifier, but rather a unique one per disqus instance. tried putting each instantiation + configuration in iframes, but that really screwed up ie8. is there a better way of doing it?



So, to sum it up; several instances of disqus on one page. how?
has someone else done it?



Thanks


More From » global-variables

 Answers
17

We faced a similar issue and emailed Disqus about this. They confirmed that by default they only support one Disqus module per page.



When browsing the Disqus JS documentation, I did find a solution that might work for you by loading and unloading the Disqus modules as the user interacts with the site:



DISQUS.reset({
reload: true,
config: function () {
this.page.identifier = newidentifier;
this.page.url = http://example.com/#!newthread;
}
});


http://docs.disqus.com/help/85/



The exact implementation would depend upon your site, but this should give you a building block to start from. For example, if the event information becomes available by expanding a content area, you could load the Disqus module whenever someone expands the event content.


[#93790] Wednesday, February 9, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
andrewb

Total Points: 259
Total Questions: 124
Total Answers: 90

Location: Ivory Coast
Member since Sun, Mar 7, 2021
3 Years ago
;