Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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
  #12  
Old 02-13-2004, 08:30 AM
Charlie Argueta's Avatar
Charlie Argueta Charlie Argueta is offline
 
Join Date: Oct 2002
Location: Taiwan
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Quote:
Originally Posted by Dean C
Fixed the typo in your thread title
I liked Mist better.
Reply With Quote
  #14  
Old 02-13-2004, 09:15 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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/
Reply With Quote
  #15  
Old 02-23-2004, 12:45 PM
Charlie Argueta's Avatar
Charlie Argueta Charlie Argueta is offline
 
Join Date: Oct 2002
Location: Taiwan
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mtha
You can set the field as required in field property/
Thanks for the info
Reply With Quote
  #16  
Old 04-02-2004, 02:51 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is an awesome hack, more people should work on listing different states/provinces from around the world
Reply With Quote
  #17  
Old 06-16-2004, 06:14 AM
kolorom kolorom is offline
 
Join Date: Apr 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I so stupid 8( but what file i have to edit register.php? yes i cannot find 'register_customfields', at that file.
includes/functions_profile.php that file is apsent 8(

and in memberlist.php i cannot find
if ($profilefield['type'] == 'input' OR $profilefield['type'] == 'textarea')
{
$bbuserinfo["$profilefieldname"] = '';
eval('$customfields .= "' . fetch_template('register_customfields') . '";');
}

I use 3.0.1 8( can you help me*?
Thanks for all.
Reply With Quote
  #18  
Old 06-16-2004, 07:31 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kolorom
I so stupid 8( but what file i have to edit register.php? yes i cannot find 'register_customfields', at that file.
includes/functions_profile.php that file is apsent 8(

and in memberlist.php i cannot find
if ($profilefield['type'] == 'input' OR $profilefield['type'] == 'textarea')
{
$bbuserinfo["$profilefieldname"] = '';
eval('$customfields .= "' . fetch_template('register_customfields') . '";');
}

I use 3.0.1 8( can you help me*?
Thanks for all.
Sorry, when I did the upgrade, vBulletin.org was down, and I only update over vbulletin.nl

http://www.vbulletin.nl/community/sh...7480#post27480


anyway, I have upgraded the first post to version 2.0, for both country and state mod.

Check the file out, and tell me if you still have difficulty.



Quote:
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
then you will have to have a list of "states/regions/provinces" for many countries ... which is ... not very important to me.

there're many ways to do this, but the easiest way (i think) is to add a javascript, with a redirect function.

check example at http://webreference.com/dev/menus/intro2.html

I dont even use state hack, dont have any list of states for any country other than US, so I dont think it's that useful
Reply With Quote
  #19  
Old 06-16-2004, 10:56 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can do this without a hack by using custom profiles in vB3. Just letting members know.
Reply With Quote
  #20  
Old 06-20-2005, 09:30 AM
criscokid criscokid is offline
 
Join Date: Nov 2003
Location: London, UK
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sabret00the
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
This is exactly what I'm looking for.

But I'd like to take it a step further... so you've got 3 fields - Country, State & City - take the content of those three fields and string them together to populate vbulletin's Location field. Why do I want to do this? That field gets displayed in vBulletings postbit in the forums and in other applications that user vBulletins user database - like PhotoPost and ReviewPost does.
Reply With Quote
  #21  
Old 07-02-2005, 07:26 PM
Borimikan Borimikan is offline
 
Join Date: Apr 2005
Location: Brooklyn, NY
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

could u please make add an add-on that show flags countries in user profile

NOTE: WHY quick Reply quote can NOT be used?
Reply With Quote
Reply

Thread Tools

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 02:52 PM.


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.05395 seconds
  • Memory Usage 2,310KB
  • Queries Executed 25 (?)
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
  • (6)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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