× Joomla Facebook Connect support forum

Topic-icon How to link profile pic with jomsocial profile

Active Subscriptions:

None
15 years 1 month ago #9581 by getimo
I'm using a copy of the login module and display only the profile pic on a position. How can I link that pic with the jomsocial profile?

getimo
The topic has been locked.
Support Specialist
15 years 1 month ago #9592 by alzander
To link the profile pic with JomSocial, you should install and enable the JomSocial Profile Plugin. It's in your download area in a zip file (with other profile plugins). Once installed, in JFBConnect, you can configure it's operation in the Profiles tab in the admin area.

For more information on that, see:
www.sourcecoast.com/extensions/jfbconnec...ration-guide?start=8
The topic has been locked.
Active Subscriptions:

None
15 years 1 month ago #9609 by getimo
Hello Alex,

thank you but I think you misunderstood me or I was not clear enought. I want the profile pic to be linked to the profile of Jomsocial when clicking the profile pic.

getimo
The topic has been locked.
Support Specialist
15 years 1 month ago #9614 by alzander
Ahh.. that's a good suggestion. It will take a slight modification to the JFBCLogin module to link to the user's JomSocial avatar. One final thing, right now, we actually show the user's Facebook avatar.. do you want it to show their JomSocial avatar (which may be different), or just, when clicked, to go to their JomSocial profile?

Thanks!
The topic has been locked.
Active Subscriptions:

None
15 years 1 month ago #9624 by getimo
I didn't tested it enough but when I log in through facebook the profile pic is imported. What happens if I change the profile pic in Jomsocial and then login again with facebook login? Is the profile pic being imported again? If yes then I'd prefer always the facebook pic. I think people spent a lot of time on facebook and know their profile pic very good - I think it would be better if it is the facebook profile pic.

Or: If you can build an option in the module you would make it perfect :)

getimo
The topic has been locked.
Support Specialist
15 years 1 month ago #9670 by alzander
How JomSocial's avatar is updated is determined by you. There's a setting in the Profiles area of JFBConnect, when the JomSocial profile plugin is enabled, to import the users profile every time they login or just on registration. If you have this set to Yes, then when they login, their avatar will be updated, and the avatar in the JFBCLogin should always be the same as what's in their profile.

To add the link, try the following change in the /modules/mod_jfbclogin/tmpl/default.php file. At line 97, you'll see the code where the Facebook image is inserted <fb:profile-pic... Change this to:
<div id="profile-pic">
<?php $link = JRoute::_('index.php?option=com_community&view=profile'); ?>
<a href="<?php echo $link; ?>">
	<fb:profile-pic uid="<?php echo $fbUid;?>"
	  size="<?php echo $params->get('picQuality'); ?>"
	  <?php echo $picHeight;?>
	  <?php echo $picWidth;?>
	  linked="<?php echo $linked;?>" 
	  facebook-logo="<?php echo $fbLogo;?>"
	/>
   </a>
</div>

Let us know how that goes. You should just be able to cut and place that code and replace the div that's already in the module.

Good luck!
The topic has been locked.
Active Subscriptions:

None
15 years 1 month ago #9690 by getimo
Thank you. The link is now a little bit...hmm unstable ;)

On some pages (articles or profile page) the link looks like this: /component/community/profile
On other pages (eg. jomsocial frontpage) the link looks like this: /community/profile (which is the correct one)
And now very strange: On my Jomsocial Events page (which is a manually created native jomsocial menu link - outside of the jomsocial toolbar) the link looks like this: /events/profile

I think I will hardcode that link since Jomsocial still seems to be very buggy. Thank you anyway!

PS: If you want, you can test it here: dev.kesselfieber.de - the database will be replaced in the near future with the live db - so don't wonder if you get deleted in the next weeks ;)

getimo
The topic has been locked.
Support Specialist
15 years 1 month ago #9702 by alzander
Yeah. Hard-coding it is fine, if you know the page you always want it to go too. The other option is to include the menu's item id in the URL above. This will make sure that the 'proper' SEF route is always created, instead of guessing which URL to use based on the current page. The ItemID can be found in the Menu Manager in one of the columns. Once you get it, simply update the link above like so:
index.php?option=com_community&view=profile&Itemid=XX

Again, not necessary, but more an explanation of how Joomla works.

Glad we got you going!
The topic has been locked.