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

XF 1.4 How to phrase for Custom User Field and how to redirect Contact Us overlay

Discussion in 'XenForo Questions and Support' started by sbj, Mar 15, 2015.

  1. sbj

    sbj Well-Known Member

    1) I have 2 languages installed.
    I created a phrase with id phrase_abc for language A, and then I created a phrase with id phrase_abc for language B.

    I want to use that phrase for a custom user field.
    For the custom user field description I used:
    Code:
    {xen:phrase phrase_abc}
    but it didn't work.
    Instead of displaying the description text for that custom user field in my register form, it displays
    Code:
    {xen:phrase phrase_abc}
    . What is wrong?


    2) How can I redirect the Contact Us overlay to the http://abc.com/misc/contact page ? I guess I need to edit one template for that. So when somebody visits your forum and they use the "Contact Us" link on buttom on the right side of the page, that the overlay doesn't appear and the person is redirected to a contact form page.
     
  2. Mike

    Mike XenForo Developer Staff Member

    1. Custom user field descriptions are already phrased. See the "user_field_*" phrases. Otherwise, you can't use template syntax in areas other than templates so the syntax you're trying to use isn't valid.

    2. You would need to change the footer template to remove the class="OverlayTrigger" part of the link to the contact form.
     
    sbj likes this.
  3. sbj

    sbj Well-Known Member

    1. Ahhh, awesome! Didn't know that. Are "Question and Answer Captchas" also phrased? How can I phrase them?

    2.
    Code:
                <xen:hook name="footer_links">
                    <xen:if is="{$xenOptions.contactUrl.type} === 'default'">
                        <li><a href="{xen:link 'misc/contact'}" class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}">{xen:phrase contact_us}</a></li>
                    <xen:elseif is="{$xenOptions.contactUrl.type} === 'custom'" />
                        <li><a href="{$xenOptions.contactUrl.custom}" {xen:if {$xenOptions.contactUrl.overlay}, 'class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}"'}>{xen:phrase contact_us}</a></li>
                    </xen:if>
    ...
    
    I have to remove just those
    Code:
    class="OverlayTrigger" 
    parts?
     
  4. Mike

    Mike XenForo Developer Staff Member

    Q&A CAPTCHA questions aren't phrased. (They probably should be actually.)

    Correct on removing the overlay trigger part.
     
    sbj likes this.
  5. sbj

    sbj Well-Known Member

    Removing the overlay trigger part worked. Thank you.

    Ok, now Q&A Captcha is not phrased, and I can't use template syntax for phrasing, is there a method left to make it phrased?
     
  6. sbj

    sbj Well-Known Member

    This and is there a way to phrase forum node names?
     
  7. Mike

    Mike XenForo Developer Staff Member

    For the Q&A, you'd have to put multiple translations in the question.

    Forum names cannot be phrased.
     
  8. sbj

    sbj Well-Known Member

    Ok, thank you.
     

Share This Page