Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Countries/States fields as options(over 30 fields) Details »
Countries/States fields as options(over 30 fields)
Mod Version: 1.00, by mtha (Contributor) mtha is offline
Developer Last Online: May 2016 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 15
Released: 08 Feb 2004 Last Update: Never Downloads: 29
Not Supported  

NOTE: You can do this by adding custom user field/drop down option, as of vB3 allows you to add as many options as you want

Old version of vB custom field only allow you to add 30 fields to their options (for some reason), I re-write this hack, to use with vB3-beta7, then update for vB3.0.1. (dont want to remove it and use vB default dropdown option)

advantage over the default field: you dont have to store the whole country name in database (save some space), use US instead of United States, it is also easier if you want to use this for flag ...


Author: HacNho (mtha)
Version: 2.0
Description:
- Use FIELD2 as Country field
- Add selections for countries in registration (call register_customfields_country template)
- Add selections for countries in edit profile (call register_customfields_country template)
- Add selections for countries in memberlist search (call register_customfields_country template)


File to edit: 3 (register.php, includes/functions_user.php, memberlist.php)
Template to edit: 0
Template to add: 2 (userfield_country and memberlist_search_country)

Version support: vB 3.0.1

UPGRADE: there's too many changes from vB3.0 beta to the final release, so you'd better uninstall the old mod before reinstall this one.
- remove template register_customfields_country
- remove the changes added in register.php, includes/functions_profile.php


OLD Version: 1.0
Description:
- Use FIELD2 in userfield as Country field (this one used to be "Location")
- Add seletions for countries in registration (call register_customfields_country template)
- Add seletions for countries in edit profile (call register_customfields_country template)
- Add seletions for countries in memberlist - Search (call register_customfields_country template)
File to edit: 2
Template to edit: 0
Template to add: 1 (register_customfields_country)
Version support: vB 3.0 b4 - b7

Screen shot: customfields_country.gif (8.9 KB)

Important:
BACKUP modified files and template before making changes.
USE at your own risk!
You may want to check the country lists, as of I got several different lists from internet, and use one of them

Suggestion: you should download and use YaME, to read this file. It will be much easier to understand what you should do.

Credit:
- those who wrote this tools BoardMod and YaME
- those who make the countries list, so I just need to re-edit them

Additional mod: customfield_state
NOTE:
- you can only use one of the two mod. If you want to use both of them, you have to change field# in one of them (as of I am using the same field# (field2) in both two mods.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	customfields_country.gif
Views:	1447
Size:	8.9 KB
ID:	16624  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 08 Feb 2004, 22:45
Gio Takahashi's Avatar
Gio Takahashi Gio Takahashi is offline
 
Join Date: Jul 2003
Location: Cape Coral
Real name: Don K
Nice Job, will install once gold is out.
Reply With Quote
  #3  
Old 08 Feb 2004, 22:50
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
They must have changed something then because I have the whole countries list in a profile field and it accepts them all. It doesn't limit it to 30 anywhere that I can see. I am running 3.0 RC 3, by the way.
Reply With Quote
  #4  
Old 08 Feb 2004, 23:04
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Real name: Ha Mai
Originally Posted by Boofo
They must have changed something then because I have the whole countries list in a profile field and it accepts them all. It doesn't limit it to 30 anywhere that I can see. I am running 3.0 RC 3, by the way.
hehe, yeah, nevermind about my hack then.


but I dont really like the way they store arrays in database very much, and my hack give me flexibility to store different data into database, says if I want to store United States, I just need to keep US in the profile. It might be easier for me to use in adding flags, or mapping members in a worldmap
__________________
Selected Hacks:
[APM] Advanced Product Management [for vb4][for vb3.6] [for 3.7.x/3.8.x] -- [YAAS] Yet Another Awards System [for vB 3.5] [for vB 3.0] -- [YAPMS] Yet Another Private Message System 1.0.1

Last edited by mtha; 08 Feb 2004 at 23:08.
Reply With Quote
  #5  
Old 08 Feb 2004, 23:13
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
I think your hack is great!

I just changed Location to City and State/Province and made a new field for Country and put all the countries from the list in the drop-down in the field editor. It is in the profile options. I don't have it in the new registration area but I have other fields that don't show up there either, so the user will have to go into their profile and edit them when they get regsitered.
Reply With Quote
  #6  
Old 08 Feb 2004, 23:30
NTLDR's Avatar
NTLDR NTLDR is offline
 
Join Date: Apr 2002
Real name: Lee Botley, BSc (Hons)
Originally Posted by Boofo
They must have changed something then because I have the whole countries list in a profile field and it accepts them all. It doesn't limit it to 30 anywhere that I can see. I am running 3.0 RC 3, by the way.
The limit of 30 was removed in one of the RC's.
__________________
Lee Botley, BSc (Hons) - vBulletin.org Moderator
http://www.thesistersthree.com/lee/sigs/signature.ts3
The Sisters Three Charmed Discussion Forums

WinterDir .:. vBindex v2.1 for vB2 .:. vBindex v3.0.0 RC5 for vB3
Reply With Quote
  #7  
Old 08 Feb 2004, 23:31
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Thank you for verifying that. I thought they must have changed something.
Reply With Quote
  #8  
Old 09 Feb 2004, 09:54
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Real name: Dean Clatworthy
Fixed the typo in your thread title
__________________
Dean Clatworthy - Web Developer/Designer
Reply With Quote
  #9  
Old 09 Feb 2004, 13:14
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Real name: sabe
looks great i need to investigate properly as i was looking for one that would drop down on location, you'd select your country then it would open another drop down to select state/region/province then it would do another for city and then a final input box for you to type a more specific location, if this does this yay, if not i'll have to hope i inspired you
__________________
UNDER CONSTRUCTION: Confessionary Hack

Make me a Hack of The Month author: GRPS: Groups Commune
make my hacks, they'll make you famous

unless it's a security concern, please do not pm/im me for support unless you're willing to pay.
Reply With Quote
  #10  
Old 09 Feb 2004, 17:57
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Real name: Marco
A good add-on would be language selection on FORUMHOME per language flags ...
Reply With Quote
  #11  
Old 13 Feb 2004, 10:30
Charlie Argueta's Avatar
Charlie Argueta Charlie Argueta is offline
 
Join Date: Oct 2002
Real name: Charlie Argueta
Is it possible to make this field as a required field?, I would like that my users select their real countries insted of "At my home", "Asumed to be earth", etc.

See Ya
Reply With Quote
  #12  
Old 13 Feb 2004, 10:32
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Originally Posted by Dean C
Fixed the typo in your thread title
I liked Mist better.
Reply With Quote
  #13  
Old 13 Feb 2004, 11:15
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Real name: Ha Mai
Originally Posted by Charlie Argueta
Is it possible to make this field as a required field?, I would like that my users select their real countries insted of "At my home", "Asumed to be earth", etc.

See Ya
You can set the field as required in field property/
__________________
Selected Hacks:
[APM] Advanced Product Management [for vb4][for vb3.6] [for 3.7.x/3.8.x] -- [YAAS] Yet Another Awards System [for vB 3.5] [for vB 3.0] -- [YAPMS] Yet Another Private Message System 1.0.1
Reply With Quote
  #14  
Old 23 Feb 2004, 14:45
Charlie Argueta's Avatar
Charlie Argueta Charlie Argueta is offline
 
Join Date: Oct 2002
Real name: Charlie Argueta
Originally Posted by mtha
You can set the field as required in field property/
Thanks for the info
Reply With Quote
  #15  
Old 02 Apr 2004, 16:51
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Real name: sabe
this is an awesome hack, more people should work on listing different states/provinces from around the world
__________________
UNDER CONSTRUCTION: Confessionary Hack

Make me a Hack of The Month author: GRPS: Groups Commune
make my hacks, they'll make you famous

unless it's a security concern, please do not pm/im me for support unless you're willing to pay.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 00:25.

Layout Options | Width: Wide Color: