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

Changing FB Button Phrase

Discussion in 'XenForo Questions and Support' started by ddmmh, Dec 14, 2010.

  1. ddmmh

    ddmmh Well-Known Member

    I have a custom welcome message for my guests as below.
    FB.png
    What I want to do is change the button to say "signup with facebook" for my guest message but to stay the same for the drop-down login panel.

    How can I do this? So far my page container has the following for the welcome guest message.

    Code:
    <xen:if is="!{$visitor.user_id}">
                                                    <p class="importantMessage">Hello there guest and welcome to MMAZone!<br />
                                                    To gain full access you must <a href="{xen:link 'register/'}">Register.</a> Registration is free and it takes only a few moments to complete.<br />
                                                    Already a member? <a href="{xen:link 'login/'}">Login here</a> then!<br /><br /><a href="{xen:link register/facebook, '', 'reg=1'}" class="fbLogin"><span>{xen:phrase login_with_facebook}</span</a></p>
    </xen:if>
    
    Thanks.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    There is a phrase for that. Replace this:

    Code:
    {xen:phrase login_with_facebook}
    
    ...with this:

    Code:
    {xen:phrase sign_up_with_facebook}
    
     
  3. ddmmh

    ddmmh Well-Known Member

    I tried that initially before making this post but if i so much as remove even one letter from the xen phrase it looks like this :

    FB.png
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I see your closing span tag is incomplete. That might be the cause:

    Code:
    <span>{xen:phrase login_with_facebook}</span</a></p>
    
     
  5. ddmmh

    ddmmh Well-Known Member

    Hi Jake,

    Oops lol... good eye. I closed the tag but unfortunatley still the same issue
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It works fine in my testing.

    Can you post the complete code you are using after changing the phrase? (the code that exhibits that problem)
     
  7. ddmmh

    ddmmh Well-Known Member

    Hi Jake,

    Heres the whole welcome guest code i use including the FB login.

    Code:
    <xen:if is="!{$visitor.user_id}">
                                                    <p class="importantMessage">Hello there guest and welcome to MMAZone!<br />
                                                    To gain full access you must <a href="{xen:link 'register/'}">Register.</a> Registration is free and it takes only a few moments to complete.<br />
                                                    Already a member? <a href="{xen:link 'login/'}">Login here</a> then!<br /><br /><a href="{xen:link register/facebook, '', 'reg=1'}" class="fbLogin"><span>{xen:phrase login_with_facebook}</span></a></p>
    </xen:if>
    
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    I was able to get it working without problems changing the last span to:

    <span>{xen:phrase sign_up_with_facebook}</span></a></p>

    Here's what I used:
    Code:
    <xen:if is="!{$visitor.user_id}">
        <p class="importantMessage">Hello there guest and welcome to MMAZone!<br />
        To gain full access you must <a href="{xen:link 'register/'}">Register.</a> Registration is free and it takes only a few moments to complete.<br />
        Already a member? <a href="{xen:link 'login/'}">Login here</a> then!<br /><br /><a href="{xen:link register/facebook, '', 'reg=1'}" class="fbLogin"><span>{xen:phrase sign_up_with_facebook}</span></a></p>
    </xen:if>
     
    ddmmh likes this.
  9. ddmmh

    ddmmh Well-Known Member

    So the above code im using is correct? But when i change anything out of login_with_facebook it cuts off like the picture a few posts up. Thats the only thing ive edited from the page container really.
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    Are you sure you used the correct phrase; sign_up with_facebook and not signup_with_facebook ?

    If you copy and paste the code in my post above then it should work.
    If it doesn't then you have a missing phrase.
     
    ddmmh likes this.
  11. ddmmh

    ddmmh Well-Known Member

    I didnt know it had to be exact like that, thanks that worked perfectly, youve been so helpful with lots of things cheers.
     

Share This Page