1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Mandatory Location

Discussion in 'Add-on Releases [Archive]' started by ceribik, Jan 16, 2012.

Thread Status:
Not open for further replies.
  1. ceribik

    ceribik Active Member

    This thread is no longer in use. For up to date downloads and support, go here:

    This addon simply makes it a requirement for new users to enter a location during registration.

    Made as requested from: http://xenforo.com/community/threads/make-location-a-required-field-during-registration.13958/

    XenForo 1.1


    1. Upload the folder "MandatoryLocation" contained in the zip file to your XenForo/library directory.

    2. Install the addon as usual.

    3. Do only one of the following:
    3a. Add the following code to the template "register_form":
    <xen:include template="MandatoryLocation_Register_Location" />
    3b. Enable the experimental automatic template edit in admin options -> Mandatory Location

    4. If you have a non-English forum, you can edit the text used in the admin options.

    Want to support future development and other mods? Feel free to make a donation:



    The latest download is: Mandatory Location_v1.1.1.zip

    Attached Files:

    optrex, Mark3121 and Garamond like this.
  2. ceribik

    ceribik Active Member

    Change Log:

    1.1.1 - 2012/01/21
    -fixed issue with manual template not showing correct phrase/option

    1.1 - 2012/01/17
    -added admin options (to control phrases, automatic template edit, etc)
    -added an experimental on-the-fly template edit option
    -added criteria: "User has no location set"

    1.0 - 2012/01/16
    -initial release

    Upgrade Instructions:
    1.0 -> 1.1
    1. Upload new MandatoryLocation folder
    2. Update addon via .xml file
    3. If using the automatic template edit (experimental), revert the template 'register_form' to the default (or remove the previous edit - see OP).
    4. If you edited the phrases for a non-English board, you will have to redo this in the admin options.
  3. giorgino

    giorgino Well-Known Member

    Now some suggestions to improve your simple but great add-on :)

    • Include the template edits
    • Put the phrases management in options in ACP
    • Make the field more configurable (make a popup locations list for instance)
  4. optrex

    optrex Active Member

    at last, thank you
    does this make use of the current location field in XF or does it use a new custom field?
    Is there any intention to expand this to add the location to the postbit ?
  5. ceribik

    ceribik Active Member

    What do you exactly mean by this? Make it so it hooks into the template (i.e. require no template edits)? As far as I could tell, it's not possible with this template. If it is, let me know. Considering 'register_form' will rarely be updated (in fact, I'd be surprised if it was ever updated again), when upgrading to newer versions of Xenforo, you won't have to worry about any outdated template warnings.

    Sure, I'll add this to the next version.

    Wouldn't that be kind of limiting considering there's practically an infinite amount of possible locations?

    It does use the original location field. It's not a new custom field.

    I could probably add that as an option in the next version.
  6. giorgino

    giorgino Well-Known Member

    Yes, exactly :)

    No, I mean the possibility to configure the "type" field (text or popup) for present to users a list of locations to choose (definable by add-on options)
    Veer likes this.
  7. ceribik

    ceribik Active Member

    I'll look into both.
    giorgino likes this.
  8. giorgino

    giorgino Well-Known Member

    I've donated an amount, but I'll donate again on new release of the add-on :)
    ceribik and wickedstangs like this.
  9. Garamond

    Garamond Well-Known Member

    Finally! This has been one of the most wanted 'features' in XenForo, at least for me.

    Now, I would like this add-on to also place a notice for all members that doesn't have location filled in. A message that will not go away until they have entered the required information.
    wickedstangs and giorgino like this.
  10. wickedstangs

    wickedstangs Well-Known Member

  11. optrex

    optrex Active Member

    Sweet. I'll try it as soon as the template edits become part of the install
    Any feedback from those who have installed already?
  12. Garamond

    Garamond Well-Known Member

    Works as intended :)
    optrex likes this.
  13. ceribik

    ceribik Active Member

    I'll see if I can add a criteria for users with the location field blank. That way, you'd be able to make notices (as well as other stuff) to your liking.
    giorgino and Garamond like this.
  14. optrex

    optrex Active Member

    that would be most excellent. A little tick box under User Profile and Options: for "user has no location" would be perfect
    Garamond likes this.
  15. ceribik

    ceribik Active Member

    What's coming in the next version:
    • Admin options to control phrases and other options
    • Ability to do the template edit on-the-fly (experimental, is optional and not recommended)
    • Criteria for users with no location set (for use in notices, etc)
    Garamond and giorgino like this.
  16. ceribik

    ceribik Active Member

    Version 1.1 released. See second post for changelog and upgrade instructions.
    Garamond likes this.
  17. Garamond

    Garamond Well-Known Member

    It seems you forgot the .xml installation file in the new zip.
  18. Garamond

    Garamond Well-Known Member

    Donation sent :)
    ceribik likes this.
  19. ceribik

    ceribik Active Member

    Woops! Probably happened when I reuploaded it. It's fixed now :)

    Thanks :D
  20. Garamond

    Garamond Well-Known Member

    Happy to help out coders who makes great add-ons. Ps. better yet, 'Like' it ;)
    ceribik likes this.
Thread Status:
Not open for further replies.

Share This Page