DISQUS

The Disqus Blog: embed.js too limiting

  • Daniel Ha · 1 year ago
    Hi Brian,

    You're not missing anything. Unfortunately this isn't configurable at the moment. This would make a nice documented option for developers.

    We'll talk it over a bit and see what we can do. Please feel free to shoot us any suggestions or needs you may have.
  • Benjamin Golub · 1 year ago
    It's actually Ben, but thanks! I tried doing something like this:

    var disqus_url = 'set_to_something';
    var disqus_container_id = 'set_to_something';
    $.getScript('http://disqus.com/forums/rssmeme/embed.js'); <-- that's jQuery

    But it didn't work :(
  • Benjamin Golub · 1 year ago
    Making those variables global got me a little bit further but still no dice.
  • Daniel Ha · 1 year ago
    [edit]

    We do allow you to set the container id, I stand corrected. My mistake.
  • Jason · 1 year ago
    It looks like that should have worked. What issue are you seeing?
  • Benjamin Golub · 1 year ago
    http://www.rssmeme.com/ <-- try it out by clicking a comment link (under the Contribute section of each story).

    That should load the Disqus thread into thread_NUM but as you can see it doesn't. It just blanks the screen and starts loading something. Firebug shows no errors.

    The relevant javascript can be seen at http://media.benjamingolub.com/rssmeme/js/rssme... under the numComments function. Any help would be really appreciated; I think Disqus is great (and also built using Django, a big plus in my book!)
  • Benjamin Golub · 1 year ago
    Nearly there! I copied embed.js locally and removed the document.write where you put the style in. Now it doesn't blank the page or anything.

    But it is quirky. If you click the comment link for a story it will correctly load it. Then go to click on one ABOVE that story and again it will work fine. Go try to load the comments for a story BELOW a story that has already loaded and it loads the comments on the FIRST one it sees.

    I looked at thread.js and found that it is ONLY searching for the div with id dsq-content. I could copy this locally and fix things but I'm feeling like I'm monkey patching way too much here. Could you modify thread.js so that it looks for dsq-content WITHIN the div with id disqus_container_id instead?
  • Benjamin Golub · 1 year ago
    Got it working by searching for the div with id dsq-content and changing it to dsq-content-old when you click to load the next set of comments.

    Now we're talking!
  • Benjamin Golub · 1 year ago
    Edit: nevermind this post
  • Daniel Ha · 1 year ago
    Excellent. I'm still following your progress.
  • Benjamin Golub · 1 year ago
  • Daniel Ha · 1 year ago
    Excellent, thanks!