× Joomla Facebook Connect support forum

Topic-icon [SOLVED] JFBConnect won't work properly in new website

Active Subscriptions:

None
I have installed JFBConnect, along with the login and invite modules, and integrated with JomSocial, in which I am using the default template. I have positioned both modules in the "user1" position, as it is one of the only module positions, in which the modules seem to show up. Unfortunately, the modules are not showing up correctly.

When I am not logged in, the login module has the regular Joomla login in fields, and says "Login Using Facebook" below, but does not give an option to actually click it - also, no FBConnect image shows up. Once logged in, the module says "Connect this account..." but again, nothing to click on and no FBConnect image. The Invite module doesn't work at all (logged in or not), and only shows the module title.

You can find the page, and modules in question by going to [url:3jth6oat]http://www.theskipper2.com[/url:3jth6oat] and clicking on "community" in the top navigation bar. This is the only section in which I want the JFBConnect module to appear. I have set up a temp user if necessary for determining my issue. username: fbconnect password: testing

Thanks in advance for any help that I can be given. I am fairly new to Joomla, and although I have been able to fix a lot of my issues so far, this one has me really stumped.

Cheers,

Ayton
The topic has been locked.
Active Subscriptions:

None
14 years 11 months ago #1068 by aytonmm
For anyone that may be looking at my site to help with this, I have moved the two non-working modules (login, and invite) to user2 position to get them out of the way while I work on other stuff on the site (user2 = bottom of the community page)

Looking at the source code for the community page (<!-- m --><a class="postlink" href="www.theskipper2.com/community">www.theskipper2.com/community), it seems as though all the code is there to provide the Facebook buttons... but they just aren't working:

HEADER
<body id="secondary"><script type="text/javascript">
	if(document.namespaces) {
		// IE
		document.namespaces.add("fb", "http&#58;//www.facebook.com/2008/fbml");
	} else {
		var htmlElement = document.getElementsByTagName('html')&#91;0&#93;;
		htmlElement.setAttribute('xmlns&#58;fb', 'http&#58;//www.facebook.com/2008/fbml');
	}
</script>

LOGIN MODULE
<h3>JFBCLogin</h3>

					<script type="text/javascript" src="http&#58;//static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"></script>
<script type="text/javascript">
	window.addEvent('domready', function()
		{FB_RequireFeatures(&#91;"XFBML"&#93;,
			function() {
				FB.Facebook.init("998dd845a367d70059086a8ef4165a70", "/component/jfbconnect/?view=xdreceiver&format=raw");
		});
	})
;</script>

<script type="text/javascript">
	function fb_login_button_click()
	{
		FB.Facebook.get_sessionState().waitUntilReady(
			function() {
				var fbUserLoginLink = "/component/jfbconnect/?task=loginFacebookUser&view=xdreceiver&return=L2NvbW11bml0eQ%3D%3D";
				window.location = fbUserLoginLink;
			});
	}

	function logout_button_click()
	{
		redirect_to_jfbconnect_logout();	}

	function redirect_to_jfbconnect_logout()
	{
		window.location = '/component/jfbconnect/?task=logout&return=aW5kZXgucGhwP29wdGlvbj1jb21fY29udGVudCZ2aWV3PWZyb250cGFnZQ%3D%3D';
	}
</script>



<form action="http&#58;//www.theskipper2.com/" method="post" name="login" id="form-login" >
	<fieldset class="input">
	<div id="form-login-username">
		<label for="modlgn_username">Username</label><br />

		<input id="modlgn_username" type="text" name="username" class="inputbox" alt="username" size="18" />
	</div>
	<div id="form-login-password">
		<label for="modlgn_passwd">Password</label><br />
		<input id="modlgn_passwd" type="password" name="passwd" class="inputbox" size="18" alt="password" />
	</div>
	<input type="submit" name="Submit" class="button" value="Login" />
	</fieldset>

	<input type="hidden" name="option" value="com_user" />
	<input type="hidden" name="task" value="login" />
	<input type="hidden" name="return" value="L2NvbW11bml0eQ==" />
	<input type="hidden" name="f1ce410b7b63e2592bac9aae7955efec" value="1" /></form>


Login using Facebook</a>
<fb&#58;login-button onlogin="javascript&#058;fb_login_button_click();"></fb&#58;login-button>
<ul>
	<li>
		<a href="/community/register">Register for this site</a>
	</li>
	</ul>

INVITE MODULE
<h3>JFBCInvite</h3>
				
<fb&#58;serverfbml>
        <script type="text/fbml">
                <fb&#58;fbml>
                        <fb&#58;request-form
				action=""
                                method="POST"
                                invite="true"
				type="XFBML"
				content="Come join me on this site!					<fb&#58;req-choice url='' label='Confirm' />">
                                <fb&#58;multi-friend-selector
                                        showborder="false"
					actiontext="Invite your friends to join you on this site!">
                        </fb&#58;request-form>
                </fb&#58;fbml>
        </script>
</fb&#58;serverfbml>

Thanks again!
The topic has been locked.
Active Subscriptions:

None
14 years 11 months ago #1069 by aytonmm
Okay, so if I have the module on all the pages instead of just the community page, the button shows up on the home page or any main site page - but still not on the community pages. You can see this - [url:1zh2st6m]http&#58;//www.theskipper2.com[/url:1zh2st6m] the facebook connect button shows, but then go to the community page (JomSocial) [url:1zh2st6m]http&#58;//www.theskipper2.com/community[/url:1zh2st6m], and the connect button doesn't show up - even though it is the same module.

Once logged in, no matter what page you are on - including the main site pages - the connect this account with facebook doesn't show up.

There is only one module... has anyone ever run into this problem before?

Thanks,

Ayton
The topic has been locked.
Active Subscriptions:

None
14 years 11 months ago #1070 by aytonmm
Sorry for the bother... ended up fixing the issue by myself. In case anyone else runs in to the same issue, I noticed that the line calling mootools was wrong in the template that I am using:
<script type="text/javascript" src="/media/system/js/mootools.js"></script>

Changed to:
<script type="text/javascript" src="media/system/js/mootools.js"></script>

just removing the preceding forward slash, so that it could actually find the script.

Thanks,

Ayton
The topic has been locked.
Active Subscriptions:

None
how did you solve this? im having the same problem but im not using mootools. im using ja_purity sukerfish menus.
The topic has been locked.
Active Subscriptions:

None
14 years 10 months ago #1478 by aytonmm

fezzicnex wrote: how did you solve this? im having the same problem but im not using mootools. im using ja_purity sukerfish menus.


I solved it by just removing that preceding forward slash from the script calling mootools. If you aren't using mootools, I am assuming that the issue is a different one.

A
The topic has been locked.
Active Subscriptions:

None
I see what you mean. Even though my template isn't using mootools, it's still calling it out in the page somehow. Do you know what file is calling out the mootool.js? Cause I can't seem to find it (it's not in the templates index.php like I thought)?
The topic has been locked.
Support Specialist
14 years 10 months ago #1499 by alzander
Mootools is a requirement for JFBConnect. We tell Joomla to include it, which then Joomla adds to your header. There's a framework within Joomla where so that if multiple components/modules want to include Mootools, it will only include it once. So, in general, the mootools call your seeing may be originated from JFBConnect. If multiple inclusions of Mootools are in your raw code, then it means some component/module/template is including it's own copy or including the built-in Joomla copy of Mootools in an incorrect way.

This can cause conflicts and different problems and should be remedied.
The topic has been locked.
Active Subscriptions:

None
14 years 10 months ago #1547 by dalekurt

aytonmm wrote: Sorry for the bother... ended up fixing the issue by myself. In case anyone else runs in to the same issue, I noticed that the line calling mootools was wrong in the template that I am using:

<script type="text/javascript" src="/media/system/js/mootools.js"></script>

Changed to:
<script type="text/javascript" src="media/system/js/mootools.js"></script>

just removing the preceding forward slash, so that it could actually find the script.

Thanks,

Ayton


Hi Ayton,

Can you recall what file you modified to remove the forward slash, I'm experiencing a similar issue with custom template I am working where the facebook connect button shows up on the Japurity template but will not on my custom template. My template had a second call for a mootool script which I removed however the result is the same.
The topic has been locked.
Active Subscriptions:

None
14 years 10 months ago #1548 by aytonmm

dalekurt wrote: Hi Ayton,

Can you recall what file you modified to remove the forward slash, I'm experiencing a similar issue with custom template I am working where the facebook connect button shows up on the Japurity template but will not on my custom template. My template had a second call for a mootool script which I removed however the result is the same.


It was in the <head> of the index.php file in my template folder. (i.e. /website_root/templates/template_name/index.php)

Hope this helps,

Ayton
The topic has been locked.