Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Support / AdsManager Support / [RESOLVED] Profile picture

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

[RESOLVED] Profile picture

More
12 years 2 months ago - 12 years 1 month ago #6797 by fabioweb
[RESOLVED] Profile picture was created by fabioweb
Hello,
can i display a profile picture as in the image?
Thank you
Attachments:
Last edit: 12 years 1 month ago by loic.
The following user(s) said Thank You: adarr
More
12 years 2 months ago #6805 by tompap
Replied by tompap on topic Profile picture
Are you using CB ? any user component, there is no avatar picture attached to user in the default joomla user component
The following user(s) said Thank You: adarr
More
12 years 2 months ago #6812 by fabioweb
Replied by fabioweb on topic Profile picture
Yes i'm using CB!
The following user(s) said Thank You: adarr
More
12 years 2 months ago #6819 by tompap
Replied by tompap on topic Profile picture
This is example code from CB, you should adapt it to get the userid from the content

like
$cbUser =& CBuser::getInstance( $this->content->user_id);
instead of
$user = JFactory::getUser();
$cbUser =& CBuser::getInstance( $user->id );

global $_CB_framework, $mainframe;
 
if ( defined( 'JPATH_ADMINISTRATOR' ) ) {
 if ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) {
 echo 'CB not installed!';
 return;
 }
 
 include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' );
} else {
 if ( ! file_exists( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' ) ) {
 echo 'CB not installed!';
 return;
 }
 
 include_once( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' );
}
 
 
$user = JFactory::getUser();
$cbUser =& CBuser::getInstance( $user->id );
 
$avatar = $cbUser->getField( 'avatar', null, 'html', 'none', 'list' );
echo $avatar;
The following user(s) said Thank You: adarr
More
12 years 1 month ago #6826 by fabioweb
Replied by fabioweb on topic Profile picture
First of all thank you for your amazing support. Now i have 2 problem

1) Users can see the avatar only if logged or UE_UNNAMED_USER is displayed

2) Logged user see their avatar and not the avatar whose published the ad
The following user(s) said Thank You: adarr
More
12 years 1 month ago #6850 by tompap
Replied by tompap on topic Profile picture
Thanks if you like our support don't hesitate to put a review on extensions.joomla.org :-)

The problem is that you didn't change the code like I said :)

You need to replace

$user = JFactory::getUser();
$cbUser =& CBuser::getInstance( $user->id );

by

$cbUser =& CBuser::getInstance( $this->content->user_id); (in details page)
$cbUser =& CBuser::getInstance( $content->user_id); (in list page)
The following user(s) said Thank You: adarr
Time to create page: 0.050 seconds
Powered by Kunena Forum