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

XF 1.5 show user's location?

Discussion in 'Styling and Customization Questions' started by davs, Sep 11, 2015.

  1. davs

    davs Member

    I am looking for a way to show user's location (which they input at registration) under their name and level...like right on here
    New Member
    Toronto, ON
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You can do that with a custom user field and style properties.
  3. davs

    davs Member

    Do you mean with code?
  4. Brogan

    Brogan XenForo Moderator Staff Member

  5. davs

    davs Member

  6. Diana

    Diana Active Member

    I have the same question as davs but I don't understand the directions in the link.

    For instance, what is an "identifier?"

    And, "if the field is required, a value will have to be entered/selected when a user registers or attempts to edit the appropriate section of their account."

    Since I've set the location as required upon registration, what does it mean that "a value will have to be entered/selected?"

    I'm sure I'd have other questions, but maybe if I can at least get passed the first two the rest will become clearer to me.
  7. Brogan

    Brogan XenForo Moderator Staff Member

    It's a unique name you assign to the custom user field.

    They have to complete the field - i.e. enter something.
  8. Diana

    Diana Active Member

    This was actually more simple than I thought.

    To show the location under the avatar:

    1. set up a custom field (i.e. "Location") in user/User Customization
    2. In style properties/message elements, check "Show custom user fields" and "Show author location."
    davs likes this.
  9. Diana

    Diana Active Member

    Uh oh. I was happy to see the location show up under member's avatars, but now when new members register there are two fields for "location." Where do I remove one of them?
    Last edited: Nov 29, 2015
  10. davs

    davs Member

    Since you allowed "required" for location during sign up (options - user registration), then do you not need to make a custom user field at all? Just set the "Show author location" tick box in style properties - message elements and then you have location on signup and it shows under username. no?

    My prob was I didnt want it mandatory so I left it out and made a notice in hopes they would add it after.
  11. Diana

    Diana Active Member


    I was up last night trying to figure it out (these little things can drive you nuts lol) and it finally dawned on me that it doesn't need and shouldn't have a "custom user field," since that creates a duplicate field after I require "location" upon sign up.

    Only one step was needed, and you just confirmed it: "Just set the "Show author location" tick box in style properties - message elements"

    Another day, another problem solved.

    Thank you davs, we make a good team :)
    Last edited: Nov 30, 2015
    davs likes this.
  12. davs

    davs Member


    I usually need and appreciate detailed instructions as there are so many options.

    I wanted location too but weighed the differences for as easy a sign-up as possible. Most active users input location after my notice to them. What is your forum address, can I see?
  13. Diana

    Diana Active Member

    Me too.

    My site is not ready for public viewing, but I'll msg you the link so that you can see why location is essential.

Share This Page