× Joomla Facebook Connect support forum

Topic-icon jfbc invite pop up window truncated

Support Specialist
14 years 4 months ago #18165 by alzander
A Domain validated SSL certificate should be fine for your needs. $50/year is slightly high, but not too crazy, especially if it includes installation, which you may not want to mess with :)

For the UnbridledRider site, are you actually using the SCLogin module, or just adding the {JFBCLogin} tag to a different login module? The only way (currently) to get the Reconnect button is with the SCLogin module. However, we can help you add that Reconnect button to another module if you need.

Let me know.

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

None
14 years 4 months ago #18171 by bobmeetin
We are using mod_signallogin for the login module across the top of the site. If not logged in you see Login with Facebook, but if logged in, th button blue facebook button does not display, just as it doesn't in the sclogin module in the left column of the sample page. The code used in the module is:

<input type="submit" name="Submit" class="submit" value="<?php echo JText::_( 'BUTTON_LOGOUT'); ?>" />^M
<input type="hidden" name="option" value="com_user" />^M
<input type="hidden" name="task" value="logout" />^M
<input type="hidden" name="return" value="<?php echo $return; ?>" />^M
<!-- FaceBookConnect to display with logout -->
<!--
<span class='text' style='margin-top: 2px;'>
{JFBCLogin size=small logout=true}
<strong>facebook Reconnect here</strong>
</span>
-->
<!-- end FaceBookConnect -->

I have it "disabled" now because it displays a second Logout button but no blue Facebook connect//reconnect. Should this work? Why doesn't the sclogin module work and display the connect/reconnect if you have logged in as a joomla user only?
The topic has been locked.
Support Specialist
14 years 4 months ago #18183 by alzander
Bob,
I think I understand the problem. With the SCLogin module of 4.1, we did change things a little as showing the Connect button for user's that had already previously connected was causing confusion for some users. However, if you want to add the button so that it shows whenever the user isn't connected to Facebook, use the following code:
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
if (!$jfbcLibrary->getFbUserId())
{
            echo '<fb:login-button v="2" onlogin="javascript:jfbc.login.login_button_click();">Connect?</fb:login-button>';
}
Hopefully that helps. If not, let us know!

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

None
14 years 4 months ago #18191 by bobmeetin
If it were only that easy... Harumph. I edited the mod_signallogin default.php file where I have the jfbclogin function working. I added the code where it should display next to the ordinary logout button if logged in. To be sure I included a set of asterisks to make sure I got the right spot. Then the code. It is not showing. See the image which pretty much says it all. I feel that there much be some JavaScript thing going on or not going on that is running interference. No way could it be me!
File Attachment:
The topic has been locked.
Active Subscriptions:

None
14 years 4 months ago #18326 by bobmeetin
I'm still betting this is a JavaScript problem. Now interestingly in Firefox other than the 4 asterisks that I dumped in there to ensure that I had made the change in the right part of the file, I see nothing. However in Internet Explorer and Chrome if I do a joomla login I see the word, "Connect?" Nothing else, no button/link to click on, just connect.
File Attachment:
. The image is from Google Chrome.
The topic has been locked.
Support Specialist
14 years 4 months ago #18382 by alzander
Bob,
First off, sorry for the delayed response.

I think the *** thing helps a little. I'm not sure how the signallogin module works, but it sounds like it does AJAX calls back to the server to fetch the login or logout template views? That's likely the issue if those AJAX calls aren't being done in a way that rescans for Javascript code. There's 2 options from here:
1) Update the return code to:
if (!$jfbcLibrary->getFbUserId()) 
{ 
            echo '<fb:login-button v="2" onlogin="javascript:jfbc.login.login_button_click();">Connect?</fb:login-button>'; 
            echo '<script type="text/javascript">FB.XFBML.parse();</script>';
}
2) That still may not work, depending on the AJAX call type. If that's the case, you'll need to use a custom button/text for connecting, and return the value like:
echo '<a href="javascript:void(0)" onclick="jfbc.login.login_custom();"><img src="http://site.com/link-to-image.jpg" /></a>
Obviously, you can use simple text instead of the image above as well.

Sorry for the confusion, and hope that gets you going!
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 4 months ago #18655 by bobmeetin
This worked:
Code:

if (!$jfbcLibrary->getFbUserId())
{
echo '<fb:login-button v="2" onlogin="javascript:jfbc.login.login_button_click();">Connect?</fb:login-button>';
echo '<script type="text/javascript">FB.XFBML.parse();</script>';
}

The only thing I would like to do better is use a narrower in height FConnect image. You have that code option?

Much thanks. Signal login is nothing special. I am using it because it offers a horizonal login function that I could lay across the top border of the site rather than in a right/left column. Nothing more...
The topic has been locked.
Support Specialist
14 years 4 months ago #18680 by alzander
Glad to hear that finally worked. Inside the fb:login-button tag, you can add a size="small" parameter. By default (I think) it's medium. You can use small, medium, large, xlarge or icon.

Hope that helps!
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 3 months ago #19253 by bobmeetin
Got it! 'Working' code now reads:
<code>
<?php
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
if (!$jfbcLibrary->getFbUserId())
{
echo '<fb:login-button v="2" size="small" onlogin="javascript:jfbc.login.login_button_click();">Connect?</fb:login-button>';
echo '<script type="text/javascript">FB.XFBML.parse();</script>';
}
?>
</code>
The topic has been locked.
Support Specialist
14 years 3 months ago #19274 by alzander
Bob,
That's fantastic! Very glad you got this one nailed, and sorry for all the confusion at different points :)

Alex
The topic has been locked.