By Bridget Teigland on Tuesday, 21 July 2015
Posted in General Issues
Replies 3
Likes 0
Views 659
Votes 0
Im wondering if you have an api or documentation so I can get the code to put the LINK to a users blog page on on their profile or another component.

I dont need to embed any blogs but just the code that links to that users blog page.. so I can put that in a template view file.

Thanks!
Hey Bridget,

Here's a code snippet which you can use:


<?php
require_once(JPATH_ADMINISTRATOR . '/components/com_easyblog/includes/easyblog.php');

// Replace $id with the proper user id
$user = EB::user($id);

echo $user->getPermalink();
?>
·
Wednesday, 22 July 2015 01:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks!
For those who need a little more direction to turn this into a link you need to use a code such as this:

<a href="../<?php echo EB::user($current_user->id)->getPermalink();?>"<text or image here></a>


Note change the code
$current_user->id
if you want a specific user id or the current logged in. Im using a cck that puts the user id in the url so it grabs that id and generates the link I need.
·
Wednesday, 22 July 2015 22:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Bridget,

Thanks for sharing.
·
Thursday, 23 July 2015 10:55
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post