User Country Flag User Field v1.00 for PHP-Fusion v7
User Country Flag User Field v1.00 for v7 by HobbyMan | See includedagpl.htmlfor more.
What it does:

A user field which will display the members country flag in their profile.

  • For the flag to be displayed elsewhere, you will need to modify the relevant core file using the code below, see File Modification


Installation:
  1. Upload the user field files as per the file structure in the download.
  2. Go to Admin Panel - User Admin - User Fields
  3. Enable and position User Country.

File Modification:

  1. As there are so many places you may wish to show the members flag, I can't detail each individual case. So, if you wish to do it yourself and you have beginner to intermediate coding skills, follow the steps below.
  2. Open the file you wish to have display the members flag.
  3. Find the code that displays the user name.
  4. Add the following code where you want the flag to display, this code is configured for forums/viewthread.php and may need altering to work in other files. $data may need to be changed to $userdata or $user_data or even some other value depending on the user db query for that particular page.
  5. This code is configured to display the flag floated to the right, you may need to alter it to suit your needs.
CONFIGURATION:
  1. If you wish to reduce the number of countries listed, open includes/user_fields/user_country_include.php and comment out - // - or delete the <option> lines you don't want to display in the dropdown list. See country list below for key to countries.

Misc: The individual country codes used are taken from the Country Code List: ISO 3166-1993, which is internationally recognised. At time of writing there are 244 countries in the list. You can of course use different flag images if the ones supplied don't suit, just make sure the images you use are named to match the country codes.
 

Download/Support: www.phpnuclear.com or www.php-fusion.co.uk Version: 1.00
phpnuclear.com Addons for php-fusion

Notes and Changelog
Notes:

Country List;

AF = Afghanistan
AL = Albania
DZ = Algeria
AS = American Samoa
AD = Andorra
AO = Angola
AI = Anguilla
AQ = Antartica
AG = Antigua & Barbuda
AR = Argentina
AM = Armenia
AW = Aruba
AU = Australia
AT = Austria
AZ = Azerbaijan
AP = Azores
BS = Bahamas
BH = Bahrain
BD = Bangladesh
BB = Barbados
BY = Belarus
BE = Belgium
BZ = Belize
BJ = Benin
BM = Bermuda
BT = Bhutan
BO = Bolivia
BA = Bosnia & Herzegovina
BW = Botswana
BR = Brazil
IO = British Indian Ocean Territories
BN = Brunei
BG = Bulgaria
BF = Burkina Faso
BI = Burundi
KH = Cambodia
CM = Cameroon
CA = Canada
CV = Cape Verde
KY = Cayman Islands
CF = Central African Republic
TD = Chad
CD = Channel Islands
CL = Chile
CN = China
CX = Christmas Island
CS = Cocos Island
CO = Columbia
CC = Cocos (Keeling) Islands
KM = Comoros
CG = Congo
CK = Cook Islands
CR = Costa Rica
CI = Cote D'Ivoire
HR = Croatia
CU = Cuba
CB = Curacao
CY = Cyprus
CZ = Czech Republic
DK = Denmark
DJ = Djibouti
DM = Dominica
DO = Dominican Republic
TM = East Timor
EC = Ecuador
EG = Egypt
SV = El Salvador
GQ = Equatorial Guinea
ER = Eritrea
EE = Estonia
ET = Ethiopia
FK = Falkland Islands
FO = Faroe Islands
FJ = Fiji
FI = Finland
FR = France
GF = French Guiana
PF = French Polynesia
GA = Gabon
GM = Gambia
GE = Georgia
DE = Germany
GH = Ghana
GI = Gibraltar
GR = Greece
GL = Greenland
GD = Grenada
GP = Guadeloupe
GU = Guam
GT = Guatemala
GN = Guinea
GW = Guinea-Bissau
GY = Guyana
HT = Haiti
HM = Heard & McDonald Islands
HN = Honduras
HK = Hong Kong
HU = Hungary
IS = Iceland
IN = India
ID = Indonesia
IR = Iran
IQ = Iraq
IE = Ireland
IL = Israel
IT = Italy
JM = Jamaica
JP = Japan
JO = Jordan
KZ = Kazakhstan
KE = Kenya
KI = Kiribati
KP = Korea North
KR = Korea South
KW = Kuwait
KG = Kyrgyzstan
LA = Laos
LV = Latvia
LB = Lebanon
LS = Lesotho
LR = Liberia
LY = Libya
LI = Liechtenstein
LT = Lithuania
LU = Luxembourg
MO = Macau
MK = Macedonia
MG = Madagascar
MY = Malaysia
MW = Malawi
MV = Maldives
ML = Mali
MT = Malta
MH = Marshall Islands
MQ = Martinique
MR = Mauritania
MU = Mauritius
YT = Mayotte
MX = Mexico
FM = Micronesia
MD = Moldova
MC = Monaco
MN = Mongolia
MS = Montserrat
MA = Morocco
MZ = Mozambique
MM = Myanmar
NA = Nambia
NR = Nauru
NP = Nepal
AN = Netherland Antilles
NL = Netherlands
NV = Nevis
NC = New Caledonia
NZ = New Zealand
NI = Nicaragua
NE = Niger
NG = Nigeria
NU = Niue
NF = Norfolk Island
NO = Norway
MP = Northern Mariana Islands
OM = Oman
PK = Pakistan
PW = Palau Island
PS = Palestine
PA = Panama
PG = Papua New Guinea
PY = Paraguay
PE = Peru
PH = Philippines
PN = Pitcairn Island
PL = Poland
PT = Portugal
PR = Puerto Rico
QA = Qatar
RE = Reunion
RO = Romania
RU = Russia
RW = Rwanda
SH = St Helena
KN = St Kitts-Nevis
LC = St Lucia
PM = St Pierre & Miquelon
VC = St Vincent & Grenadines
WS = Samoa
SM = San Marino
ST = Sao Tome & Principe
SA = Saudi Arabia
SN = Senegal
SC = Seychelles
XS = Serbia
SL = Sierra Leone
SG = Singapore
SK = Slovakia
SI = Slovenia
SB = Solomon Islands
OI = Somalia
ZA = South Africa
GS = South Georgia and the South Sandwich Islands
ES = Spain
LK = Sri Lanka
SD = Sudan
SR = Suriname
SZ = Swaziland
SE = Sweden
CH = Switzerland
SY = Syria
TA = Tahiti
TW = Taiwan
TJ = Tajikistan
TZ = Tanzania
TH = Thailand
TG = Togo
TK = Tokelau
TO = Tonga
TT = Trinidad & Tobago
TN = Tunisia
TR = Turkey
TM = Turkmenistan
TC = Turks & Caicos Is
TV = Tuvalu
UG = Uganda
UA = Ukraine
AE = United Arab Emirates
GB = United Kingdom
US = United States of America
UM = United States Minor Outlying Islands
UY = Uruguay
UZ = Uzbekistan
VU = Vanuatu
VA = Vatican City State
VE = Venezuela
VN = Vietnam
VG = Virgin Islands (Brit)
VI = Virgin Islands (USA)
WF = Wallis & Futana Is
EH = Western Sahara
YE = Yemen
YU = Yugoslavia
ZR = Zaire
ZM = Zambia
ZW = Zimbabwe

 
HTML Valid
Changelog:


v1.00 - First public version