0

I am pulling my hair out trying to find an answer to my question. I am creating a community site and one of its main feature is to comment and rate other users. For some reason it seems this is not possible on Drupal 7 since I haven´t found a clear answer to this question. Could you please please please guide me on this?

Thank you very much.

1 Answer 1

1

To stay in Drupal language: The problem is that User account pages are not "nodes" (no normal content type like you may expect) nor full "entities" (bundles of fields grouped as type in Drupal 7 world). This missing is a big left over from earlier days of Drupal and not really wanted as-is in the Drupal community since it is against the field-able framework idea behind Drupal. Plus that comments are sadly sticky to nodes (not usable elsewhere).

There are many efforts to change this and (from what I know) solved in D8. And the user accounts are fieldable now in D7 already, but still not really "known" everywhere in the system and that's why the system provided "comments" bundle can't be activated here. User pages are not nodes. The concept of "Entities" is another one of the efforts to have fieldable bundles everywhere, one of these steps away from the inconsistency and to get a more general reusable logic of field-able "groups of elements" everywhere, not only on nodes or user pages. Comments are already entities but not known by user pages. And so on and so forth.

Some work arounds for Drupal 7 could be now to use modules like profile2 (a little bit limited, but fully field-able entity), or "Reply" (will be awesome, but new and needs some more help!), or to build own "entities" or content types (my suggestion) which can be made relative to users (like blog already is) using modules like entityreference or relation (awesome but for this usecase allone maybe too powerful). This gives you more than comments as an option, plus the complete freedom about how to field your custom "user pages". And you can even show them apart from the user account page, like on facebook profiles or in tabs. (advanced views and menus knowledge needed here)

Another way could be to use the manage fields settings dialog of Drupal core and "bow" them as fields with multiple values to a kind-of-comment behaviour. I already did this very successful on project, where the clime was limited and to choose this way was less effort to achieve. But for more complex needs I would rather suggest my earlier solutions.

Aaand ... an outsourcing comment solution would be: the Disqus module. Surprise: it also works on profiles. (sorry, but I am limited to less than 3 links ATM, it's a new DA account.)

But as you can see: as always in Drupal, there are more than 2-3 ways to achieve a wanted behavior in Drupal projects.

Hope it helps a 'lil bit. Best regards...

7
  • 2
    wow! awesome round-up! thx. very helpful.
    – nilsun
    Commented Jun 23, 2014 at 20:01
  • You have no idea how much I appreciate your answer. It is not as easy as I thought it would be. I am going to try your suggestion using entity reference or relation. So I am going to create a content type called say rates, then I am going to use entityreference to relate that content type to user profile default page. What do you think about using fivestar module along with entity reference and try to add not just stars but also comments on user profiles?
    – gjanet83
    Commented Jun 23, 2014 at 20:50
  • 1
    @user1801618 you should vote and favour his answer up if you think it was helpful. To your other question: isn't fivestar depending on vote API? diqidoq's suggestion is very smart but surely not easy to go thru ... but he's module maintainer on Drupal.org so he is surely the right man to ask I think.
    – nilsun
    Commented Jun 23, 2014 at 22:39
  • Hi diqidoq, could you please guide me how you did "Another way could be to use the manage fields settings dialog of Drupal core and "bow" them as fields with multiple values to a kind-of-comment behaviour. I already did this very successful on project, where the clime was limited and to choose this way was less effort to achieve. But for more complex needs I would rather suggest my earlier solutions."
    – gjanet83
    Commented Jun 25, 2014 at 17:43
  • I tried using disqus but I don´t see a way to add it to the default user profile page... Also, since it is a community site, users who wants to interact with other users should already be able to comment without having to log in to disqus to post a comment. Sorry if I am sounding counfusing. I am not a drupal developer so even though I am trying to follow you up, it just sounds very complex for me, but I am learning :)
    – gjanet83
    Commented Jun 25, 2014 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.