Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Integration with third-party extensions    CommunityBuilder    Topic: Link username / name to CB Profile
Pages: [1]   Go Down
  Print  
Author Topic: Link username / name to CB Profile  (Read 38271 times)
0 Members and 1 Guest are viewing this topic.
lohck
Newbie
*

Karma: 0
Offline Offline

Posts: 2


« on: January 03, 2009, 11:34:57 »

Hi,

anyone suceeded in linking usernames or names to CB profile?

Currently the link is only from the Avatar, and when a user does not have an avatar, there is no way to link to their profiles.

I read all relevant posts here and seems like there isn't a workaround for this, anyone?
Logged
smart
Administrator
Hero Member
*****

Karma: 187
Offline Offline

Gender: Male
Posts: 1883



WWW
« Reply #1 on: January 04, 2009, 17:26:47 »

You can make small modification in comments template and show this link. Do something like:

Open file /com_jcomments/tpl/default/tpl_comment.php and change line:

Code: (php)
<?php
if ($this->getVar('comment-show-homepage') == 1) {
?>

<a class="author-homepage" href="<?php echo $comment->homepage?>" rel="nofollow" title="<?php echo $comment->author?>"><?php echo $comment->author?></a>
<?php
} else {
?>

<span class="comment-author"><?php echo $comment->author?></span>
<?php
}
?>

with

Code: (php)
<?php
if ($comment->profileLink != '') {
?>

<a class="author-homepage" href="<?php echo $comment->profileLink?>" rel="nofollow" title="<?php echo $comment->author?>"><?php echo $comment->author?></a>
<?php
} else {
?>

<span class="comment-author"><?php echo $comment->author?></span>
<?php
}
?>

And don't forget to install & publish Avatar plugin Smiley
« Last Edit: January 04, 2009, 17:28:51 by smart » Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
hanzh
Newbie
*

Karma: 0
Offline Offline

Posts: 2


« Reply #2 on: November 09, 2010, 05:45:29 »

Could it be that this workaround isnt working anymore on Jcomments 2.2.0.2?

I'm getting the following error all the time when implementing this code:

Parse error: syntax error, unexpected ';', expecting T_FUNCTION in .../com_jcomments/tpl/default/tpl_comment.php on line 210
Logged
smart
Administrator
Hero Member
*****

Karma: 187
Offline Offline

Gender: Male
Posts: 1883



WWW
« Reply #3 on: November 11, 2010, 01:33:49 »

For JComments 2.2.0.2 you could use next modification:

Open file /com_jcomments/tpl/default/tpl_comment.php and change line:

Code: (php)
<?php
                                
}
if ($this->getVar('comment-show-homepage') == 1) {
?>

<a class="author-homepage" href="<?php echo $comment->homepage?>" rel="nofollow" title="<?php echo $comment->author?>"><?php echo $comment->author?></a>
<?php
} else {
?>

<span class="comment-author"><?php echo $comment->author?></span>
<?php
}
?>

with

Code: (php)
<?php
}
if ($comment->profileLink != '') {
?>

<a class="author-homepage" href="<?php echo $comment->profileLink?>" rel="nofollow" title="<?php echo $comment->author?>"><?php echo $comment->author?></a>
<?php
} else {
?>

<span class="comment-author"><?php echo $comment->author?></span>
<?php
}
?>
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Prophat
Newbie
*

Karma: 0
Offline Offline

Posts: 1


Email
« Reply #4 on: December 21, 2010, 05:18:22 »

I get this error when I put in your code smart.

Code:
PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56 PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56 PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56 PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56 PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56 PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56 PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56 PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56 PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56 PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56 PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56 PHP Notice: Undefined property: stdClass::$profileLink in C:\Inetpub\wwwroot\joomla\components\com_jcomments\tpl\default\tpl_comment.php on line 56

What am I missing?
Logged
smart
Administrator
Hero Member
*****

Karma: 187
Offline Offline

Gender: Male
Posts: 1883



WWW
« Reply #5 on: December 21, 2010, 15:06:53 »

What am I missing?
May be you've forgot to install, publish and setup JComments Avatar plugin?
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Radek2212
Newbie
*

Karma: 0
Offline Offline

Posts: 2


« Reply #6 on: January 10, 2011, 02:05:23 »

Thank you for this great modification - it should be included as default !

all things works fine, yet I have one small problem: the | character (it is used as replacement to the big i letter)

It seems that when i have it in user name (like Son|c), the link to profile cannot be created.

Is this can be fixed somehow ? I don't want to change Admin username :-(
Logged
Radek2212
Newbie
*

Karma: 0
Offline Offline

Posts: 2


« Reply #7 on: January 10, 2011, 02:44:30 »

Avatar source = phpbb3 JFusion bridge
Logged
smart
Administrator
Hero Member
*****

Karma: 187
Offline Offline

Gender: Male
Posts: 1883



WWW
« Reply #8 on: January 10, 2011, 05:05:53 »

See solution here: JComments Avatar and phpBB3 (JFusion)
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Papillon
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« Reply #9 on: August 29, 2012, 15:52:48 »

Hello,

is there any solution o link the user name to the CB Profile in Joomla 2.5?

Kind Regards

Papillon
Logged
xcoon
Newbie
*

Karma: 0
Offline Offline

Posts: 1


Email
« Reply #10 on: September 18, 2012, 19:28:39 »

Hello,

my modification to link username in comments to CB-profle:


Open /components/com_jcomments/tpl/default/tpl_comment.php


replace:
========================
<span class="comment-author"><?php echo $comment->author?></span>
========================

with:
========================
<a href="index.php?option=com_comprofiler&task=userprofile&user=<?php echo $comment->userid; ?>" rel="nofollow" title="<?php echo $comment->author; ?>"><span class="comment-author"><?php echo $comment->author; ?></span></a>
========================


hope it works for you too.

xcoon
Logged
Wiz
Newbie
*

Karma: 0
Offline Offline

Posts: 9


« Reply #11 on: October 05, 2012, 14:06:54 »

haa nice... ;Dthis one works well..  Wink
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    CommunityBuilder    Topic: Link username / name to CB Profile
 
Jump to: