Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • jakeyboy Friend
    #163563

    Hi,

    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 Friend
    #389753
    jakeyboy Friend
    #389766

    Thanks 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 Friend
    #389877

    You 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">

    jakeyboy Friend
    #389958

    Thanks 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 Friend
    #389960

    Figured 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 Friend
    #390167

    You 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;}?>

    jakeyboy Friend
    #390216

    Thanks 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 Friend
    #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 Friend
    #390241

    Hi,

    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 Friend
    #390392

    I can’t help you because it’s complex. I informed development team. I hope next release of JA Comment will support K2 Avatar

Viewing 11 posts - 1 through 11 (of 11 total)

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