Needs work
Project:
Disqus
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
15 May 2011 at 00:20 UTC
Updated:
17 Mar 2015 at 21:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedCrumb. Forgot to add context. I'm using the Media Gallery module (http://drupal.org/project/media_gallery) to manage multiple photo galleries. I'd like to be able to have Disqus comments for each separate photo.
Comment #2
robloachMedia Gallery uses bundles and the Entities API, right? Would be great for Disqus to support Entities, then we'd get this out of the box.
Comment #3
robloach... And then maybe use UUID to generate a unique string for what the user is looking at?.... Hmm, not sure. Entities seems like the right direction.
Comment #4
robloachMaybe switch over to a Field?
Comment #5
pounardSub. Field would be a killer feature, and would allow you to avoid doing SQL queries at load time.
Comment #6
thehong commentedAnyone working on this? I am going to make a try this weekend. Please reassign if you already started.
Comment #7
robloachWould be very cool to have! Think you'd handle it via a Field for Entities?
Comment #8
thehong commentedThis patch just provide basic field, many things are missing:
1. Hardcoding $disqus['title']
2. Does not support entity links (comment counter)
3. Views does not work yet
4. Upgrade path...
Comment #9
bryancasler commentedWould love this for taxonomy pages
Comment #10
rerooting commented+1 for the same reasons (taxonomy, uid, other contextual filters, etc.)
Full entity implementation would be rad. Entities do not need to be stored in the database, so one could provide some very interesting capability this way using block/panels cache to temporarily store data fetched from the disqus API.
The field implementation is a good quick start, but we will need to be providing more than that.
We need a simple entity called disqus_comments with these fields exposed to views:
* Author UID (if drupal user)
* Author name
* Author gravatar
* Node/Entity Relationship (for building relations)
* Comment body
* isParent (filter)
* isFlagged (filter)
* Votes
* Likes
* etc...
Comment #11
polYou should remove dsm().
Comment #12
marcingy commentedThis also needs a migrate path.
Comment #13
semei commentedThis would be a great feature and it would allow us to use Disqus comments on (non-node) user pages. Any news on this?
Comment #14
thehong commentedComment #15
thehong commentedRemove the space.
Comment #16
aaronbaumanDoesn't work.
After adding the disqus field, updating disqus settings, and re-saving, no disqus widget appears.
In fact, disqus_field_formatter_view() is never even invoked on the pageview.
Edit: have to re-save existing entities in order for comment form to appear.
is this what you mean by upgrade path?
probably pretty important to include this in any RTBC patch.
Comment #17
slashrsm commentedIt could be, that your problems originated in field cache.
@marcingy probably meant about per-node configuration, which is currently in a custom table and will be moved to a field with this patch. Sure... we need that if we want to mark this as RTBC.
Comment #18
semei commentedI have patched disqus, but when I upload a file and redirect to its page (where I want the comments to appear) I get the following error message:
Notice: Undefined index: comment_settings in disqus_field_update() (line 59 of [...]/sites/all/modules/disqus/disqus.field.inc).
A backtrack tells me that the following functions were involved:
24: disqus_field_update(), 23: _field_invoke(), 22: field_attach_update(), 21: file_entity_file_update(), 20: call_user_func_array(), 19: module_invoke_all(), 18: file_save(), ...
Comment #19
aaronbaumanFinally got it working.
Had to change 'url' js setting to absolute.
Updated patch attached.
Leaving on "needs work" because we still need a migration path.
Comment #20
aaronbaumanoops, forgot to remove dpm()
Comment #21
aaronbaumanCurrent patches don't allow turning disqus comments off.
Updated patch attached.
Comment #22
slashrsm commentedI am very excited about this patch. Great job!! It makes so much more sense to implement it this way. We need to support "old way" when we commit this, but we should definitely encourage people to use fields. That's why I think this patch also needs to add some documentation in README.txt. I think we should remove old way and only keep this approach in Drupal 8. Upgrade will be much easier if people will start using field approach already in D7.
Few bits and pieces:
entity_label()?
https://api.drupal.org/api/drupal/includes%21common.inc/function/entity_...
Identifier is now configurable. We should also support this in field.
I get two "Comment settings" vertical tabs. See attached screenshot.
There is some JS in latest -dev, which creates some summary. We should also use that with fields.
Some unwanted whitespace.
Comment #23
Grayside commentedIt makes sense to consider starting a 2.x branch to support Disqus-comments-as-fields rather than trying to support both in one codebranch. This way you can also separate the upgrade path into stages, 7.x-1.x => 7.x-2.x => 8.x-2.x.
Comment #24
nsciaccaI applied the patch from #21 and it's working fine with my terms after the terms are saved. What needs to be implemented to get it to work on all the other pre-existing terms?