- For example, Marco logs in using SCLogin, he clicks on his K2 Avatar (that now is showed on SCLogin) that is linked to his own K2 user page ( example link of K2 user page of Marco mancinimarco.com/en/articoli/psicologia/itemlist/user/935-marco )USER wrote: - link the user k2 avatar (appearing now on SClogin) to the same user/author k2 page
We'll have to look into the exact code to do this. If you can provide an example URL of what it should look like, that will help as it's really just passing that URL into the 2nd parameter of the getAvatarHTML function that we're already using.
- I explain better. I need that when a user land on a whatever K2 user page (where usually are displayed the articles written from the author --> example mancinimarco.com/en/articoli/psicologia/itemlist/user/935-marco ) he will find a link, wherever, that point to the joomsocial profile of that user (not to his own jomsocial profile). To achieve it I did:USER wrote: - add a text-link in user/author k2 page (wherever you want on the page) linked to the jomsocial profile of the same author
You should create a User Menu and have SCLogin display that menu to your users to add additional links to the login module.
return $this->getAvatarHtml( K2HelperUtilities::getAvatar($user->id) , '', '');
return $this->getAvatarHtml( K2HelperUtilities::getAvatar($user->id) , K2HelperRoute::getUserRoute($user->id), '_self');
require_once(JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'utilities.php');
require_once(JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'utilities.php');
require_once(JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'route.php');
Do you mean the logged in user? The code already uses $itemAuthor->userID, which I would assume would point to the author of the article already. If you want the current user viewing the article, you could probably change that to:Can I ask only if you have an idea on how I might change the following URL in order that will points to the joomsocial profile of the user displayed on the page?
<a href="<?php echo CRoute::_('index.php?option=com_community&view=profile&userid='.JFactory::getUser()->id); ?>" ><?php echo JFactory::getUser()->name; ?> <?php echo JText::_('CONTACT_AUTHOR'); ?></a>
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.