2

I have Downloaded, Installed and enabled profile 2, profile 2 pages & profile 2 group access ( i have organic groups)

Then went to permissions View any profile (all users), View own profile (authe. , admin), Edit own profile (authe. , admin.)

After which i Went to Config > People > Account settings > Manage Display > Custom Display settings and checked user account.

Whats are the next steps that i should do, or are missing, that i should have done, inorder to enable user profile page along with default comments enabled on this page ?

2

Not sure what you mean by default comments, but I doubt you can use core comments with Profile2 entities. The comment module only works with nodes.

See this core issue for work being done in this area.

Check the Profile2 issue queue for potential workarounds for comments.

2

A nice workaround is to use Rules, Entity reference and Display Suite (or views). First, you create a new content type 'profile_ref_node_type'. Add only comment fields and delete any unnesseccary fields.

You can now create a new node of the type upon creation of the profile via rules. Add the 'entity has field' condition to be able to access your field. As the action I've used my own PHP code, but you can probably use the standard rules as well. My PHP code for creation of the node and entity reference:

$node = new stdClass;
$node->type = 'profile_ref_node_type';
$node->title = 'Profile - [profile2:field-name]';
$node->uid = 1;
node_object_prepare($node);
node_save($node);

$profile2->field_node = array('und' => array(array('target_id' => $node->nid)));
profile2_save($profile2);

You then can use this entity reference with display suite to show only the comments on that node (make a new display type if you want to use multiple fields of your node).

1

I've done a lot of research and the best solution I've found is using the Flag Module. Version 7.3 of Flag is now fieldable. So you create an "add comment" flag and add a text field + whatever other fields you want to it. Then you can display the contents of the flags in a view. Very flexible, extendable and non-hack-y solution. Unfortunately this will only work in a use case where only one comment/message is needed (Unless you make a ton of flags).

0

You can use the rely module http://drupal.org/project/reply

Reply is a D7 answer to entity comments.

Reply is basically a fieldable entity so you can create a 'review', 'comment', 'forum post' or whatever you like by creating bundles and attaching fields to them. Such bundles can be attached to any fieldable entity by 'reply field'.

0

When I search the solution for comment on profile page, I entered this page many times, at last I found a solution, I used the Guestbook module

Guestbook module provides a site guestbook and individual user guestbooks. Guestbook owners can delete and comment the guestbook entries. Avatars are shown if they are available.

what you need is only to add a uid in the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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