1. 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 ?

Discussion in 'XenForo Questions and Support' started by erich37, Feb 7, 2011.

  1. erich37

    erich37 Well-Known Member

    how do I put the button "Log-in with Facebook" also into the Sidebar at the right ?

    Appreciate your help.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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
     
    ibrian, Raja, mrGTB and 7 others like this.
  3. erich37

    erich37 Well-Known Member

    thanks a lot for your help!
     
  4. Zeaks

    Zeaks New Member

    Thanks for this, just what I wanted to do, worked great.
     
  5. mrGTB

    mrGTB Well-Known Member

    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>
     
  6. Raja

    Raja Member

    works perfectly :)
    Thanks,
    raja.
     

Share This Page