Hi all!
If u want to link the
CommunityBuilder profile of a user to his/her comments on a photo, you have to edit the file
rsgcomments.class.phpIt's in your directory
/components/com_rsgallery2/lib/rsgcomments/I'm not sure about the line where you have to add code, cause I deleted/added/edited preceding lines of code for other things I wanted to implement...
Anyway, somewhere around line 370 you will see:
foreach ($comments as $comment) {
$catid = galleryUtils::getCatIdFromFileId($comment['item_id']);
etc...
add the following between these two lines:
/* GRVULTURE CB INTEGRATION -------------------------------------------------------------------------*/
$grName = galleryUtils::genericGetUsername( $comment['user_id'] );
$grHref = "index.php?option=com_comprofiler&task=userProfile&user={$comment['user_id']}";
$grHref = sefRelToAbs($grHref);
$gruser = "<a href='{$grHref}' title='$grName'>$grName</a>";
/* --------------------------------------------------------------------------------------------------*/
Then, search for
galleryUtils::genericGetUsername( $comment['user_id'] )and replace it with
$gruserThis is where normally the user's name/username appears in his/her comment box.
Mine is at the Title cell, cause I don't use titles in the comments on my site.
So my line became from this:
<td colspan="2" class="title"><span class="posttitle"><?php echo galleryUtils::genericGetUsername( $comment['user_id'] );?></span></td>
to this:
<td colspan="2" class="title"><span class="posttitle"><?php echo $gruser;?></span></td>
Now the name of the user is hyperlinked to his/her profile!
Have fun!
next I'm going to display the username of the owner of the photo and link that also to his/her profile. that's easy...
and then I will try to display thumbnails of the users' avatars next to their comments. this is gonna be tricky, so any help is mostly welcome!