RSGallery2 Support Forums
Welcome, Guest. Please login or register.

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : September 05, 2008, 09:36:56 PM
+  RSGallery2 Support Forums Advanced search
  Show Posts
Pages: [1]
1  Developers corner / Developer Lobby / Re: User Comments link to CB profiles [code included] on: May 10, 2008, 01:03:39 PM
...and link to gallery where the image belongs. and link to image owner...

all working
2  Developers corner / Developer Lobby / Re: User Comments link to CB profiles [code included] on: May 10, 2008, 11:41:41 AM
I got the avatars displaying on the comments. Eaaaasy!  Grin

anyway, if u're interested, reply...
3  Developers corner / Developer Lobby / User Comments link to CB profiles [code included] on: May 09, 2008, 12:55:05 PM
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.php
It'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:
Code:
foreach ($comments as $comment) {
$catid = galleryUtils::getCatIdFromFileId($comment['item_id']);
etc...

add the following between these two lines:
Code:
/* 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 $gruser

This 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:
Code:
<td colspan="2" class="title"><span class="posttitle"><?php echo galleryUtils::genericGetUsername$comment['user_id'] );?></span></td>   

to this:
Code:
<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!
4  RSgallery2 support forums / Display and Templates / Re: Where are the tabs? Just shows Text on: May 09, 2008, 05:43:33 AM
I have EXACTLY the same problem!
I am running joomla1.5.2
I've turned off all the tabs too, but I sure would like to have the voting and commenting option...  Sad

So, is there a way to fix this? I guess it has to do with compatibility problems with the 1.5.x versions of Joomla...

Please, enlighten us!  Smiley

thank you!
grV
Pages: [1]