Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
1. We create categories (using api) according to the bundle name of the entity to which the disqus field is present. Adding disqus_category_id as field-level setting and all the field instance to this entity will have the same category.
(For eg. for content type 'article', the disqus category will be article).
Since creating categories require disqus api, this method would be an advantage as fewer api calls will be required and also it would much simpler to understand that disqus[category] = entity[bundle]
2. We give a field instance option 'category' while creating or editing an entity. the user will specify a category( sports, politics,etc), so it gives a bit of flexibility in categorizing comment. But why give the site's user the trouble to specify a comment category seperately ? Also there is no real implementation or any widget provided by disqus related to disqus_category_id, maybe in future we can provide views in drupal filtering with disqus categories.
First method seems better; wont be providing any form element for it. On field creation, just calling the api method categories->create on the bundle name string. The category will remain default 'General' if api is not installed.
Comments
Comment #1
JayeshSolanki CreditAttribution: JayeshSolanki commentedAdded support for disqus_disable_mobile:
https://github.com/angrycodr/disqus-for-drupal8/pull/20
Comment #2
JayeshSolanki CreditAttribution: JayeshSolanki commentedComment #3
slashrsm CreditAttribution: slashrsm commenteddisqus_disable_mobile looks ok. disqus_category_id still needs to be implemented.
Comment #5
JayeshSolanki CreditAttribution: JayeshSolanki commentedI see two ways in which we can implement disqus_category_id (https://help.disqus.com/customer/portal/articles/1261676-using-categories)
1. We create categories (using api) according to the bundle name of the entity to which the disqus field is present. Adding disqus_category_id as field-level setting and all the field instance to this entity will have the same category.
(For eg. for content type 'article', the disqus category will be article).
Since creating categories require disqus api, this method would be an advantage as fewer api calls will be required and also it would much simpler to understand that disqus[category] = entity[bundle]
2. We give a field instance option 'category' while creating or editing an entity. the user will specify a category( sports, politics,etc), so it gives a bit of flexibility in categorizing comment. But why give the site's user the trouble to specify a comment category seperately ? Also there is no real implementation or any widget provided by disqus related to disqus_category_id, maybe in future we can provide views in drupal filtering with disqus categories.
First method seems better; wont be providing any form element for it. On field creation, just calling the api method categories->create on the bundle name string. The category will remain default 'General' if api is not installed.
Comment #6
JayeshSolanki CreditAttribution: JayeshSolanki commentedpull request for implementing disqus_category_id according to the first method as I stated above :
https://github.com/angrycodr/disqus-for-drupal8/pull/35
Comment #7
slashrsm CreditAttribution: slashrsm commentedFew comments.
Comment #8
JayeshSolanki CreditAttribution: JayeshSolanki commentedthis page no longer lists disqus_disable_mobile. Maybe we should remove it too.
Comment #9
slashrsm CreditAttribution: slashrsm commented#8 looks good.
Comment #10
kopeboy CreditAttribution: kopeboy commentedAny news on Disqus categories?!
(I am interested in Drupal 7 atm..)
Comment #11
slashrsm CreditAttribution: slashrsm as a volunteer commentedThis is D8 feature only. Any patches for D7 are very welcome.
Comment #12
slashrsm CreditAttribution: slashrsm as a volunteer commentedIt would be great to have a patch from the pull request in #8.
Comment #14
gaurav.kapoor CreditAttribution: gaurav.kapoor at Axelerant for Drupal India Association commentedComment #15
gaurav.kapoor CreditAttribution: gaurav.kapoor at Axelerant for Drupal India Association commentedI have modified the scope of this issue and removed the settings and feature-related mobile optimized version. Thanks everyone for working on this.