By Marco Vantroba on Sunday, 10 January 2016
Posted in General
Replies 4
Likes 0
Views 544
Votes 0
Hi Guys,
I want (need!) to show the user avatar inside a module position like Joomshaper did (please see attached Screen).

I got all, the dropdown, the username fetched, but now i just need the image from easydiscuss.
Can you help with script?
I´m using Sourcerer, so PHP would be no problem...

thanks for your help.
Hey Marco,

I am really sorry for the delay of this reply as it is a weekend for us here. To get an avatar from EasyDiscuss:

·
Sunday, 10 January 2016 12:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Marc,
no problem because delay, here it´s weekend too (but best time for working )
thanks for that snippet, but it does not work like it should.
please see image.

thats my code:
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">

<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">

{source}
<?php
// This is for EasyDiscuss 3.x
$user = DiscussHelper::getTable('Profile');

// Assuming that $id is the user's id.
$user->load($id);

echo $user->getAvatar();
?>
{/source}


{source}
<?php
jimport( 'joomla.user.user' ); // add this line in
$user = JFactory::getUser();
echo $user->name;
?>
{/source}
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#"><i class="fa fa-smile-o"></i> Mein Forums-Profil</a></li>
<li><a href="#"><i class="fa fa-user"></i> Mein Shop-Account</a></li>
<li><a href="#"><i class="fa fa-shopping-cart"></i> Meine Bestellungen</a></li>
<li><a href="#"><i class="fa fa-download"></i> Meine Downloads</a></li>
<li role="separator" class="divider"></li>
<li><a href="#"><i class="fa fa-sign-out"></i> Logout</a></li>
</ul>
</li>
</ul>


So, what do I make wrong?
·
Sunday, 10 January 2016 19:03
·
0 Likes
·
0 Votes
·
0 Comments
·
If I open the path the STANDARD avatar is shown. so the path is not correct, too.
But
1. I just dont want to SHOW the path I want to show the image itself
2. I dont want to show the default image, it should be the user image...
thanks for your understanding and help
·
Sunday, 10 January 2016 19:12
·
0 Likes
·
0 Votes
·
0 Comments
·
The code above only generates the url to the avatar. You need to add your own HTML codes to display the avatar. For instance,



Also, kindly please understand that our support does not include support for customizations and I am afraid I am unable to assist you further with this customization request.
·
Monday, 11 January 2016 13:48
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post