-
AuthorPosts
-
jakeyboy Friend
jakeyboy
- Join date:
- April 2011
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
May 4, 2011 at 7:59 am #163563Hi,
I’m a little confused as to why the comments in JA Comment are not linked with my users..
I want the functionality that I can click on a user (or their avatar) and be directed to their profile..
Is this possible?
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
May 4, 2011 at 8:27 am #389753Hi,
You read thread http://www.joomlart.com/forums/topic/add-link-to-username/jakeyboy Friendjakeyboy
- Join date:
- April 2011
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
May 4, 2011 at 8:54 am #389766Thanks for that. How would I modify this code to link to a k2 user profile or Community Builder user profile…
<?php if($item->userid != 0){ ?>
<a href="/video/viewChannel?user_id=<?php echo $item->userid;?>" class="comment-user">
<span class="comment-user"><?php echo $item->strUser; ?></span>
</a>
<?php
}else{
?>
<span class="comment-user"><?php echo $item->strUser; ?></span>
<?php } ?>khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
May 5, 2011 at 2:08 am #389877You replace
<a href="/video/viewChannel?user_id=<?php echo $item->userid;?>" class="comment-user">
with
<a href="/index.php?option=com_k2&view=itemlist&task=user&id=<?php echo $item->userid;?>" class="comment-user">
1 user says Thank You to khoand for this useful post
jakeyboy Friendjakeyboy
- Join date:
- April 2011
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
May 5, 2011 at 10:01 am #389958Thanks for that!
I changed the code but I just get this:
Parse error: syntax error, unexpected ‘}’ in /home/progr500/public_html/components/com_jacomment/themes/default/html/comments/items.php on line 76
Any ideas what’s wrong?
Also is there a way to link the JA Comment Avatar with the K2 Avatar?
jakeyboy Friendjakeyboy
- Join date:
- April 2011
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
May 5, 2011 at 10:11 am #389960Figured out what I did wrong. It’s working perfectly now…
Any ideas in terms of linking the avatar with K2?
Thank you again. Champion! 🙂
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
May 6, 2011 at 8:11 pm #390167You replace this code from <joomla url>componentscom_jacommentthemesdefaulthtml commentsitems.php file
<?php if($item->strWebsite){ ?>
<a href="<?php echo $item->strWebsite;?>">
<?php if($item->avatar[0]){?>
<img src="<?php echo $item->avatar[0];?>" alt="<?php echo $item->strUser;?>" style="<?php echo $item->avatar[1];?>"/>
<?php }?>
<?php if($item->icon != ''){ echo $item->icon; }?>
</a>
<?php }else{ ?>
<?php if($item->avatar[0]){?>
<?php if(isset($item->userLink)):?><a href="<?php echo $item->userLink;?>" target="_blank"><?php endif;?>
<img src="<?php echo $item->avatar[0];?>" alt="<?php echo $item->strUser;?>" style="<?php echo $item->avatar[1];?>"/>
<?php if(isset($item->userLink)):?></a><?php endif;?>
<?php }?>
<?php if($item->icon != ''){ echo $item->icon;}?>
<?php } ?>
with
<?php if($item->userid != 0){ ?>
<a href="/video/viewChannel?user_id=<?php echo $item->userid;?>" class="comment-user">
<?php if($item->avatar[0]){?>
<img src="<?php echo $item->avatar[0];?>" alt="<?php echo $item->strUser;?>" style="<?php echo $item->avatar[1];?>"/>
<?php }?>
</a>
<?php
}else{
?>
<?php if($item->avatar[0]){?>
<img src="<?php echo $item->avatar[0];?>" alt="<?php echo $item->strUser;?>" style="<?php echo $item->avatar[1];?>"/>
<?php }?>
<?php } ?>
<?php if($item->icon != ''){ echo $item->icon;}?>
1 user says Thank You to khoand for this useful post
jakeyboy Friendjakeyboy
- Join date:
- April 2011
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
May 7, 2011 at 1:11 am #390216Thanks for the assistance.. But I’m not sure if it worked..
I replaced the code and selected avatars in JA Comments for Default, but the generic avatar still shows.. It’s not pulling the Avatar from K2…
Again, really appreciate your help. Hoping like my php skills get better through learning your code so I might be able to help others on here one day..
Cheers
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
May 7, 2011 at 8:31 am #390239<blockquote>I want the functionality that I can click on a user (or their avatar) and be directed to their profile..</blockquote>
Previous code for your purpose. What problem do you have?jakeyboy Friendjakeyboy
- Join date:
- April 2011
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
May 7, 2011 at 8:44 am #390241Hi,
Sorry you did solve my problem. I was confused about what I originally asked.
I was hoping to link the JA Comment Avatar with K2 Avatar… Tried looking at the code but haven’t had any luck trying to get it to source the avatar from the K2 profile/tables..
Joomlart said that the function doesn’t exist, but I was hoping there would be a code rewrite that could make it work..
At the moment it only supports jomsocial, cb, gravatar
Thanks again
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
-
AuthorPosts
This topic contains 11 replies, has 2 voices, and was last updated by khoand 13 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum