By PeterChain on Wednesday, 01 October 2014
Posted in General Issues
Replies 3
Likes 0
Views 796
Votes 0
I want to use the unique id for a post to creat a special link in the blog.item.php view.

How can I retrieve it?

By now I'm retrieving the user data this way:

$user = JFactory::getUser();
echo 'User name: ' . $user->username . '<br />';


and I guess I should be able to do the same with the "post" object or similar... but I was not good to find clear documentation about EasyBlog object data retrieving.
Hello Pere,

Did you mean you want to get the post ID in blog.item.php file, right? You can get it by using this code:

<?php echo $row->id; ?>


$row is the post object.
·
Wednesday, 01 October 2014 10:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Pere,

You can do something like this to get the author,


<?php
$my = JFactory::getUser($blog->created_by);
echo $my->username;
?>


Also, kindly please understand that customizations is not supported / covered in our policy.
·
Wednesday, 01 October 2014 02:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Good.

Do you have a list of the object variables?

I really need the ID number.

I know I could dump all values of the object but I get a constant problem with PHP that prevent this values to show. Is not an EasyBlog specific problem.

Thank you.
·
Wednesday, 01 October 2014 03:12
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post