Comments on all fieldable entities: an update to the Livefyre module
Breadcrumb
- Home
- PronovixBlog
- Comments on all fieldable entities: an update to the Livefyre module
Livefyre wanted to better integrate its services with the Drupal platform and asked us to make sure that the Livefyre integration module was architected to conform with Drupal best practices. They also wanted to give the module better feature parity with Livefyre’s WordPress integration. Following an earlier code review, Pronovix was asked to refactor the module to turn comments into fields, to add search indexing, a synchronization mechanism and a comment count. AaronELBorg did a great job with the original Livefyre module. As a module originally developed for Drupal 6 and then ported to Drupal 7, it did not yet fully leverage all the new possibilities with Drupal 7’s API. When Livefyre asked us what we could do to make the module use best practices in Drupal, the obvious question was what we should do with the comments, originally a custom attachment to the node body. It was around this time that the developers of Drupal 8 worked on the feature to add comments to entities as fields, so we thought it would be a simple and flexible solution to not only extend the commenting functionality to users, but implement it with fields. What are the advantages of this approach? If comments are fields, you can
All this shows that with a small extra effort we got a significantly more abstract solution, that extends beyond the original idea of commenting on nodes to enable comments on users, taxonomy terms or even custom entities.
Articles on devportals, DX and API docs, event recaps, webinars, and more. Sign up to be up to date with the latest trends and best practices.