I've attached patch, a first draft, at keeping track of the comment count.
When the node is accessed it queries facebook's API and updates the database with the comment count.
I've added configuration options it's make the feature optional, as well as setting a minimum wait time inbetween checking for updates.
The comment count can be accessed in views.
UPDATE: that patch was a fail... I'll have a go at re-rolling it.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | facebook_comments-Comment-Count-Add-Link-1358964-4.patch | 41.27 KB | jcmartinez |
| #3 | 0001-Comment-Count-Functionality.patch | 5.36 KB | jackread |
| 0001-add-functionality-to-track-comment-count.patch | 8.21 KB | jackread |
Comments
Comment #1
wmostrey commentedWith the color scheme patch in place, you are free to re-roll.
Comment #2
wmostrey commentedComment #3
jackread commentedhere's a re-rolled patch that doesn't suck :-)
Comment #4
jackread commentedStill TO DO:
Comment #5
askibinski commentedJust a quick note:
I didn't use this module, but I do use facebook comments on a D6 site instead of drupal comments.
I wanted to have the core `node_comment_statistics` table being updated each time a FB comment was made. This is easily done by applying a ajax callback and some custom code.
JS:
And in your php add a hook_menu for count/comment which does a db_query (and of course some validation).
You can also use 'comment.remove' to create a callback which counts down when somebody removes his/her comment.
The benefits of doing it this way is that the counts are available in core statistics/views/etc.
Comment #6
charmi commentedif you want to know the total no.of comments left on your page then the fb:comments-count tag will emit the number of comments on your URL in a tag. for eg: if you want to show no.of comments in dummy.com you can include the following :
<fb:comments-count href=http://dummy.com/></fb:comments-count>Total commentsHope this might help you!
Comment #7
jcmartinezThe attached patch adds a few changes that I had to make in order to meet the needs of a project. I'm sharing it in case it could help someone else.
The changes that this patch provides are:
Note: This patch was made against version 7.x-1.x-dev from 2012-Aug-08 and it contains most of the code added on a previous patch by jackread on comment #3. Therefore; by applying this patch most changes from the other patch will be applied as well.
Please let me know if you find problems and thank you for creating this great module.
Comment #7.0
jcmartinezpatch fail