I have comments (with 5 star ratings) enabled on a content profile. I need to theme the comment, rating and the "Add Comment" link as they appear on the User profile page via user-profile.tpl.php, along with all of the other elements in the content profile.

I would expect to find those elements (since they appear on the Content Profile content type) as part of the provided "$content_profile" variable passed to the template by this module--but that comment info is not there.

I can get the comment info as part of the $profile or $user_profile array passed to the template--but it's already html-ized at that point and lumped into in a big string. The point of the $content_profile variable is to give access in the template to all the elements of the content profile. But...overriding $profile or $user_profile with $content_profile leaves me with no comment info!

Why doesn't $content_profile, which should have -all- the content profile info available, contain comment elements? Is there a workaround?

Comments

jdlind38’s picture

Not sure if this helps, but I used the following to retrieve CCK field data...

 $user = user_load(array('uid'=>$comment->uid)); 
$account = content_profile_load('profile', $user->uid); 

I was then able to print specific fields. For example

print ($account->field_first_name[0]['value']);

To get a user's first name.