Resource icon

xF1 Unmaintained Country Custom Field Made Easy 1.0

No permission to download
What is this?
Just a simple little modification for those of us who want our users to be able to select what country they are from. This tutorial will save you a fair bit of time when setting it up.

field-screenshot-jpg.20047


*Note: The country list WILL NOT be maintained and this IS NOT SUPPORTED in any way, shape or form. This is simply a tutorial to make adding countries easier.

The Setup Process
The setup process is pretty straight forward, but make sure you have access to FTP and phpMyAdmin before you get started.
  • Step 1: Setting Up the Flag Sprites
    • Download the attached file "flag-sprites.zip" and upload the "styles" directory into your root XenForo directory.
    • Login to the Admin CP and within the admin search find "Extra.css". Paste the contents of flags.css into that template and save.
  • Step 2: Setting Up the Custom Field
    • Login to the Admin CP and head to "Custom Fields" under the "User" tab.
    • Click on "Create New Field" and enter the following information in.
    • Under "Basic Information" add the following:
      Field ID: country
      Title: Country
      Description: *Anything you want*
      Display Location: Personal Details
      Display Order: 100
      Field Type: Drop Down Selection
    • Under "Options for Choice Fields" add the following:
      Value: test
      Text: Test
    • Under "General Options" do the following:
      Check off any options you want to set for this field.

      In Value Display, add the following:
Code:
[/INDENT]
[INDENT=2]<img src="/styles/default/xenforo/clear.png" class="flag flag-{$choice}" alt="{$value}" /> {$value}[/INDENT]
[INDENT=2]
    • Save this field.
  • Step 3: Import the Countries via phpMyAdmin
    • Login to phpMyAdmin and find your XenForo database.
    • Insert the SQL code attached in "countries.txt" and run.
    • Check your Country Field to see if the countries have been successfully added.
    • Remove the "Test" option if it is still there.
  • Step 4: Enjoy! Let me know of your success.
Author
AnimeHaxor
Size
79.9 KB
Extension
zip
Downloads
2
Views
1,920
First release
Last update

More resources from AnimeHaxor

Similar resources

Shows member's country flag based on their IP Address
Semprot Deny Country AnimeHaxor
Deny users from some countries from registering / posting threads.
Allows the moderators to moderate user titles for configurable usergroups
A robust and powerful system to provide custom bb-codes for your forums.
Custom BB Codes AnimeHaxor
A selection of custom BB Codes for use with the BB Code Manager.
731Threads
2,285Messages
63,704Members
studioidLatest member
Back