Topic-icon JFBConnect Compatibility with Other Third-Party Login modules?

Support Specialist
Can either of you send me the full module. Planethop, I know you've sent the template directory. If you sent the whole thing, I think I lost it. Please Private Message or email it to me (This email address is being protected from spambots. You need JavaScript enabled to view it.)

We'll actually install it and see if we can find some step by step directions to take to integrate JFBConnect with it.

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

None
Alex, I emailed you the files. Thanks.

- Ash
The topic has been locked.
Active Subscriptions:

None
Alex,

I've also sent you the module, screenshots and the conversation I've had with the module developer. My configuration is slightly different from planethop and a bit more complicated, but I'm sure it won't be a problem.

Thanks for the greatest support I've ever had!

David
The topic has been locked.
Support Specialist
Thanks, both of you, for sending the files. I have some ideas to try and implement. Feedback, as always, is welcome. I haven't tried every setting and don't expect things to be perfect here.. but should be.. better :)

First, Facebook integration must be disabled in the module. If you enable it, it's going to conflict and cause issues with JFBConnect.
Next, undo any changes I've told you to do. That way we're starting fresh and all in the same spot.

Now, edit the tmpl15 or tmpl25 file for your Joomla version. Search for "social.php". Remove the @$_SESSION && portion from each line so each should look like:
<?php if ($socialpos=='XYZ') require dirname(__FILE__).'/social.php'; ?>
Where XYZ is either 'top' or 'bottom'. There should be 3 lines you update like that.

Then, edit the social.php file. Update it so the main code area looks like below. The specific lines to add are noted:
<?php if ($socialpos == 'bottom'): ?>
<div class="loginBrd" xmlns="http://www.w3.org/1999/html"><div class="loginOr"><?php echo JText::_($v15? 'IAL_OR':'COM_USERS_OR')?></div></div>
<?php endif;?>
<?php if ($icontype == 'socialIco'):?>
  <div style="text-align:center; height:36px; *display:inline">
    <div class="socialIcoJfbc" title="JFBCONNECT" onclick="jfbc.login.login_custom()">  // ADD THIS
      <div class="socialImg" id="facebookImg"></div></a> // ADD THIS
    </div> // ADD THIS
    <?php foreach($_SESSION['oauth'] as $oauth):?>
    <div class="socialIco" title="<?php echo JText::_("IAL_LOGIN_WITH_".strtoupper($oauth->alias)) ?>">
      <div class="socialImg" id="<?php echo $oauth->alias?>Img"></div>
    </div>
    <?php endforeach;?>
  </div>
<?php else:?>
 <span onclick="jfbc.login.login_custom()" class="loginBtnJfbc submitBtn">// ADD THIS
    <span class="btnIcoJfbc facebookIco">&nbsp;</span>JFBCLogin Login</span>// ADD THIS
  <?php foreach($_SESSION['oauth'] as $oauth):?>
  <span class="loginBtn submitBtn"><span class="btnIco <?php echo $oauth->alias?>Ico">&nbsp;</span><?php echo JText::_("IAL_LOGIN_WITH_".strtoupper($oauth->alias)) ?></span>
  <?php endforeach;?>
<?php endif;?>
<?php if ($socialpos == 'top'): ?>
  <br class="socialBR" />
  <div class="loginBrd"><div class="loginOr"><?php echo JText::_($v15? 'OR':'COM_USERS_OR')?></div></div>
<?php endif;?>
Then, the final step is to edit the theme.css.php file. You need to search for socialIco and btnIco and for each instance, add a new setting called socialIcoJfbc and btnIcoJfbc, respectively. There's a lot of them, but get them all. When done, a block like:
.loginInf,
.loginErr,
.loginBtn span,
.loginBtn, {
  display: inline-block;
  <?php $fonts->printFont('btnfont', 'Text'); ?>
}
should be changed to:
.loginInf,
.loginErr,
.loginBtn span,
.loginBtnJfbc span, # add This
.loginBtn, 
.loginBtnJfbc {  # Add this
  display: inline-block;
  <?php $fonts->printFont('btnfont', 'Text'); ?>
}
It'll be tedious, but hopefully worth it.

Let us know how it goes, and good luck!
Alex
The topic has been locked.
Active Subscriptions:

None
Alex,

I'm gonna test it first thing in the morning tomorrow (GMT -0300 here lol). I'll give you feedback, for sure.

Do you know if those changes break the module's original Google and Windows Live oauth plugins? Can they coexist with JFBConnect integration?

I was reading the forum the other day and saw a lot of people asking for a vertical SCLogin layout... I understand when you say designing such modules is not sourcecoast core business and agree with you... So, why don't you try with the module's developer some sort of partnership, where he could implement a native JFBConnect profile integration in module settings? As this login module solves part of the vertical login users ask so much and has a great design and potential, you could benefit from offering this as a recommended solution for these cases... at least it fits on most template's top header.

This could be interesting from a commercial point of view, as the core business wouldn't conflict and both of you could increase the new users subscriptions leveraging each other audience... Just a thought, of course.

Thanks for your efforts and truly wish to help your customers. I can't say enough how much your support is valuable and it's indeed a great part of the user's experience. REALLY appreciate it and already recommended Sourcecoast at my college.
The topic has been locked.
Active Subscriptions:

None
Alex,

The module developer told me to add the following piece of code:

dojo.connect(dojo.byId('facebookImg'), 'onclick', function(e) {
e.stopPropagation();
jfbc.login.login_custom();
});


this this file:
/modules/mod_improved_ajax_login/mod_improved_ajax_login.php line 267 (but as he had access to my FTP and did the changes himself, I've noticed that this code is on line 533, actually..)


I've tested it (before applying your suggested patch) and it appears to be working ok. The facebook user is mapped on FFBConnect User Map tab and JomSocial profile data is being populated. Could you assess that change and tell us if it breaks something in JFBConnect?


p.s. With this code change, now I'm able to remove the Facebook API keys from his module's facebook component..

p.s2 Spoke too soon, JomSocial started acting weird after the module patch, opening facebook popups and telling me everytime that my profile was successfully connected to facebook.. :( Can't even send a message to other users...
The topic has been locked.
Support Specialist
After I went through all that diagnosis yesterday, I realized that'd it'd probably be better just to hijack and change their Javascript. I had looked at that thought this morning but was thoroughly confused by the Javascript in the Ajax Login module. That's not to say their code is sloppy, just that I don't know the libraries they are using or their overall code in general, so it was going to take too much investigation.

With your suggestion above though, we can easily make that change and see what may be going wrong now. We'll get on it and hopefully have something to you later this weekend. My (more lengthy) changes above should work, but I understand those aren't as optimal as a line or two of changes would be.

Thanks for the feedback and patience,
Alex
The topic has been locked.
Active Subscriptions:

None
Alex,

I'm going to undo his changes and apply your code patch. Will let you know how it worked here.

Thanks for your efforts!
The topic has been locked.
Active Subscriptions:

None
Alex,
Will wait to see what you come up after this weekend. (I'm crossing my fingers for a final solution that works for everybody :) )
Thanks!
The topic has been locked.
Active Subscriptions:

None
Alex.

Sent you an email with the latest patch the developer suggested. maybe it can help..

Thanks!
The topic has been locked.