× Joomla Facebook Connect support forum

Topic-icon Facebook connect button appears on home, not in others

Active Subscriptions:

None
Hi,
We have just installed the component on a joomla for a client, we bought it yesterday and everything went fine, til now.
We see that we can view the button on the homepage, but if i go, say, to "about me", an article menu item, the component loads but the image for the facebook connect does not show.

We need this component in order to finish the project, please help.

Thanx
The topic has been locked.
Active Subscriptions:

None
I noticed on my set up in another browser (safari) sometimes the facebook connect button wouldn't show either. It would be better if the image was stored our end instead of facebook's side.
The topic has been locked.
Active Subscriptions:

None
14 years 11 months ago #947 by betovarg
Anyone with any help?
this is very strange, and we need help. I dont know if it is javascript related, but i think someone can check it out.

the site is
<!-- m --><a class="postlink" href="siniswack.cratediggers.biz/beta/">siniswack.cratediggers.biz/beta/
the button appears below the menu, but if you go into another sections, then the button does not load.

thanx
The topic has been locked.
Active Subscriptions:

None
Ok, I noticed this happened on my site now. If you go to my forums the Connect button goes away .... how odd. I wonder if you hard code the location of the image to be located on your own server if that would help? I haven't tried it myself yet.
The topic has been locked.
Active Subscriptions:

None
14 years 11 months ago #975 by betovarg
I actually thought about that, but misses the whole point of having a pid component that it is supposed to do that...
The topic has been locked.
Support Specialist
14 years 11 months ago #986 by alzander
For those of you affected, can you try adding the following bolded line to /modules/mod_jfbclogin/tmpl/default.php:
JFBConnectFacebookHelper::init();
JHTML::_('behavior.mootools');

Let me know if this fixes your issue, and we'll make sure it gets into the next release.
The topic has been locked.
Support Specialist
14 years 11 months ago #987 by alzander
Also, you can't hardcode the image on your server. That's a big Facebook no-no, they want you to use their approved, fetched-on-the-fly images.. and it's pulled through Javascript anyways, so it would be difficult to do.
The topic has been locked.
Active Subscriptions:

None
14 years 11 months ago #989 by betovarg
Thank you for the code sourcecoast, I just dont know where to add it in the file... i added it and it now looks like this:
<?php

defined('_JEXEC') or die('Restricted access');

JFBConnectFacebookHelper&#58;&#58;init();
JHTML&#58;&#58;_('behavior.mootools');
?>

<script type="text/javascript">
	function fb_login_button_click()
	{

and code goes on... but the image is still not showing in the other pages. is it there where i have to put it?

thanx
The topic has been locked.
Active Subscriptions:

None
14 years 11 months ago #990 by betovarg
Guys i have fixed at least my situation. Thanx to the code from sourcecoast i remembered i used this code to remove the mootools from the header:
<?php
// Remove auto generated mootool from header
$headerstuff = $this->getHeadData();
reset($headerstuff&#91;'scripts'&#93;);
$moo = key($headerstuff&#91;'scripts'&#93;);
unset($headerstuff&#91;'scripts'&#93;&#91;$moo&#93;);
$this->setHeadData($headerstuff);
?>

I removed it and now it works. I just have a question on whether that code is deprecated or something, cuz i use it in most of the installs that do not use mootools.
Thanx for all the lhelp.
The topic has been locked.
Support Specialist
14 years 11 months ago #991 by alzander
Mootools isn't deprecated, it's a ~70kb Javascript file which is widely used. It used to be included by default in Joomla until version 1.5.7 (or .8?), but then they started making people include it in their components.

The code you show is what was used previously to get around the fact that on some pages Mootools wasn't required (so why push a 70kb file to your users), but was included by default. Generally, now, if your past 1.5.7 (or .8.. just can't remember).. you shouldn't use that code because now if a component or module is specifically requesting mootools to be included, you shouldn't be removing it.

It's confusing. However, if you have a site that the button still isn't working on.. check if on a page that it works you have the line in the <head> section:
<script type="text/javascript" src="/media/system/js/mootools.js"></script> (or something similar)

and compare to pages it doesnt work to see if the line is missing. If that's the case, this is your problem and add the JHTML line below.
If that doesn't work, check if the line above still isn't appearing.. you may be disabling this code and not even know it.
The topic has been locked.