Forum is closed

Avatar image quality=not good

Avatar image quality=not good

Hi,

I for some reason cannot get the main profile picture/avatar to render properly, and by properly I mean good quality.

In the JomSocial configuration  I have set the quality to the highest possible and the path to ImageMagick is /usr/bin/convert (I'm on a CentOs distro).

I'm not sure if this is a JomSocial issue or JLinked. LinkedIn profiles have 2 profile pictures for each user, one small and one large. Which one does JLinkedIn pull to generate the JomSocial avatar?

Any help would be appreciated because I look quite fuzzy right now - def not hot. Thanks! current/smile

-Manny

mortega1
Manny
useravatar
Offline
6 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Manny,
JLinked currently imports the default image that the LinkedIn API allows us to get. That image, unfortunately, is only 80 (or may 100) pixels square. It does look like there is a newer method now available that may allow us to fetch the original user profile image (with the LinkedIn logo still). That will require some processing, like is already done with ImageMagick in JomSocial.

We're investigating this alternative method to get a bigger avatar and will let you know when we find something. It will likely take a few days though, but hopefully not too long.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23893 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Hi Alex,

Thanks for the quick response as always!

Any word on progress implementing this new method for LinkedIn avatar images?

-Manny

mortega1
Manny
useravatar
Offline
6 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Hi Alex,

Any update on this front?

-Manny

mortega1
Manny
useravatar
Offline
6 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Manny,
Sorry to keep you waiting on this. It took a little more investigation than I thought, but there is a solution and it's very easy to implement. I can't stress enough that you should watch the avatars that are imported for a while as JomSocial will need to format them properly. It *should*, but if someone happens to have an original profile image with really strange dimensions (like 100x2000px), it may import wonky. Of course, you can try uploading a strange image and trying as well.

To test out the code, edit the /components/com_jlinked/libraries/profile.php file. In the getAvatarURL function, around line 249, you'll see:

Code:

        $jlinkedLibrary = JLinkedApiLibrary::getInstance();

        $data = $jlinkedLibrary->api('profile', $liMemberId . ':(picture-url)');
        $avatarUrl = $data->get('picture-url');

Modify the last 2 lines like so:

Code:

        $jlinkedLibrary = JLinkedApiLibrary::getInstance();

        $data = $jlinkedLibrary->api('profile', $liMemberId . ':(picture-urls::(original))');
        $avatarUrl = $data->get('picture-urls.values.0');

One final note.. that function is meant to pull all the original avatars the user has uploaded. Because of that, it's returning a list of images for the user. In my testing, I only ever saw one image returned, and that's why the code above uses "values.0". JLinked will always just return the first image in the list.

I honestly don't know if more images are ever returned, but again, this is something to test.. make sure that the actual profile image for the user on LinkedIn is what's imported into your system of choice.

I hope that helps, but please, please give us feedback either way. This is something we'll test and likely implement in the next JLinked release, but having real-world feedback always helps provide some extra confidence to the solution.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23893 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Thank you thank you thank you thank you!  Looking good so far, please add to next version current/smile  I actually came across this via cached version of this thread in a google search result.  I've been playing with different variations of picture-urls::(original) to fit next to $avatarUrl the last couple hours.  I wish I saw this thread earlier I would've gone to sleep before midnight tonight hehe

paulzmuda
useravatar
Offline
8 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Very glad to hear that got it going for you. Always feel free to ask here first when you are running into issues, and we'll help how we can. This change should be included in the next release.

If you need anything else, just let us know!

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23893 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Actually I did have a couple questions, maybe i'm missing something but...

1) is import of values from LinkedIn to existing JomSocial profiles a feature yet in the newest download?  I dug up an old thread where you resolved a question with a workaround (like for the one above) that involved adding a button anywhere you'd like that allows users to re-import their profile.  However when I tried it it didnt work for me.  Is it because this is already a feature?  I can't seem to find it.

2) also for the life of me I havent been able to add "State" and "Country" to the mapped fields in the JLinked setup.  I've made sure those fields are visible and published in Jomsocial and they are added to my custom profiles as well.  Yet still, the State field and the Country field won't come up.  I'm not in the position to be able to make new fields for those because I already have a members database with 99% of the members having that field populated.  In a seperate thread in the Joomla 2.5 forum on this site I mentioned a way to parse the address but i'm unable to Parse the State and Country into fields that aren't mapped yet.

3) could you suggest a good plugin (unless I should just develop myself) for a way to search a Jomsocial database in a similar fashion to LinkedIn?  The last piece to my puzzle is a good advanced search page (to look just like LinkedIn's) because we can't stand the default Jomsocial search function.

I did some digging around but while I have your attention I hoped to ask if you could point me in the right direction.

Thanks!

paulzmuda
useravatar
Offline
8 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Paul,
1) For import into JomSocial, we still don't have a user-option to allow the import to happen. You can configure whether the profile is imported on registration or login, currently, but not by the user clicking something. We could help you implement this as we've helped others, and it still is on our to-do list, but it's simply not a highly requested feature.

2) The social profile plugins currently only import into text type fields. The reason is that the data from Facebook is usually 'free form' and could be any value. There's not really a guarantee that the country LinkedIn returns would be in the choices in JomSocial, or may be different, like "US" vs "USA" vs "United States". If you want to experiment, you can update the /plugins/socialprofiles/jomsocial/jomsocial.php file. In there, around line 55, you'll see:

Code:

    protected function getProfileFields()

    {
        $query = 'SELECT * FROM #__community_fields WHERE type="text" OR type="textarea" OR type="date" OR type="birthdate" OR type="url" ORDER BY ordering';

Update that query to:

Code:

        $query = 'SELECT * FROM #__community_fields WHERE type="text" OR type="textarea" OR type="date" OR type="birthdate" OR type="url" OR type="country" OR type="state" ORDER BY ordering';

That will allow you to see the state and country fields in the Profiles area of JLinked and map them to the state/country fields of Linked. From your other post about parsing out addresses, I think you probably can take it from here and translate US to United States or whatever is necessary.

We have hopes, later this year, to create the proper mappings for all the default JomSocial states/countries to what Facebook and LinkedIn return and have those as fields that can be imported into. It's just not something we support yet.

3) Unfortunately, I don't have any suggestions here. I've never really used their search, don't know how good or bad it is, and don't know of any replacements to suggest at all. Sorry I can't help you here.

I hope that helps, but if you have any other questions, just let us know.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23893 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

1) So unless its your first time (registering) new fields won't import from LinkedIn?  I have a tester profile that I made additional profile  changes in LinkedIn but when logging into Jomsocial again via JLinked the new fields didn't update.  I just want to make sure we always have the user's most current info.

2) THAT DID IT!!!  AGAIN THANK YOU!  Seriously I wouldn't have found that one on my own for weeks.  The only part I had to tweak in the query was instead of type="state" for me it was type="select" because in my version of JomSocial under custom profiles there is no state as a type but a select with all the states in it.  The Google API I mentioned in the other thread allows me to specify exactly which version short/abbreviated or full name of country/state that I want it to spit out.

3) No worries, I dont think ill ever find something exactly the way we need it.  A weekend project current/tongue

paulzmuda
useravatar
Offline
8 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Paul,
1) The profile should be imported on registration *and* login. If that's not happening for you, go to the Profiles area and make sure the "Always Import Profile" setting is enabled. When disabled, it will only happen on registration. When enabled, it will happen on subsequent logins as well. If it's not working for you, it could be that you're crazy or that there is a bug. Let us know, and we can investigate further current/smile

2) Glad to help. I actually made up the 'state' part with an assumption it was there.. I knew Country was. So, I was wrong...

As always, best of luck. Should you need anything else, just let us know. We'll gladly help!

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23893 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Odd, I dont have that setting in the Profiles section.  I think I AM going crazy!  I even updated SCLogin to make sure because it was slightly out of date. 

This is what my Profiles section looks like:  Under the only tab "jomsocial"


General Setting                                      Options                                      Description
Import Avatar:                                      Yes       No                                      Info
Import Social Network Status:              Yes        No                                      Info
Skip JS Terms of Service:                   Skip       Show                                   Info
Show Profile Fields:                     All        Required only    None                  Info
Show Imported Fields:                         Show     Hide                                    Info

Multiple Profile Setting                                Options                                 Description
Default Profile Type:                              [Select Box]                                  Info
Allow User Selection of Profile Type:     Yes        No                                    Info

JomSocial <-> Social Network field mapping
..........



And here's my Overview Section pasted below:

JLinked Extension Check

JLinked    2.1.0    2.1.0    This extension is installed and published.
SCLogin    3.0.3    3.0.3    This extension is installed and published.
Authentication Plugin    2.1.0    2.1.0    This extension is installed and published.
System Plugin    2.0.0    2.0.0    This extension is installed and published.
User Plugin    2.1.0    2.1.0    This extension is installed and published.

Content Plugin    2.0.0    2.0.0    This extension is installed and published.
JLinkedApply    Not Installed    2.1.0    This extension does not appear to be installed.
JLinkedCompanyInsider    Not Installed    2.0.0    This extension does not appear to be installed.
JLinkedCompanyProfile    Not Installed    2.0.0    This extension does not appear to be installed.
JLinkedMember    Not Installed    2.1.0    This extension does not appear to be installed.
JLinkedRecommend    Not Installed    2.0.0    This extension does not appear to be installed.
JLinkedShare    Not Installed    2.1.0    This extension does not appear to be installed.
JLinkedFollowCompany    Not Installed    2.0.0    This extension does not appear to be installed.

Community Builder    Not Installed    5.0.1    This extension does not appear to be installed.
JomSocial    5.0.0    5.0.1    This extension is installed and published.
Kunena    Not Installed    5.0.1    This extension does not appear to be installed.
K2    Not Installed    5.0.1    This extension does not appear to be installed.
Virtuemart2    Not Installed    5.0.1    This extension does not appear to be installed.

paulzmuda
useravatar
Offline
8 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

+1 on the refreshing data issue.

The "Always Import Profile" option is nowhere to be found in my setup.

Any ideas?

mortega1
Manny
useravatar
Offline
6 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Sorry for the delay guys. I'll have a better explanation, and a few lines of code that will enable importing data on login, for you tomorrow.

Thanks for your patience,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23893 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Alright.. lets get you guys going. I went through the code to find the best spot to enable the always importing, and it's a very simple change. The reason that JLinked doesn't currently perform the import of all profile data on every login is due to LinkedIn's old terms of service. They used to be no permission settings when a user logged in, so you either had access to all their data or none of it. Because of that, they had very specific terms (which we used to support) that any time data was imported and stored for a user, there had to be explicitly opt-in *each* time for that user. So, we had a checkbox for "Yes, you can import my data" on registration. On login, it would have been very difficult to do.

Now they have the permissions so a user can see what is being imported when they first register and opt-out at that point. They also changed their terms, but it's honestly a little vaguer than we'd like, but importing of data after permission has been granted once seems like it's no longer frowned upon. The upcoming merge of JFBConnect/JLinked will definitely allow import always without the minor code change below (as you'll see).

To fix the problem, please edit the /plugins/socialprofiles/jomsocial/tmpl/configuration.php file. At line 25, you'll see:

Code:

    <?php if ($this->network == 'facebook') : ?>

Simply change that to:

Code:

    <?php if (true) : ?>

With that, the proper setting will show in the Profiles configuration area and everything should work how you want.

Obviously, please test and let us know how it goes.

Thanks, and good luck,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23893 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

That did it!  Thank you Alex, you truly provide world-class support.  I'll be sure to recommend your products in future reviews although the only reason i'm here in the first place is because of your existing good reviews current/smile

paulzmuda
useravatar
Offline
8 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Avatar image quality=not good

Glad to hear that got you going, and happy to hear you're satisfied. We listen to our users constantly to learn the issues their having as well as the feedback and suggestions they may have as that's how we always know where things could be improved.

As always, should you need anything else, just let us know.

Of course, if you'd like to leave your own rating and review on the Joomla Extension Directory for JLinked, we wouldn't argue and it'd certainly be appreciated:
http://extensions.joomla.org/extensions … ased/18957

Thanks, and best of luck,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23893 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11543
Total Polls:
0
Total Posts:
48565
Posts today:
1
User Info
 
Total Users:
47558
Newest User:
dawfaz
Members Online:
4
Guests Online:
1075

Social Stream
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program