× Joomla LinkedIn support forum

Topic-icon (urgent!) Can we break out Position Titles and Job Titles, etc?

Active Subscriptions:

None
Just entering the final stage of JLinked integration and am finding that the LinkedIn import is only importing summaries or mash-ups of fields - not individual fields.

For example it does not seem to be importing a position title or company name - but only together, in a single "summary" field. When importing phone numbers, it pulls in both the Phone Number "2123334444" (number) as well as the type of phone number it is "mobile" (text) into the same field!

Am I getting this right? Because if so, this is a MAJOR problem since that means we CAN'T actually import any LinkedIn fields into appropriate categories without figuring out ways of parsing the data to split it into separate fields (as expected).

Without being able to import separate fields, the data itself becomes valueless until we implement parsing since a searchable profile in JomSocial (or CB) can't be populated with field mashups and it kills the data. If this is the case, is this a JLinked issue or a LinkedIn limitation?

Anyway, please let me know as soon as you can, because if we can't import separate fields (like in JFBC), we have to rethink our whole implementation of this until parsing is in place.

Thanks!
The topic has been locked.
Support Specialist
Joe,
You can do it, but, as always, will take a little change to JLinked. These are always things we go back and forth on during implementation until someone tells us we're doing it wrong. JFBConnect has had a few years of complaints.. JLinked.. not so much :D

In the /components/com_jlinked/libraries/jlinkedata.php file, you should be able to manipulate some things how you want. For example, if you search for "getPhoneNumber", you'll see where (lines 281-282) we concatenate the Phone Number with the Type. Simply remove that second line and you should just have a pretty phone number.

Similarly, there's a getPosition function at line 177 which does the "CEO at Google" concatenation.

Hope that gets you going. With 4.1 out the door (though 4.1.1 is on the way for minor bug cleanup), we're going to be focusing on JLinked 1.1. That release will be almost completely focused on improved profile integration, and we'll re-evaluate the fields we're importing now to see what we can do differently/better.

By the way, your review for JLinked just posted on the JED. Thank you! It was a great read! :)

Alex
The topic has been locked.
Active Subscriptions:

None
Ok, excellent. We just panicked a bit when we thought importing summaries was required, thus invalidating our approach. Glad there is a way around, will check it out, but shouldn't be a problem. Thanks again!

p.s.
no problem on review, you deserve it
The topic has been locked.
Active Subscriptions:

None
Ok, excellent. We just panicked a bit when we thought importing summaries was required, thus invalidating our approach. Glad there is a way around, will check it out, but shouldn't be a problem. Thanks again!

p.s.
no problem on review, you deserve it
The topic has been locked.
Active Subscriptions:

None
So to split up the phone number from the phone number type is simple. But if we are to split a Position Title from Company from Dates - we have to actually create additional fields that each now pull only one field instead of the concatenated summary.

Could you give me an example of how to create a new field that pulls and displays e.g. the "Current Position - Company Title" and allows us to map it to a JomSocial field? This is pretty vital.

Thanks!
The topic has been locked.
Support Specialist
Joe,
To add your own custom fields, it's a multi-step (but hopefully, not too confusing) process.
* Edit the /administrator/components/com_jlinked/models/config.php file. Half way down you'll see the definitions for all the fields we currently import.
Above: 'three-current-positions.0' => 'Current Position - 0 - Summary',
Simply add: 'current-position-title.0' => 'Current Position - 0 - Title',
The first portion (current-position-title) is completely user-defineable and will be needed later. The 0 is the index of the position, so 0 would be the current/most recent job. 5 would be the 5th job in the user's profile.

* Edit the /components/com_jlinked/libraries/jlinkeddata.php file. Search for "case 'three-current-positions.0'. Add a new section above that, like:
case 'current-position-title.0':
                   $index = intval($valueParts[1]);
                   $newValue = $this->_getPositionTitle($element, $index);
                   return $newValue;
                case 'three-current-positions.0': // Already there
                case 'three-current-positions.1': // Already there

Then, you'll need to create the "getPositionTitle" function. Copying the "getPosition" function and making a quick modification, it looks like:
function _getPositionTitle($element, $index)
    {
        $newValue = '';
        if (isset($element->position[$index]))
        {
            $position = $element->position[$index];
            $newValue = $position->title;
        }

        return $newValue;
    }
Hope that helps. It's a bit complex, but hopefully isn't too confusing.

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

None
Ok, thanks. Will that get it to show up in the field-mapping in the back-end as well?
The topic has been locked.
Support Specialist
Yes, the top part (current-position-title.0' => 'Current Position - 0 - Title', ) is what does that. The first half (current-position-title.0) is used by the jlinkeddata file for the key. The second half (Current Position - 0 - Title) is simply the pretty name that will show up in the drop down for you to recognize it. Name that however you want.

Alex
The topic has been locked.