Closed (duplicate)
Project:
Disqus
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2011 at 20:48 UTC
Updated:
30 Jun 2012 at 23:07 UTC
Jump to comment: Most recent file
Comments
Comment #1
robloachIt's not missing, it's non-existent! It would be great to get their new API v3 working with it: #298540: Add support for API version 3 in migrate module. Definitely needs a re-thinking in Drupal 7. Thanks!
Comment #2
XiaN Vizjereij commentedSubscribe
Comment #3
robloachRedesign the architecture here to take advantage of http://docs.disqus.com/developers/export/ and http://docs.disqus.com/developers/api/ on cron.
Comment #4
c-c-m commentedI'd love to use this module in an existing D7 with content. Hope there's progress on this.
Comment #5
c-c-m commentedHello,
Is there any progress on this issue? This functionallity is the only thing that doesn't allow me to use this great module.
Thanks
Comment #6
daco commentedSubscribe
Comment #7
kevinwalsh commentedSubscribe
Comment #8
chefmungus commentedSubscribe
Comment #9
jugglerpm commentedsubscribe
Comment #10
bkosborneIsn't this sort of a duplicate of the API v3 thread?
Anyway, I agree that this needs a revamp. But there are certainly things to consider here. The import/export functionality of the module as it stands seems to be best suited for those that either want to completely switch to using Disqus and no longer use Drupal comments, or the opposite. I know that the export to Disqus functionality doesn't work that well at all (I've had countless issues with it) and could really benefit from using the new API.
However, there are also a group that would like to use Disqus, but want the SEO benefits of having the comments displayed on a page during server-side processing and not Javascript. This involves having a synchronization cron function to periodically bring in Disqus comments into Drupal somewhere. Presumably, this would "somewhere" would be Drupal's comment system. This may not be the best approach and could over-complicate things for users that simply want the comments output somehow on the page and just hide them using CSS. See http://drupal.org/node/298540#comment-4174698 and the sandbox module for that type of implementation.
Personally, I don't think it's really worth doing a full integration with the API for this module. Importing comments into Drupal from Disqus works without the API at all (uses an XML file), and Exporting comments into Disqus from Drupal also works without the API at all, but not as this module currently implements it (an XML file can instead be generated and brought into Disqus). I think the only reason for the API is to "sync" the comments that exist in Disqus into some sort of datastore in Drupal, whether it be a new schema or working it into the Drupal comments table.
Thoughts?
Comment #11
bkosborneI've patched the migrate module to handle exporting comments to Disqus in a completely different manner. Like I stated above, I had a ton of issues with exporting with the API. I spent a while trying to debug the issues, but after running into these problems I decided to just implement a much easier method: an XML file.
Disqus supports importing comments via a WXR-style XML file. It's modeled after WordPress, but it doesn't matter. Please review this patch. It simplifies the module a whole lot (removes need for the export DB table, and disqus.php).
The patch is against the latest code in the DRUPAL 6 branch. If this is reviewed well, I'll port to D7 as well.
Comment #12
bkosborneattached
Comment #13
robloachThis is great! Thanks so much for putting this together. Definitely is worth a commit. Once it's in, it'll be easier to test and get feedback on too. So, I'd say commit this, and then let's clean things up afterwards. Well done, Brian!!!
Comment #14
robloachIs this for Drupal 6 or 7? We should target Drupal 7 first, and then get things back into Drupal 6.
Comment #15
bkosborneThanks! The patch certainly needs to be tested first ... I think I missed adding the return array in the update. I'll put it through some additional testing tonight.
Comment #16
bkosborneUpdated the patch with some refinements and fixes. I'm pretty sick at the moment so lets hope the code all makes sense :). Once someone else reviews and tests, I'll commit to 6.x dev and work on 7.x.
Comment #17
bkosborneMoving this to 6.x until I patch for 7.x.
FYI: I tested this on a site with nearly 4,000 comments. The generate function didn't take long.
Comment #18
robloach:-)
Comment #19
kstrauser commentedTHANK YOU. This worked perfectly for my ~1600 comments after repeated errors with the API.
Comment #20
bkosborneFYI - the code in this patch is being refactored into a larger patch that revamps the whole migrate module. Exporting via the API will also be available, which will integrate with the rest of the module a bit better. I'm closing this and marking it as a duplicate of #298540: Add support for API version 3 in migrate module. Please use that thread to track progress of getting this integrated into the module.
Comment #21
pichot commentedFor what it's worth, I just released a small script that exports Drupal 6 comments into DISQUS compatible XML files. It doesn't support threaded comments, but it might still be helpful to someone.
The challenge with the DISQUS API for importing comments is that they only allow 1000 calls an hour. For sites with many comments (I used this script on one with 180,000 comments), using the API would take weeks. DISQUS doesn't seem to have a limit on the number of XML files you can upload, just the size of the files, which the script takes care of.
https://github.com/pichot/drupal6-to-disqus-xml