DISQUS

Community Page on DISQUS

what is this?

DISQUS Blog

The official Disqus forum. This is the place to receive beta support and offer suggestions.
    All posts for a forum? started by atduskgreg
    Hello. I've just been poking my way through the Disqus API for integration with a project I'm working on and I was wondering if there's a way to request all posts for a given forum rather than simply those scoped to a particular thread?

    My use case is that I want to display all of the most recent comments on the front page of my site. Since the thread_url param seems to be mandatory to get_posts I can't figure out how I would do this.

    Is it possible somehow?

    Thanks!
    API to allow submitting comments? started by dsims
    I know your API will allow me to pull my site's comments out of Disqus after the fact, but what I need is the opposite. I want my comments to be created on my site, with my form, and then sent to Disqus. Will the upcoming API allow this? I would need the ability to submit comments to Disqus and then be able to fetch Disqus info about those comments and the commenter.

    The goal is to use my existing comment system, but I want to add the community features of Disqus. Having to use your javascript comment form is what keeps me from adopting Disqus.
    Integrating Disqus on Joomla! started by joomlaworks
    Hi there,

    I'm writing a Joomla plugin for Disqus, much like you guys have done already for Wordpress etc.

    Everything is properly functioning except the callback, after someone posts a comment and when Joomla! SEF links are enabled. Do note that the comment is registered properly, so if I click back or reload the article, the comment is shown.

    It'd be perfect however if I could control this callback parameter sent from Disqus e.g.
    ?disqus_reply=717544#comment-717544

    When this is added on a joomla SEF url like:
    http://demo.joomlaworks.gr/content/view/34/50/
    it becomes
    http://demo.joomlaworks.gr/content/view/34/50/?...
    and Joomla throws an "unauthorized to view this resource" link, which is bad obviously. If SEF is off for Joomla, then all is well.

    It'd be great if I could control this callback parameter. Any hints are welcome. Once I fix this, I plan to release the Joomla plugin as a free extension (GPL v2).

    You can see Disqus working on Joomla here:
    http://demo.joomlaworks.gr/
    (click on any article, I've even added the comments number outside of the article ;) ).

    If there is any documentation you could point me additionally, I'd be very grateful.

    Thanks

    Fotis
    JoomlaWorks
    The black sheep "num_posts" started by digitarald
    I did not found the old thread about this problem so I open a new one.

    The response for a thread with get_posts holds a property "num_posts" ... which contains NOT the total amount of posts but the amount of posts in the response, the weird result:

    http://digitarald.de/project/fancyupload/?page=... : Comments 26 – 44 of 19

    I hope that nobody reads that numbers.

    Another problem with get_num_posts), both numbers are wrong because they include removed comments. So I have a project-comment-header that says 44 comments, but there are not 44 visible comments because I removed some.

    And another one:
    http://disqus.com/api/v1/get_posts/?forum_url=d...
    No per_page parameter, still num_posts is 26, default per_page (from documentation) is 25.

    I hope that helps your development progress.
    Edit bug started by William Meleyal
    After editing a comment (save/cancel) the .dsq-post-reply iframe doesn't behave as expected.

    It should revert back to its original state, but at the moment it keeps the iframe dimensions, and the edit link moves to below the comment.

    Before:
    <img src="http://farm4.static.flickr.com/3279/2670708715_bbacdeca8b_o.png" />

    After:
    <img src="http://farm4.static.flickr.com/3043/2671533310_ea008a0094_o.png" />
    Making Disqus XHTML Compliant started by Winston
    Hi,

    While trying to integrate disqus into my wordpress blog, I noticed that disqus is non-xhtml compliant. I would really love to fix this before I go live with my blog..

    The first issue is with the js snippet that would display the number of comments for each post. That has been brought up before on this forum and solved by others, and I have a solution myself as well.

    Another problem which I can't really do anything about is with this page: http://disqus.com/embed/reply.html?f=disqus&t=a...
    This page is embedded in an iframe and then inserted into the post by the disqus js snippet. However, this page fails to validate too.

    Basically, it's missing a doctype, and that's one of the problems that's screwing it up with the validator.

    I wonder if disqus will have a solution for this? It's really not too difficult to make things xhtml-compliant, and it would go a long way in promoting disqus's usage among others.

    Thanks in advance.
    Disqus Comments via Jabber/XMPP/GTalk/Instant Messages started by Rob Loach
    You can already reply to threads via email. There are plans to incorporate the same for SMS so you can make replies to comments from your phone. Wouldn't it be cool to make it so that you could make replies through instant messages?

    Lots of web services out there are beginning to do this. Twitter, for example, allows you to input your Jabber/GTalk account information, and it adds a Twitter buddy on your contact list. When you send instant messages to this Twitter contact, it posts the message to your Twitter wall.

    How would this work with Disqus, you ask? When new comment notifications come to you, the Disqus Jabber contact would send you a message with the comment's author name, the body, and the comment ID. When you send an instant message back to the Disqus contact, the message would be made as a reply to the comment. Here's an example of what it would look like from your Jabber client:

    Disqus is now online.
    Disqus: Daniel wrote: Wow, this is really cool! Link: http://example.disqus.com/path_to_thread/#comme...
    Rob: Yeah, I know!
    Disqus: Your comment has been posted.

    As you can see, this would bring website comments off of the web and onto your desktop by placing them into your Jabber client contact list. Cool idea? No, very cool idea.
    jQuery Disqus Plugin started by Rob Loach
    When integrating Disqus using the JavaScript integration, it instructs you to place some < script > tags within your document. Although this is fine, it's not that great for performance because when the users' browsers reaches the script tags, it automatically downloads, and runs the script. A better practice to managing JavaScript is to have it load all the content first, and then execute the JavaScript when the page is completely ready.

    jQuery comes with this ability through a call to:

    $(document).ready(function() {
    // Do stuff here!
    });


    I wanted Disqus to use this so that when the page was loading, it wouldn't stall when it started loading the Disqus thread. So I started working on a Disqus jQuery plugin.... The code is right here at the moment, but I will officially publish it once everything is working.

    The idea is that you just provide the basic DOM that Disqus recommends. With the number of comments links with the #disqus_thread fragment at the end, and a < div id="#disqus_thread" > where you want the Disqus comment thread to appear. At the top at the page through, we add a call to the jQuery Disqus plugin:

    $(document).ready(function(){
    $.Disqus({domain:"myusername"});
    });

    This call would do all the JavaScript execution, making the comment links reflect their number of comments, and make the Disqus thread visible. Since it's using jQuery's ready event, it wouldn't stall the page on load. If you have a look at the JavaScript page though (http://drupalbin.com/2575), you see that I ran into some problem when attempting to show the Disqus thread.


    // Call the Disqus script to create the Disqus comment thread
    alert('Attempting to create the comment thread!');
    //$('#' + disqus_container_id).load('http://disqus.com/forums/' + settings.domain + '/embed.js');
    //$('#' + disqus_container_id).text('').append('<script type="text/javascript" src="http://disqus.com/forums/' + settings.domain + '/get_num_replies.js"/>');
    //$.getScript('http://disqus.com/forums/' + settings.domain + '/embed.js');

    $('#' + disqus_container_id).appendDom([{
    tagName :'script',
    type : 'text/javascript',
    src : 'http://disqus.com/forums/' + settings.domain + '/embed.js'
    }]);

    alert('Done creating thread, ready for the white screen?!');


    This is where we add the < script > tag, using jQuery, after the < div id="disqus_thread">. When we make the call to Disqus though, it ends up just showing a white screen forever. This embed.js is a horrible peice of code, and extremely limiting. Is there anyway around this?
    Users API started by ubelt
    I have my own site with its own user database. I want to integrate disqus into my site but I don't want my users to sign up separately with disqus.

    Is there any way to create a disqus user through the API or link the account with my site with disqus?

    Thanks.
    Integrating Disqus on Vox--getting cut off on the sides started by theKK
    Vox is cutting off my embed--anyone know the width dimensions of the feature so I can compensate for the edges that are getting cut off? I fixed the height problem. Thanks!
    Adding Disqus to custom pages started by martinm
    I have a website where I would like to add disqus to different pages automatically. I have a custom setup so I don't use any of the blog platforms for which extensions are written. Is there a way to automatically generate a topic for each page and start the comments using the API? Unfortunately i couldn't find documentation on how to use the API for this. I'll try looking through some of the extension code unless someone can help me out.

    Thanks,
    Martin
    disqus_url? started by Rob Loach
    If you have a look at http://disqus.com/help/#faq-16 , you see some documentation about a JavaScript variable named disqus_url. By reading the description, it seems like you set this to the absolute URL of the post.

    Now, what happens if I move the post from "http://example.com/my_path/my_post" to "http://example2.com/my_path/my_post". The contents are the same, so I'd like the comments too should be the same. Assuming that you'd make disqus_url the absolute URL, it would reflect the change to example2, but it seems like this might create a whole new Disqus thread.

    So, should disqus_url then become the unique descriptor for the page? Instead of "http://example.com/my_path/my_post", provide "my_path/my_post", so that the thread stays the same?

    What if it's the same content, but on different domains? example.mobi should provide the same content as example.com, but using a mobile device template. The comments should be the same no matter what the domain is...

    Any help with disqus_url would be appreciated. Should it be the absolute URL to the post, despite the base URL being able to change?
    Get the Disqus slug for a post started by Glenn Slaven
    Is there any way to get the serialised slug for my posts (ie http://slaven.disqus.com/jaiku_might_just_be_go...)

    There seems to be some weirdness in the way it's constructed:
    http://slaven.disqus.com/donrsquot_forget_firef... I'm guessing the post title is encoded then spaces replaced, but I'd really like to know the actual string serialisation rules used if possible?
    slight alteration to javascript to help it validate started by copiousfreetime
    I just joined disqus and in my pages the validation for XHTML Strict 1.0 failed when the disqus javascript was put in place. I changed a couple of things and it still seems to work

    1) //<![CDATA[ instead of //<[CDATA[ this makes it valid. It is missing a !
    2) do document.write(unescape( ... )) and use %3C and %3E instead of <>
    3) also convert & to &
    HowTo: Integrate Disqus with Drupal started by sreiser
    Just posted a howto for Disqus + Drupal on my blog here. Take a look, share and enjoy!
    creating a page of all recent comments over multiple topics? started by sinker
    I'd like to create a page that collects all recent comments to my site--so distributed over multiple different topics. The API doesn't seem to have much documentation yet. Has anyone done this successfully?
    comments for an article by URL started by khodabakchian
    Hi,
    My name is Edwin Khodabakchian. I am a contributer to a small rss reader project. We have integrated our reader with wordpress comments and would like to try to provide a similar integration with Disqus.

    As such, I was wondering if there is an disqus API to which I can pass in a blog article URL and get in return the representation of the comments associated with can article?

    In the case where additional parameters are required, is there an API where I can pass in the main URL of the blog or the feedURL and get back those additional parameters?

    Thank you,
    Edwin
    Platform API? started by brlewis
    My current system for Disqus integration on OurDoings is pretty good. Users only have to sign up for Disqus, then fill in one piece of information on OurDoings and they're set.

    Here's what would be better: I pass users along to Disqus with a parameter that gives the "blog" URL for their site within OurDoings, and a return URL that Disqus passes parameters to in order for OurDoings to complete the integration. How hard would that be to implement?
    Vertical Scroll Bar & Static HTML help started by Admin
    Just integrated Disqus into my non-php blog (it's all coded manually in html), so I'm a little new to the game (especially commenting systems).

    I have two questions.

    1. The main body of my blog page has a fixed height. The container provides a vertical scroll bar should content overflow. Upon Disqus integration, I've noticed that the browser has a vertical scroll bar now as well. When I scroll down with the browser scroll bar, I notice the Disqus rating tool at the bottom of my page. How do I fix this so that the only scroll bar I have is in my container?

    Furthermore: In Windows IE, something about loading the script causes the scroll bar in my main body container to disappear. Perhaps it's my inexperience with javascript but I could use some help.

    2. Since I'm archiving these blog entries the old fashion way, how do I migrate comments with the entries, and clear the comments on the current page for a new blog entry?

    Thanks for your help.

    ~ Huy
    Developer Comments started by bdmetrics
    Is it possible to set up a blog that can be used for development integration that is not publicly exposed?

    Alternatively is there a way to delete all comments from a blog to "start fresh" once you move into production?
    JS error from embed_vote_buttons.js started by digitarald
    Seems that this js ignores deleted messages and try to find dsq-rate-up-291098 on the page for thread 294350 ... and sets the src attribute of the first child node without checking if it exists.

    My ideas for solutions

    1) Don't use results from getElementById without checking if the element exists. JS-errors on a page about Ajax widgets are kinda bad.

    2) Don't use childNodes[0]/firstChild since it can be white-space when the html is hand-generated. I worked around that by removing line breaks in my html, but its a js design flaw.
    get_recent_posts without thread? started by digitarald
    Sorry if I get this wrong, but get_recent_posts sounds like a nice way to generate a "Recent Comments On My Blog"-panel ... but the API returns that I need to give a thread parameter ...

    Is there another API method to do what I described? Now I need to parse the comments RSS feed, which is ok for the moment but the API could provide more information like rating and user profile.
    Errors + Suggestions started by digitarald
    1) vote.js throws an error because in line 12

    if(typeof(Dsq.Thread.HlTimer) != 'undefined') {

    because Dsq is not defined.

    Correct: if (window.Dsq && Dsq.Thread && Dsq.Thread.HlTimer) ...

    2) embed_vote_buttons.js sets block-style for vote-anchors to "block", which destroys inline vote links (overrideable via !important, but thats hacky)

    Correct: use unobstrusive class-names to "enable" them or set block style to ""

    3) Same for the "Update arrow icons" part in vote.js. Use class names to update the state of the clicked button, forcing the innerhtml doesn't allow customization.
    Prevent scroll bars when textarea height increased. started by iiijjjiii
    Thank you for the feature that allows us to stylize the comment entry textarea.

    We would like to increase the height of the textarea. When when we do so, the height of the iframe the textarea is in doesn't change. As a result the iframe has a vertical scroll bar. Any idea of how to prevent this?

    If it's not possible, I'd like to request that for a new feature :)
Returning? Login