Topic-icon 3rd-Party Subscription Integration

Active Subscriptions:

None
10 years 10 months ago #33913 by timbms
Hi Guys,

I just purchased a subscription for JLinked (Great component BTW-Thank you!). I need some guidance on how to integrate it with 3rd party registration components/forms. Your standard plugins support CB and JomSocial...etc. I would like to integrate it with Akeeba Subscriptions (I noticed you've achieved this on your website), and also I would like to integrate it with Breezing Forms (From Crosstec). Could you direct me please on how to achieve this.

Much appreciated.

Tim
The topic has been locked.
Support Specialist
10 years 10 months ago #33918 by alzander
Tim,
Integration is a wide open question, so I'll try to answer, but you can follow up with any other questions you may have. Our social profile plugins are used to actually import the user's LinkedIn profile data into the 3rd party extensions.

At it's simplest though, you may just want to add the "Login with LinkedIn" button to other forms, like we've done with AkeebaSubs on this site. We *don't* import any profile data into AkeebaSubs, we just show the login button on those pages for easier access.

If the Login button is all you're looking for, you can create template overrides for any of the AkeebaSubs or BreezingForms files that you want and then add our login button with the following code:
<a href="javascript:void(0)" onclick="jlinked.login.login();">
   <img src="/mod_sclogin/images/button_linkedin.png">
</a>
You can use other login button images if you want, or even a text link, but the above will use the SCLogin's LinkedIn blue button.

I hope that helps get you started, but if you have more information on what 'integration' you're looking for, we'll gladly help you do it however we can.

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

None
10 years 10 months ago #33919 by timbms
Hi Alex,

My apologies, I should've clarified my question. I actually meant importing a user's LinkedIn profile. I have two projects that require JLinked:

One service uses Akeeba Subscriptions, where user details need to be imported into it automatically, as it does with Joomla's registration process or Jomsocial...etc.

The second project uses BreezingForm's Joomla's registration replacement app, again to import user details from LinkedIn. Also, since is it a form building component, it will be used to build additional surveys, questionnaires...etc. It would be really helpful to use JLinked with these as well.

The challenge with both projects above is to be able produce custom fields that correspond to Linkedin's profile fields, like a users title, short description...etc.

So we need some guidance, just to understand how to implement the above.

I hope this clarifies what we are trying to achieve. I'm happy to answer any further questions.

Many thanks,

Tim
The topic has been locked.
Support Specialist
10 years 10 months ago #33933 by alzander
Tim,
To import that information, you'd need to create a new Social Profile plugin. It's likely we'll create one for AkeebaSubs later this year, but it won't be for at least a few weeks, and likely not for a few months.

The process for creating a social profile plugin is pretty straight-forward. If you don't need avatars, it's even simpler. I'd start by looking at the Kunena social profile plugin, as it's a good, simple, example. Basically, you need to do the following:
* Update the "getProfileFields" function which will show the fields in the mapping section of the profiles area.
* Update the saveProfile function to properly save the data imported from your mappings in the profiles area.
* You can use the createUser function if you have to do something special when the user registers, like creating them in a special table.

Obviously, it'd be best to have a developer implement this stuff, but the profile plugins are generally less than 100 lines of code. If you run into issues and have questions though, just let us know.

I hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 10 months ago #33939 by timbms
Thanks Alex,

Yes we are developers, so we are happy to do some 'dirty' work.

This sounds great. I will update you if there are any issues.

One thing that we forgot is that Akeeba Subs automatically integrates with Joomla's com_users. So, unless you need to create custom fields, JLinked can be used to import data into Joomla (in the background), then just simply allow Akeeba subs to automatically import them. It's somewhat of a convoluted approach but it works if people can't/don't want to mess around with the code.

All the best,

Tim
The topic has been locked.
Support Specialist
10 years 10 months ago #33945 by alzander
Tim,
Glad that helped spawn some ideas. For Akeebasubs importing data from Joomla, that's definitely true. However, if you want to automatically import information like City and State, that's something you'd need a plugin for since Joomla doesn't have anywhere to store that data.

One other thing I forgot to mention is that the profile plugins are good for getting data during registration or login. There are other ways to dynamically get profile data while the user is perusing your site. For instance, with a contact form, you may not want to fetch the user's City during registration, but if they try to contact you, you can get it during that page load and pre-fill it for them. If you are interested in that, it's just a few lines of code to get that data, but of course you'll have to do something with it in the other extensions.

Either way, best of luck and let us know what you come up with.

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

None
10 years 10 months ago #33946 by timbms
Hi Alex,

We can't seem to find the Kunena Social Plugin. It was not included in the package we downloaded. It only has JomSocial, CB and K2. Have I missed something during the download process?

Best,

Tim
The topic has been locked.
Support Specialist
10 years 10 months ago #33964 by alzander
Tim,
My guess is that you downloaded the Joomla 3.x package which didn't have all of the profile plugins included. The Kunena plugin was left out because we hadn't fully tested that plugin with Joomla 3.0 yet. There's no 3.x version of the plugin available yet, but the 2.5 is the exact same except for some minor differences in the XML file.

You can easily download the 2.5 version, or any of the other social profile plugins, from the link below though:
www.sourcecoast.com/index.php?option=com_ars&view=release&id=6

I hope that helps, but if you have any questions, let me know.

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

None
10 years 9 months ago - 10 years 9 months ago #34055 by learnthrusong
Hi Tim @timbms,

Did you manage to achieve this yet?

I'm working on a set of plugins - specifically a user plugin, an akeebasubs 'timed groups' plugin to auto upgrade a users group at set intervals during the life of a subscription and system plugin - that I will be adding the auto-population of data from facebook to the subs page. BTW, I know that its JLinked that you're trying to integrate with but, from the akeeba subs side of things, the principles will be the same.

In preparation for performing this data pull, I've discovered that in order to get this to work in akeebasubs, I will have to override the AkeebasubsControllerLevels::onBeforeRead method. Since this is a core method in the controller, any modification of this will need to be re-done at each Akeeba Subs upgrade. I am therefore looking into how I might overload this method in a system plugin.

I haven't started the FB integration part yet so, I'll post an update if and when I manage it. In the meantime, I'd be very interested to see any of your findings! ;)

Best of luck,

Gez
Last edit: 10 years 9 months ago by learnthrusong.
The topic has been locked.
Active Subscriptions:

None
10 years 9 months ago - 10 years 9 months ago #34095 by learnthrusong
OK, I've made some headway with this...

First, to further explain why the AkeebasubsControllerLevels::onBeforeRead needs to be overridden: this is because this controller is the only place in which the AkeebaSubs $view->cache can be overridden.

So, what I've done so far is:
  1. Created a System Plugin with a __construct & onAfterRoute methods
  2. In the constructor I validate the existence of the AkeebasubsControllerLevels with a file_exists on it's path
  3. Created an 'overrides' dir in my system plugin with a 'clone' of the AkeebasubsControllerLevels class
  4. Renamed my 'clone' of AkeebasubsControllerLevels file and class MyclassnameController extends AkeebasubsControllerLevels (not FOF)
  5. Removed all methods from the methods from MyclassnameController other than the one I want to override (onBeforeRead)
  6. In my system plugin, using JApplication class, I detect when I'm option == com_akeebasubs and view == levels
  7. If true, require_once on the original controller then the overriden one in the 'overrides' directory like:
    require_once($originalControllerPath);
    require_once($overrideControllerPath);
  8. instance a new controller like
    $controller = new MyclassnameController();
  9. Call onBeforeRead from overridden controller like
    $controller->onBeforeRead();
  10. To verify your calling the overridden onBeforeRead, echo something or dump/print something from the method and you'll see, you have completed the first step! ;)
Now that stage 1 is complete, overriding the $view->cache for fields I want to fetch from facebook should be a sinch.

I'll post an update if I get chance to do this over the weekend!

Hope it helps someone!

Best of luck,

Gez
Last edit: 10 years 9 months ago by learnthrusong.
The topic has been locked.