Closed (duplicate)
Project:
Disqus
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2008 at 19:47 UTC
Updated:
18 Oct 2011 at 06:53 UTC
Jump to comment: Most recent file
Comments
Comment #1
robloachVery strange that views_handler_field_node_link isn't available..... Has anyone else ran into this?
Comment #2
robloachConfirmed. The Views integration needs a patch ;-) . It does this only when the Views API hook is in there.
Comment #3
robloachThe Views integration is missing the "parent" class value.
Comment #4
mrayyan commentedGuys, I am not sure if this is the same issue since I am not receiving any errors or such.
But for the life of me, I cannot find disqus hook on views. Maybe I am blind, but where am I supposed to look for it in views under node type?
thanks!
Comment #5
robloachIt's not enabled because it's broken. I think it needs a "parent" class value. Take a look at disqus.views.inc.
Comment #6
nitram079 commentedsubscribing
Comment #7
myersca commentedI have some highly customized layouts using Views and I am trying to get the "# of comments" link to show up on the different entries on the pages and blocks. So the number of comments link shows up on a view when the type is Node, but if the row style is fields, it does not show up (or I can't figure it out). How can you add it to a view display with fields? I looked at the different types of layouts and I could not find it in any of the different setting pop-ups. Is there something one has to do to get the discus comment count to show up on any view other than Node view inside the a views' configuration area? Thanks.
Comment #8
divThis commentedAttached is a patch for version 6.x-1.5, upgrading the module to use the new Views 2 API. The new API requires that each handler class be contained in its own include file, so that file is attached along with the patch. The new file should be placed directly in the root of the "disqus" module directory and renamed to "views_handler_field_node_disqus_comments.inc".
Comment #9
peter törnstrand commentedSeems #8 is implemented in the latest release? However I still can't get it working with View fields. To get this working I made the following modifications:
File: disqus.views.inc
create a folder named include, add a file named views_handler_field_node_disqus_comments.inc with the following code:
Add the following code at the bottom of disqus.module
Comment #10
robloachLike this?
Comment #11
peter törnstrand commentedLooks right!
Comment #12
les limRTBC.
FYI, this won't work on the view preview because the requisite JS won't be loaded. It might be appropriate to make a note of it in the handler's help text.
Comment #13
robloachThanks! http://drupal.org/cvs?commit=343548
Comment #15
suedehead commentedI'm opening this back up because I really can't find the Disqus comment count on Views anywhere -- this should show up in a node-type views underneath the 'sort' menu part, right? I can't find anything there..
Comment #16
robloachWhat version are you on? Could you try -dev? Do we need a new release?
Comment #17
basvredeling@ #15, there is a field handler, but no sort handler. You can display the comment count as a field, but you can't sort on the field.
As far as I know, the field's not numeric anyway. The output of the field can be something like "20 comments and 14 reactions".
This'll show if you've got both comments and reactions enabled in the disqus domain settings. It'd be difficult to make a nice sort on that.
Comment #18
-enzo- commentedhello @#17 basvredeling
When you said "It'd be difficult to make a nice sort on that" where is the problem in views integration with Drupal or in Disqus API.
Regards,
enzo
Comment #19
basvredeling@-enzo-
I don't know where the problem lies exactly. But the field disqus_comments is actually 2 fields (depending on your disqus configuration): comments and reactions. So views integration should split those up and make them both numeric in order to do proper sorts on them. If that is at all possible with the disqus api of course.
Comment #20
topdawg commentedI just installed it and only see one item in views which is the node item comments count is there any other view item for fields?
Comment #21
robloach#1095194: Disqus Migration module revamp... Would be nice to cache the comments in the Drupal database so that we could do this kind of this with it.
Comment #22
andreigg commentedI've created a simple module that updates the comment count statistics for nodes from Disqus. You might want to check it out here: http://andreigherasim.net/disqus_comment_count/
Comment #23
brunorios1 commentedsub
Comment #24
brunorios1 commentedhi andreigg,
i tested your module and it works perfectly.
thank you!
Comment #25
yngvewb commentedandreigg: Wow, just what I have been looking for! This should be a sub module for disqus. Could you include it?
Comment #26
alexkb commentedNice work andreigg! A note to others using this module, you'll need the core comments module enabled (and not the statistics module - as I originally presumed).