Jump to content

Member's Country


Recommended Posts

Posted

About This File

This plugin will display the country flag of user in several places of the entire suite, including third-party resources. It uses the Geolocation to grab the country when a new user register an account or when existing users logs in on your board. Clicking on the flag will give you a list of all users from that country.

Usage:

  • New members: new members will have their country detected when they register the account
  • Existing members: Just log out and log in to update the country. Or, if allowed by the admin, go to Account Settings and pick your country.

Settings:

  • Display country flag everywhere: will display the country flag in several places from official apps like on Forums, Gallery, Blogs, Pages, Gallery, Downloads, including its widgets and third-party resources. If disabled, will display the country name + flag only on user profile.
  • Groups allowed to change the country: users from selected groups will be able to change their country on Account Settings. Sometimes Geolocation picks an wrong country, so the user will be able to fix it.

Compatibility:

  • IPS Community Suite 4.1.X
  • IPS Community Suite 4.0.X

 

 

Posted
2 hours ago, Adriano Faria said:

Membes Map isn't updated yet to IPS4.

I'm saying you need to integrate both tools so they are working together. When a user registers they need to be automatically added to the members map. It all needs to work together. Your Members Country automatically detects the country where a user is registering from, and Members Map does not. The current members map is a user specified option to be added. Both apps need to be working together and this might mean you may need to start from scratch to give end users that function. Plus the original programmer of Members Map isn't showing any interest in updating, other than saying in the future.

Posted
32 minutes ago, Adriano Faria said:

Well, ok. However I just don't see how these to will work seamlessly without bringing the two together. Maybe he needs to be adding a function in that the Members Country function does?

For me, I won't install two separate apps for this one function.

Posted
1 minute ago, Square Wheels said:

Another suggestion, this came from a member.  How about displaying state / province flags?

Kinda too much display it for all countries in the world. Country is fine for now. :)

Posted
1 hour ago, Adriano Faria said:

and I have absolutely NO interest in do something in a resource that's not mine. Try the other author.

I had no idea innovation was dead, unless someone else resource could be stolen...

Posted
Just now, Square Wheels said:

British Indian Ocean doesn't seem to be displaying a flag?

It uses everything from the core (flags and geolocation). Can you reproduce this somewhere on core, like languages selector ?

Posted
7 minutes ago, Adriano Faria said:

It uses everything from the core (flags and geolocation). Can you reproduce this somewhere on core, like languages selector ?

Sorry, I'm not sure what you need me to try.  This was from a post in the forum.  Anywhere I see this particular user there is a blank next to their name.

Posted
4 minutes ago, Adriano Faria said:

Is this the flag ?

Capturar.png

I guess there's no way for me to know.  I see a space beside that users name and when I put my mouse over it I get the pop-up for British Indian Ocean.  Possibly something didn't finish when I installed it?  Maybe it will be fixed when I install the new version that allows users to turn it off? :)

Also, how do I add flags / countries to users?  I have a few bots (Invite Bot for instance) that I'd like to add a country to.

Thanks

Posted
1 hour ago, Square Wheels said:

British Indian Ocean doesn't seem to be displaying a flag?

io.fw.png.17e820ef7cc2f286c6d0c88c783b7b

Is this the flag ?

EDIT: I don't think so: https://en.wikipedia.org/wiki/Flag_of_the_British_Indian_Ocean_Territory

Well, here how it works:

=> The select of the countries:

Capturar1.thumb.PNG.b8721cc17d84186a4080

You can see that this country has the code IO.

And this is the flags.css from IPS:

Capturar.thumb.PNG.62904a98a828e09386936

As you can see, there's no:

.ipsFlag.ipsFlag-io{background-position:0 -1824px;}

And this is why there's no flag for this country. If you add this language on your board, you also won't the flag on language selector.

3 minutes ago, Square Wheels said:

Possibly something didn't finish when I installed it?  Maybe it will be fixed when I install the new version that allows users to turn it off?

Not sure what you mean.

3 minutes ago, Square Wheels said:

Also, how do I add flags / countries to users?  I have a few bots (Invite Bot for instance) that I'd like to add a country to.

You don't add flags or countries. They are hardcoded and come from system\GeoLocation\GeoLocation.php:

	/**
	 * @brief	Country Code List
	 */
	public static $countries = array(
		'AF', // Afghanistan
		'AX', // Åland Islands
		'AL', // Albania
		'DZ', // Algeria
		'AS', // American Samoa
		'AD', // Andorra
		'AO', // Angola
		'AI', // Anguilla
		'AQ', // Antarctica
		'AG', // Antigua and Barbuda
		'AR', // Argentina
		'AM', // Armenia
		'AW', // Aruba
		'AU', // Australia
		'AT', // Austria
		'AZ', // Azerbaijan
		'BS', // Bahamas
		'BH', // Bahrain
		'BD', // Bangladesh
		'BB', // Barbados
		'BY', // Belarus
		'BE', // Belgium
		'BZ', // Belize
		'BJ', // Benin
		'BM', // Bermuda
		'BT', // Bhutan
		'BO', // Bolivia, Plurinational State Of
		'BA', // Bosnia and Herzegovina
		'BW', // Botswana
		'BV', // Bouvet Island
		'BR', // Brazil
		'IO', // British Indian Ocean Territory
		'BN', // Brunei Darussalam
		'BG', // Bulgaria
		'BF', // Burkina Faso
		'BI', // Burundi
		'KH', // Cambodia
		'CM', // Cameroon
		'CA', // Canada
		'CV', // Cape Verde
		'BQ', // Caribbean Netherlands
		'KY', // Cayman Islands
		'CF', // Central African Republic
		'TD', // Chad
		'CL', // Chile
		'CN', // China
		'CX', // Christmas Island
		'CC', // Cocos (Keeling) Islands
		'CO', // Colombia
		'KM', // Comoros
		'CG', // Congo
		'CD', // Congo, The Democratic Republic Of The
		'CK', // Cook Islands
		'CR', // Costa Rica
		'CI', // Côte d’Ivoire
		'HR', // Croatia
		'CU', // Cuba
		'CW', // Curaçao
		'CY', // Cyprus
		'CZ', // Czech Republic
		'DK', // Denmark
		'DJ', // Djibouti
		'DM', // Dominica
		'DO', // Dominican Republic
		'EC', // Ecuador
		'EG', // Egypt
		'SV', // El Salvador
		'GQ', // Equatorial Guinea
		'ER', // Eritrea
		'EE', // Estonia
		'ET', // Ethiopia
		'FK', // Falkland Islands (Malvinas)
		'FO', // Faroe Islands
		'FJ', // Fiji
		'FI', // Finland
		'FR', // France
		'GF', // French Guiana
		'PF', // French Polynesia
		'TF', // French Southern Territories
		'GA', // Gabon
		'GM', // Gambia
		'GE', // Georgia
		'DE', // Germany
		'GH', // Ghana
		'GI', // Gibraltar
		'GR', // Greece
		'GL', // Greenland
		'GD', // Grenada
		'GP', // Guadeloupe
		'GU', // Guam
		'GT', // Guatemala
		'GG', // Guernsey
		'GN', // Guinea
		'GW', // Guinea-Bissau
		'GY', // Guyana
		'HT', // Haiti
		'HM', // Heard Island and McDonald Islands
		'VA', // Holy See (Vatican City State)
		'HN', // Honduras
		'HK', // Hong Kong
		'HU', // Hungary
		'IS', // Iceland
		'IN', // India
		'ID', // Indonesia
		'IR', // Iran, Islamic Republic Of
		'IQ', // Iraq
		'IE', // Ireland
		'IM', // Isle Of Man
		'IL', // Israel
		'IT', // Italy
		'JM', // Jamaica
		'JP', // Japan
		'JE', // Jersey
		'JO', // Jordan
		'KZ', // Kazakhstan
		'KE', // Kenya
		'KI', // Kiribati
		'KP', // Korea, Democratic People's Republic Of
		'KR', // Korea, Republic Of
		'KW', // Kuwait
		'KG', // Kyrgyzstan
		'LA', // Laos People's Democratic Republic
		'LV', // Latvia
		'LB', // Lebanon
		'LS', // Lesotho
		'LR', // Liberia
		'LY', // Libya
		'LI', // Liechtenstein
		'LT', // Lithuania
		'LU', // Luxembourg
		'MO', // Macao
		'MK', // Macedonia, The Former Yugoslav Republic Of
		'MG', // Madagascar
		'MW', // Malawi
		'MY', // Malaysia
		'MV', // Maldives
		'ML', // Mali
		'MT', // Malta
		'MH', // Marshall Islands
		'MQ', // Martinique
		'MR', // Mauritania
		'MU', // Mauritius
		'YT', // Mayotte
		'MX', // Mexico
		'FM', // Micronesia, Federated States Of
		'MD', // Moldova, Republic Of
		'MC', // Monaco
		'MN', // Mongolia
		'ME', // Montenegro
		'MS', // Montserrat
		'MA', // Morocco
		'MZ', // Mozambique
		'MM', // Myanmar
		'NA', // Namibia
		'NR', // Nauru
		'NP', // Nepal
		'NL', // Netherlands
		'NC', // New Caledonia
		'NZ', // New Zealand
		'NI', // Nicaragua
		'NE', // Niger
		'NG', // Nigeria
		'NU', // Niue
		'NF', // Norfolk Island
		'MP', // Northern Mariana Islands
		'NO', // Norway
		'OM', // Oman
		'PK', // Pakistan
		'PW', // Palau
		'PS', // Palestine, State of
		'PA', // Panama
		'PG', // Papua New Guinea
		'PY', // Paraguay
		'PE', // Peru
		'PH', // Philippines
		'PN', // Pitcairn
		'PL', // Poland
		'PT', // Portugal
		'PR', // Puerto Rico
		'QA', // Qatar
		'RE', // Réunion
		'RO', // Romania
		'RU', // Russian Federation
		'RW', // Rwanda
		'BL', // Saint Barthélemy
		'SH', // Saint Helena, Ascension and Tristan da Cunha
		'KN', // Saint Kitts and Nevis
		'LC', // Saint Lucia
		'MF', // Saint Martin
		'PM', // Saint Pierre and Miquelon
		'VC', // Saint Vincent and The Grenadines
		'WS', // Samoa
		'SM', // San Marino
		'ST', // Sao Tome and Principe
		'SA', // Saudi Arabia
		'SN', // Senegal
		'RS', // Serbia
		'SC', // Seychelles
		'SL', // Sierra Leone
		'SG', // Singapore
		'SX', // Sint Maarten
		'SK', // Slovakia
		'SI', // Slovenia
		'SB', // Solomon Islands
		'SO', // Somalia
		'ZA', // South Africa
		'GS', // South Georgia and The South Sandwich Islands
		'SS', // South Sudan
		'ES', // Spain
		'LK', // Sri Lanka
		'SD', // Sudan
		'SR', // Suriname
		'SJ', // Svalbard and Jan Mayen
		'SZ', // Swaziland
		'SE', // Sweden
		'CH', // Switzerland
		'SY', // Syrian Arab Republic
		'TW', // Taiwan, Province Of China
		'TJ', // Tajikistan
		'TZ', // Tanzania, United Republic Of
		'TH', // Thailand
		'TL', // Timor-Leste
		'TG', // Togo
		'TK', // Tokelau
		'TO', // Tonga
		'TT', // Trinidad and Tobago
		'TN', // Tunisia
		'TR', // Turkey
		'TM', // Turkmenistan
		'TC', // Turks and Caicos Islands
		'TV', // Tuvalu
		'UG', // Uganda
		'UA', // Ukraine
		'AE', // United Arab Emirates
		'GB', // United Kingdom
		'US', // United States
		'UM', // United States Minor Outlying Islands
		'UY', // Uruguay
		'UZ', // Uzbekistan
		'VU', // Vanuatu
		'VE', // Venezuela, Bolivarian Republic Of
		'VN', // Vietnam
		'VG', // Virgin Islands, British
		'VI', // Virgin Islands, U.S.
		'WF', // Wallis and Futuna
		'EH', // Western Sahara
		'YE', // Yemen
		'ZM', // Zambia
		'ZW', // Zimbabwe
	);

 

Posted
11 minutes ago, Adriano Faria said:

As you can see, there's no:


.ipsFlag.ipsFlag-io{background-position:0 -1824px;}

And this is why there's no flag for this country. If you add this language on your board, you also won't the flag on language selector.

 

You don't add flags or countries. They are hardcoded and come from system\GeoLocation\GeoLocation.php:

 

So, what you're saying (I think) is this needs to be addressed by IPS?

Posted

As I said, everything comes from the core. Of course, if you say that a flag doesn't appear on a resource, they will say that "it's not their problem".

So you should ask why some countries are missing on flags.css, since they're available on GeoLocation.php.

Posted

As I said, everything comes from the core. Of course, if you say that a flag doesn't appear on a resource, they will say that "it's not their problem".

So you should ask why some countries are missing on flags.css, since they're available on GeoLocation.php.

Posted
On 11/3/2015, 1:34:53, Adriano Faria said:

I like it. I'll add a new field on Account Settings.

Any thoughts on when you'll have time for this?

Also, is there a way to remove your flag?  I see you can edit it on your own, but how do you remove it?

Thanks

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...