Topic-icon Importing LinkedIn profile fields into Joomla?

Active Subscriptions:

None
12 years 1 month ago #20853 by jwhelan
When my users register, I want my site to pull some of their profile information (avatar, job title, location, etc.) into Joomla. What's the easiest way to make this happen with jLinked?

Thanks,

-John W.
The topic has been locked.
Support Specialist
12 years 1 month ago #20857 by alzander
John,
JLinked comes with some 'Profile Plugins' which let you easily import that information into JomSocial, Community Builder, Kunena, or K2. If you have one of those extensions installed, just install one of those and configure it in the "Profiles" section of JLinked. If not, you can install one. JomSocial is the 'cleanest' extension, but costs about $100. CB isn't very easy to use, but if you're just using it for profile stuff, it will work. Honestly though, if you just want to capture profile information, all are a little bit of overkill because they have much larger functions.. the profile abilities are just one of their features, and if you're not using the extra stuff (trying to create a social network on your site, adding forums, etc), they may just get in the way.

It's also possible, if you have a developer, to create your own profile plugin which can simply store data in a custom table in your database. Not overly difficult, but you'd need knowledge of PHP and MySQL to do it.

Hope that explains. If you have more information on why you want the profile info (for your own data, to display to other users, etc), we may be able to help further.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 1 month ago #20883 by jwhelan
Alex,

Thanks again for your response. I ended up installing JomSocial to accomplish this as my programming skills are pretty rudimentary (but I am learning). It works great by the way, an I may end up using JomSocial's other functionality at a later date anyway.

One more question:
When my user logs in with jLinked, how would I prevent the user from editing (or hide) the 'name' field in during the next step of registration. I can see where this form is created in default.php from line 42 onwards, but could use some guidance on what to look for.

Thanks! (and I added a review for jLinked too).

-JW
The topic has been locked.
Support Specialist
12 years 1 month ago #20890 by alzander
JW,
Glad you're liking JomSocial. It's a huge extension, which I think actually does too much nowadays. Frankly though, what it does, it does well... so you can always grow into it.

For hiding the 'Name' field, it's pretty simple actually. You'll want to do it in the /components/com_jlinked/views/loginregister/view.html.php file though. Around line 45, you'll see:
$this->form->setValue('name', null, $profile->get('first-name') . " " . $profile->get('last-name'));
Add the following line after that:
$this->form->setFieldAttribute('name', 'type', 'hidden');
Hope that works out for you, but if you need more help, just let us know!

Thanks so much for the review.. we definitely appreciate it!

Good luck,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 1 month ago #20892 by jwhelan
This worked great. Thanks.

I also figured out how to hide the password fields and pre-populate them with a password that is a combination of the memberId and a 10 digit random number.

Final question from me (for the moment): How do I make the Profile Import field checkbox mandatory? I.e. users can choose to register or not register, but using my application requires a profile import.
The topic has been locked.
Active Subscriptions:

None
12 years 1 month ago #20893 by jwhelan
Please ignore my previous (dumbish) question. I figured it out. I'm getting a feel for how your extension works...

Thanks again Alex.
The topic has been locked.
Support Specialist
12 years 1 month ago #20903 by alzander
JW,
Glad you're getting the hang of things. I hope JLinked isn't too messy. Most of it (we think) is pretty clean and easy to read... but there are some pretty ugly sections for one reason or another. Always a goal to make it easier for users (and us) to make changes too though.

The hiding of the name, password and username are features that will likely be in the next release. It seems like a common request and shouldn't be too bad to implement with some configurable options.

For now though, it sounds like you're set. If you want to share the change you made for making the checkbox required, feel free to let us know. We can let you know if we have any other suggestions or comments on it.

Either way, best of luck, and thanks for all your feedback!
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 4 weeks ago #20935 by jwhelan
Requiring the profile import was easy.

File: /components/com_jlinked/views/loginregister/tmpl/default.php

Code change: "class="required"" (see below)

<input type="checkbox" class="required" name="jlinkedProfilePermission" <?php if($this->postDataProfilePermission) echo 'checked="checked"';?>><?php echo JText::_('COM_JLINKED_REG_PROFILE_IMPORT_PERM');?>
The topic has been locked.
Support Specialist
12 years 4 weeks ago #20952 by alzander
Yup, that's about what we would have done too. That's good for Javascript validation. It can be easily bypassed by disabling Javascript, but if someone really wants to skip the profile import that badly, you might as well let them.

Another thing you may be interested in is defaulting the check box to enabled. To do that, just remove:
<?php if($this->postDataProfilePermission) echo 'checked="checked"';?>
and simply replace with:
checked="checked"

As always, best of luck, and keep us posted if you need anything else. We love suggestions for future versions.. so feedback welcome!
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 4 weeks ago #21016 by jwhelan
This worked fine too. I think the improvement I'd like to see in one of the later versions of jLinked is the ability of the extension to reimport the LinkedIn fields into a jomsocial profile every time a user logs in (or one some reasonable schedule - say once a quarter). That way, if a user changes job, we can find them.

-JW
The topic has been locked.