Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Countries/States fields as options(over 30 fields) Details »»
Countries/States fields as options(over 30 fields)
Version: 1.00, by mtha mtha is offline
Developer Last Online: May 2016 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 02-07-2004 Last Update: Never Installs: 15
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-08-2004, 08:45 PM
Gio Takahashi's Avatar
Gio Takahashi Gio Takahashi is offline
 
Join Date: Jul 2003
Location: Cape Coral
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Job, will install once gold is out.
Reply With Quote
  #3  
Old 02-08-2004, 08:50 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 02-08-2004, 09:04 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
Reply With Quote
  #5  
Old 02-08-2004, 09:13 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 02-08-2004, 09:30 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #7  
Old 02-08-2004, 09:31 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for verifying that. I thought they must have changed something.
Reply With Quote
  #8  
Old 02-09-2004, 07:54 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fixed the typo in your thread title
Reply With Quote
  #9  
Old 02-09-2004, 11:14 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 02-09-2004, 03:57 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A good add-on would be language selection on FORUMHOME per language flags ...
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 09:28 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04492 seconds
  • Memory Usage 2,290KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete