× Joomla Facebook Connect support forum

Topic-icon How to replace jomsocial fbconnect with jfbconnect?

Active Subscriptions:

None
I need help on how to replace just the jomsocial facebook connect with jfbconnect button only? The reason I need this done is because the login box is integrated into my template and when I activate jfbconnect module it messes up template. Can anyone tell me how to do this? This is a great plugin and cant wait for the next update on it. I have tried this code but no luck. I placed this code in frontpageguest.php at the end where it has this code <?php echo fbhtml?>

<?php require_once (JPATH_ROOT.DS.'components'.DS.'com_jfbconnect'.DS.'libraries'.DS.'facebook.php');

$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();

echo $jfbcLibrary->getLoginButton(); ?>

Thank you in advance for anyone who helps me!
The topic has been locked.
Support Specialist
13 years 5 months ago #5831 by alzander
I believe we can help you, but will likely need a little more information on exactly what you're trying to do and how it's messing up the template.

Do you have an active subscription? Please post from that account, as we prioritize support for our active subscribers. Also, what version of JFBConnect are you using?

Thanks
The topic has been locked.
Active Subscriptions:

None
13 years 5 months ago #5832 by excel32
I am buying subscription now brb!
The topic has been locked.
Active Subscriptions:

None
13 years 5 months ago #5834 by excel32
Ok now I have a subscription. Ill first have to update to latest version first then ill tell you what i need done ok
The topic has been locked.
Support Specialist
13 years 5 months ago #5835 by alzander
Thanks for subscribing! Just let us know when you have something up we can look at, and we can likely help get to the bottom of template issues. It's usually a missing div, or something like that.

When you're ready, post the URL (or PM it to us, if you don't want others to see it).
The topic has been locked.
Active Subscriptions:

None
13 years 5 months ago #5836 by excel32
Ok I have updated to latest version :) The site is www.ldshello.com now where the login form is I want to replace jomsocial connect with jfbconnect button. Can I do this and still get all the features of jfbconnect or do I have to use jfbconnect module? When i use the module it goes righ on top of curent login form and is a mess because the login form is in template and not a module. Please help!
The topic has been locked.
Active Subscriptions:

None
13 years 5 months ago #5837 by excel32
OK here is the template guest.php code. On the <div class="loginform"> below in the code I posted. what is the code I need to overwrite there for jfbconnect login module?
<?php
/**
 * @package		JomSocial
 * @subpackage 	Template 
 * @copyright (C) 2008 by Slashes & Dots Sdn Bhd - All rights reserved!
 * @license		GNU/GPL, see LICENSE.php
 * 
 */
defined('_JEXEC') or die();
?>
<div class="greybox">
	<div>
	    <div>
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
			    <tr>
			        <td valign="top">
					    
					        <img src="components/com_community/templates/ooopa_nsm/images/transparence.png" width="585" height="3" />
<div class="joinbutton">
				  <a id="joinButton" href="<?php echo CRoute::_( 'index.php?option=com_community&view=register' , false ); ?>" title="<?php echo JText::_(''); ?>">
				      <?php echo JText::_(''); ?>
				  </a>
				
					    </div>
			        </td>
			        <td width="200">



					    <div class="loginform">
					    	<form action="<?php echo CRoute::getURI();?>" method="post" name="login" id="form-login" >
					        <h2><?php echo JText::_('CC MEMBER LOGIN'); ?></h2>
					            <label>
									<?php echo JText::_('CC USERNAME'); ?><br />
					                <input type="text" class="inputbox frontlogin" name="username" id="username" />
					            </label>

					            <label>
									<?php echo JText::_('CC PASSWORD'); ?><br />
					                <input type="password" class="inputbox frontlogin" name="passwd" id="password" />
					            </label>

                                <?php if(JPluginHelper::isEnabled('system', 'remember')) : ?>
								<label for="remember">
									<input type="checkbox" alt="<?php echo JText::_('CC REMEMBER MY DETAILS'); ?>" value="yes" id="remember" name="remember"/>
									<?php echo JText::_('CC REMEMBER MY DETAILS'); ?>
								</label>
								<?php endif; ?>

								<div style="text-align: center; padding: 10px 0 5px;">
								    <input type="submit" value="<?php echo JText::_('CC BUTTON LOGIN');?>" name="submit" id="submit" class="button" />
									<input type="hidden" name="option" value="com_user" />
									<input type="hidden" name="task" value="login" />
									<input type="hidden" name="return" value="<?php echo $return; ?>" />
									<?php echo JHTML::_( 'form.token' ); ?>
								</div>
								
								<span>
									<?php echo JText::_('CC FORGOT YOUR'); ?> <a href="<?php echo CRoute::_( 'index.php?option=com_user&view=reset' ); ?>" class="login-forgot-password"><span><?php echo JText::_('CC PASSWORD'); ?></span></a> /
									<a href="<?php echo CRoute::_( 'index.php?option=com_user&view=remind' ); ?>" class="login-forgot-username"><span><?php echo JText::_('CC USERNAME'); ?></span></a>?
								</span>
								<br />									
								<a href="<?php echo CRoute::_( 'index.php?option=com_community&view=register&task=activation' ); ?>" class="login-forgot-username">
									<span><?php echo JText::_('CC RESEND ACTIVATION CODE'); ?></span>
								</a>
					        </form>
					        <?php echo $fbHtml;?>

					    </div>
			        </td>
			    </tr>
			</table>
	    </div>
	</div>
</div>
The topic has been locked.
Support Specialist
13 years 5 months ago #5841 by alzander
I see you have the latest release up now. Great!

When I go to your page, I'm not seeing the login code anywhere. Is you modification you mention above still there (in the frontpage.guests.php file)? What directory are you doing it in? It should be:
/components/com_community/templates/ooopa_nsm/frontpage.guests.php

Additionally, it's possible there's already a template override for this file, which allows you to make minor modifications without worrying about future template updates overriding your changes. If the file below exists, you should make the change there, as this is the file that JomSocial is actually loading. If it doesn't exist, you should actually copy the file above to this directory and make the modification.
/templates/ooopa_nsm/html/com_community/frontpage.guests.php

For more information about template overrides, see:
www.sourcecoast.com/extensions/troublesh...s#template-overrides

Hope this helps. If you have made the change above, and you're sure it's in the right file, we'll need to determine why the button isn't showing up at all.

If you have any questions, let us know!
The topic has been locked.
Support Specialist
13 years 5 months ago #5842 by alzander
Looks like our posts crossed each other. First, ensure you're updating the correct file, as above, then try the following at the line that has <?php echo $fbHtml;?>
<?php #echo $fbHtml; // comment this out so it doesn't display
require_once (JPATH_ROOT.DS.'components'.DS.'com_jfbconnect'.DS.'libraries'.DS.'facebook.php'); 
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance(); 
echo $jfbcLibrary->getLoginButton();
?>

Once that's done, if the template's still not looking right, let us know and we can help debug the issue.
The topic has been locked.
Active Subscriptions:

None
13 years 5 months ago #5845 by excel32
I think you misunderstood me lol. The members login form that is there is from the /components/com_community/templates/ooopa_nsm/frontpage.guests.php .
I need the jfbconnect to be there instead but I have to run the module code in the template file because the background of the login box is one whole image so when I do put the jfb module there it pushes the image over. So i figured I can just run the module code in the template file frontpage guest.php just like it is doing now with the curent login form. I was editing the site when you looked at it so I wont edit it tell I get a response back from you.
The topic has been locked.