• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Login with FB / into Sidebar ?

Jake Bunce

XenForo moderator
Staff member
#2
I think you want this code from the helper_login_form template:

Code:
	<xen:if is="{$xenOptions.facebookAppId}">
		<dl class="ctrlUnit">
			<dt></dt>
			<dd><a href="{xen:link register/facebook, '', 'reg=1'}" class="fbLogin"><span>{xen:phrase login_with_facebook}</span></a></dd>
		</dl>
	</xen:if>
Try adding this code to the guest area of this template:

Admin CP -> Appearance -> Templates -> sidebar_visitor_panel

like so:

Code:
<xen:else />

<div class="section loginButton">		
	<div class="secondaryContent">
		<label for="LoginControl" id="SignupButton"><a href="{xen:link login}" class="inner">{xen:phrase sign_up_now}</a></label>

		<xen:if is="{$xenOptions.facebookAppId}">
			<div style="text-align: center;">
				<a href="{xen:link register/facebook, '', 'reg=1'}" class="fbLogin"><span>{xen:phrase login_with_facebook}</span></a>
			</div>
		</xen:if>
	</div>
</div>

</xen:if>
I changed the code a little to format it. This is the result:

Screen shot 2011-02-07 at 10.15.21 AM.png
 

mrGTB

Well-known member
#5
Nice tip Jake, but take a look at the standard "sign-up code" used now in XenForo 1.1 Beta 4 for that template. It's changed and is now different from what you listed. Just saying in-case people make a mistake of replacing the whole code.

You posted this code:

Code:
<label for="LoginControl" id="SignupButton"><a href="{xen:link login}" class="inner">{xen:phrase sign_up_now}</a></label>
But now it's this:

Code:
<label for="LoginControl" id="SignupButton"><a href="{xen:link login}" class="inner">{xen:if $xenOptions.registrationSetup.enabled, {xen:phrase sign_up_now}, {xen:phrase log_in}}</a></label>