Keyword

Redirect K2 profil to Easysocial Profil

  • Mathieu Pinto Baptista
  • Mathieu Pinto Baptista's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122009 by Mathieu Pinto Baptista
Redirect K2 profil to Easysocial Profil was created by Mathieu Pinto Baptista
Hello,

I am here because i am trying to search a solution for my problem.
Here is my problem!

I use easysocial and k2. When i created a new item at the top in the toolbarnav and at the bottom appear all to getters the avatar and name author of the article. That's normal. But when you press in the avatar or in the name of the author that will redirect strait to K2 profiles and not to easysocial profil.
I tried somo redirection solution but unfortuntly without sucess.

I found the following code in the file item.php i know that i need to modified the "href" but i dont know by what. Could you please help me to solve this problem.

Thanks a lot

NetBoy

<div class="itemAuthorBlock">



  	<?php if($this->item->params->get('itemAuthorImage') && !empty($this->item->author->avatar)): ?>

  	<img class="itemAuthorAvatar" src="<?php echo $this->item->author->avatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->author->name); ?>" />

  	<?php endif; ?>



    <div class="itemAuthorDetails">

      <h3 class="itemAuthorName">

      	<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>

      </h3>

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122010 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Redirect K2 profil to Easysocial Profil
I am sorry but I do not have experience with Easysocial extension.

I think their developers should know how to retrieve the user's links.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Mathieu Pinto Baptista
  • Mathieu Pinto Baptista's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122011 by Mathieu Pinto Baptista
Replied by Mathieu Pinto Baptista on topic Re: Redirect K2 profil to Easysocial Profil
Hi Krikor and tks for your answer.

Is not in K2 that i need to change something ? and not in easysocial extension.

Regards

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122012 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Redirect K2 profil to Easysocial Profil
If they provide you with how their link is constructed (outside their extension) using the author id then you can change it in K2.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Mathieu Pinto Baptista
  • Mathieu Pinto Baptista's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago - 10 years 9 months ago #122013 by Mathieu Pinto Baptista
Replied by Mathieu Pinto Baptista on topic Re: Redirect K2 profil to Easysocial Profil
Hi Kritor,

Tks for your help and answer.

Sorry for the delay to answer you but i was waiting the answer of easysocial support. look they told me that.

"I am not too sure how you are going to change this but to get the link of an author, one would need to use the block of codes below

require_once( JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php' );

$user = Foundry::user( $authorId );
echo $user->getPermalink();


So with that could you help to solve my problem please?
I am sending the file foundry.php

Tks for all your help.

Regards

NetBoy


Attachment not found

Attachments:

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122014 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Redirect K2 profil to Easysocial Profil
I think echo $user->getPermalink(); will produce the link to the user's profile.

To use it in K2 templates you would have to do something like.

<a rel="author" href="<?php echo $user->getPermalink(); ?>"><?php echo $this->item->author->name; ?></a>

For elements like the avatar and such you have to ask the developer.

The file you sent me contains over 2000 lines of code and I cannot provide you with valid info.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum