-
AuthorPosts
-
March 7, 2011 at 7:06 pm #161136
I am removing the avatars and I would like to have usernames in the comments linked to a video profile page for each user.
I would like the username links to look like…
/video/viewChannel?user_id=2105
Where the id would change according to the user id.How should I go about doing this?
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
March 8, 2011 at 4:04 am #380198Hi,
– Open <joomla url>componentscom_jacommentthemesdefaulthtmlcommentsitems.php file
– Replace this code
<?php if($item->strWebsite){ ?>
<a href="<?php echo $item->strWebsite;?>" class="comment-user">
<span class="comment-user"><?php echo $item->strUser; ?></span>
</a>
<?php
}else{
?>
<span class="comment-user"><?php echo $item->userid; ?></span>
<?php } ?>
to
<a href="/video/viewChannel?user_id=<?php echo $item->userid;?>" class="comment-user">
<span class="comment-user"><?php echo $item->strUser; ?></span>
</a>March 10, 2011 at 5:58 am #380657Thanks, that worked.
Is there something I could add to the code that doesnt have links to guests who post?
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
March 10, 2011 at 5:19 pm #380758Hi,
you replace previous code
<a href="/video/viewChannel?user_id=<?php echo $item->userid;?>" class="comment-user">
<span class="comment-user"><?php echo $item->strUser; ?></span>
</a>
to
<?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 } ?>
1 user says Thank You to khoand for this useful post
March 11, 2011 at 7:59 am #380879Thats it!
Thank you
February 26, 2012 at 5:17 am #440082hi khoand,
Thank you for your help, but i need that link with avatar as well.
because i have a recent comments module, there shows the picture of each profile (enabled avatar with fireboard kunena).
also i want to add that link with each avatar.
thanksbashirnoori.com
-
AuthorPosts
This topic contains 6 replies, has 3 voices, and was last updated by bashirnoori1 12 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum