![]() |
Countries/States fields as options(over 30 fields)
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: https://vborg.vbsupport.ru/external/2007/12/41.gif 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. |
Nice Job, will install once gold is out.
|
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.
|
Quote:
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 |
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. |
Quote:
|
Thank you for verifying that. I thought they must have changed something. ;)
|
Fixed the typo in your thread title :)
|
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 ;)
|
A good add-on would be language selection on FORUMHOME per language flags ...
|
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 |
Quote:
|
Quote:
|
Quote:
|
this is an awesome hack, more people should work on listing different states/provinces from around the world :)
|
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. |
Quote:
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:
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 |
You can do this without a hack by using custom profiles in vB3. :) Just letting members know.
|
Quote:
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. |
could u please make add an add-on that show flags countries in user profile
NOTE: WHY quick Reply quote can NOT be used? |
Quote:
Otherwise the quick reply don't know which post you are replying to. PS This was written and quoted using the quick reply. |
Will this be available for vb 3.5 also?
|
Quote:
however, if you are interested, i may make something out of it |
Quote:
|
Quote:
I am looking for something similar... did you find a solution for this problem? thanks, witold |
Any idea of something like this but to be able to modify trhe list, I want to use it in ma videogames forum for the brands.
|
could someone port this to 3.6?
|
does this mod work with vb 3.7x :(
|
All times are GMT. The time now is 05:22 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|