Topic-icon jomsocial profile

Active Subscriptions:

None
11 years 6 months ago #26771 by purplechris
hey im using the jom social profile plugin, i actually wanna rewrite it to work with another component but im not using jomsocial, is there a way i can override the jomsocial check so i can see the options in jlinkedin so i can then edit it to work
The topic has been locked.
Support Specialist
11 years 6 months ago #26788 by alzander
Replied by alzander on topic jomsocial profile
Sure! At the top of the file in the constructor is where we set 2 variables that are checked to see if the component is installed:
$this->_componentFolder = JPATH_SITE . DS . 'components' . DS . 'com_community';
$this->_componentFile = 'libraries' . DS . 'core.php';
Change those to something like below, which are directories that are guaranteed to exist in Joomla:
$this->_componentFolder = JPATH_SITE;
$this->_componentFile = JPATH_SITE.'/index.php';
You can use your own extensions file's if you want to do a 'real' check.

Let me know if you have any questions. The profile import stuff, on the simplest level, is pretty easy. Just a few functions. JomSocial and the plugins we create are pretty complex as they've grown over the last 2 years. We're planning to revise our profile plugin system with the next major (v2.0) release to simplify the plugin structure again and pull more functionality into the base classes.

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

None
11 years 6 months ago #26796 by purplechris
Replied by purplechris on topic jomsocial profile
nope doesnt work and also there is loads of code to full the profile fields far too much to go through.

we implimented a solution a while back for integration where we could select the sql table in the config and then the fields in the table where to put each part of data. would be great for you to do something like that then it would be like a universal profile plugin.

are you sure you guys wont just build this if i pay you as its proving to be a lot of hassle that no programmer will touch.
The topic has been locked.
Support Specialist
11 years 6 months ago #26809 by alzander
Replied by alzander on topic jomsocial profile
The profile plugins are by far the ugliest portion of our code right now. Originally, the profile plugins were created in late 2010 for JFBConnect v3.x. They were later updated for more 3rd party extensions and then extended again to JLinked. It's caused the code to get much harder to understand than any other part and not something we like looking at either.

The next major releases for JLinked (v2.0) and JFBConnect (v5.0) coming out late this year or very early next will be using a revamped profile plugin system. The idea is to bring it back to being a very easily approachable API allowing users to and other developers to again be able to easily create their own profile plugins.

When we do that, the plan will be to have a simplified plugin as an example for users to build on.

If you can wait until then, that's the best option. If not, feel free to let us know any questions you may have. If you did have an old profile plugin that worked, it should still work with the newer releases of JFBConnect and JLinked. There have been minor updates to function names and functionality, but overall, the structure is pretty similar and should be easily updatable.

Hope that helps explains and gives some clarity on the future plans. If you do have any questions though, just let us know!

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

None
11 years 6 months ago #26897 by purplechris
Replied by purplechris on topic jomsocial profile
ok ive chosen to use the k2 plugin instead as it seems smaller, but how can i change the fields i can put data in to to my own component?
The topic has been locked.
Support Specialist
11 years 6 months ago #26921 by alzander
Replied by alzander on topic jomsocial profile
In the getProfileFields function, you can define the fields that will be shown in the admin area of JLinked. Then, you will be able to choose the mapping of how to import the data from LinkedIn.

Once that's setup, the addFieldToDB function will be called during profile importing using the keys in the array you've set in the getProfileFields function. So, JLinked should take care of a lot of the background work. You just need to setup the fields and mappings and then JLinked will fetch that information and hand it all back to you to do what you want in the addFieldToDB call.

Hope that helps explain a bit, but if you need more, just let us know!

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

None
11 years 6 months ago #26926 by purplechris
Replied by purplechris on topic jomsocial profile
i see that yeah makes perfect sence however im still unsure of how to actually make it look at another table and not the k2 table in sql
The topic has been locked.
Support Specialist
11 years 6 months ago #26954 by alzander
Replied by alzander on topic jomsocial profile
You don't need to make anything 'look' at anything. The getProfileFields function in other profile plugins does actually look into the database to see what fields are configured. For K2 though, the fields are hard-coded so we just specify them directly in that area. You can choose to do the same or load them from a table in the database if they're more dynamic.

Then, in the addFieldToDB function, you use the array key you set from the getProfileFields function to decipher how to store the data from LinkedIn in the database. You can do that however you want (and I can explain more if you need).

Hope that helps a little more, but if not, just let me know!

Thanks,
Alex
The topic has been locked.