The image link in the 'Connect' theme function uses a hard coded http:// link, and if used with HTTPS causes some browsers to warn of unencrypted content.

The attached diff (against v1.4) looks at Drupal's $is_https variable and adjusts the image url accordingly. It also changes the URL from the Akamai one to Facebook as the Akamai one throws up invalid certificate errors.

Comments

quicksketch’s picture

Status: Needs review » Reviewed & tested by the community

Excellent, thanks @darrylh! I'll put this in next time I'm working on FBOAuth.

If you feel inclined, I'd like to replace the "Connect" button with the newer "Login with Facebook" button, but I haven't been able to find it easily. Fixing that at the same time (since it's the same line) might be nice to knock off #1334630: Change Facebook Button to "Login with Facebook" instead of "Connect" at the same time.

Totally optional though, this is definitely an improvement by any measure.

darrylh’s picture

I'm having trouble finding an official image as well. I've got a feeling the "Login with Facebook" may be a styled div/link rather than an image (it's probably this way to allow custom text.)

xlyz’s picture

an even more elegant solution:
$image_src = '//www.facebook.com/images/fbconnect/login-buttons/connect_light_medium_short.gif';
should work (picking the right protocol)

xlyz’s picture

one question: why the image is not stored locally?

quicksketch’s picture

We could store it locally if we wanted to I suppose, I didn't do that originally because Facebook had such a convenient connect button already, it was easy to avoid including any images (or CSS) at all with the module.

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new922 bytes
new930 bytes

I've committed this pair of patches. D6 doesn't have have a global $is_https variable, so I checked directly against $_SERVER['HTTPS'].

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.