Adriano Faria Posted November 3, 2015 Posted November 3, 2015 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 Simon Woods, Jalal arefen, GriefCode and 1 other 4
mesteele101 Posted November 3, 2015 Posted November 3, 2015 Now if you could integrate Members map, I'd be on this, and a lot of others would be... svit and Adriano Faria 2
Adriano Faria Posted November 3, 2015 Author Posted November 3, 2015 35 minutes ago, mesteele101 said: Now if you could integrate Members map, I'd be on this, and a lot of others would be... Membes Map isn't updated yet to IPS4.
mesteele101 Posted November 3, 2015 Posted November 3, 2015 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. svit 1
PirateCaptain Posted November 3, 2015 Posted November 3, 2015 also waiting for that members map here, hope they will coexist fine when its released
Adriano Faria Posted November 3, 2015 Author Posted November 3, 2015 2 minutes ago, mesteele101 said: Plus the original programmer of Members Map isn't showing any interest in updating, other than saying in the future.
mesteele101 Posted November 3, 2015 Posted November 3, 2015 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. svit 1
Adriano Faria Posted November 3, 2015 Author Posted November 3, 2015 1 minute ago, mesteele101 said: For me, I won't install two separate apps for this one function. and I have absolutely NO interest in do something in a resource that's not mine. Try the other author.
Square Wheels Posted November 3, 2015 Posted November 3, 2015 I like it. Suggestion: for future updates can you give the user the option to turn it off? Adriano Faria 1
Adriano Faria Posted November 3, 2015 Author Posted November 3, 2015 1 minute ago, Square Wheels said: Suggestion: for future updates can you give the user the option to turn it off? I like it. I'll add a new field on Account Settings. Square Wheels 1
Square Wheels Posted November 3, 2015 Posted November 3, 2015 Another suggestion, this came from a member. How about displaying state / province flags? AmericanRev2 1
Adriano Faria Posted November 3, 2015 Author Posted November 3, 2015 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. :)
mesteele101 Posted November 3, 2015 Posted November 3, 2015 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...
Square Wheels Posted November 4, 2015 Posted November 4, 2015 British Indian Ocean doesn't seem to be displaying a flag?
Adriano Faria Posted November 4, 2015 Author Posted November 4, 2015 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 ?
Square Wheels Posted November 4, 2015 Posted November 4, 2015 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.
Adriano Faria Posted November 4, 2015 Author Posted November 4, 2015 Nvm. I'll try to add a language to that country to see if the flag appears on language selector.
Adriano Faria Posted November 4, 2015 Author Posted November 4, 2015 1 hour ago, Square Wheels said: British Indian Ocean doesn't seem to be displaying a flag? Is this the flag ?
Square Wheels Posted November 4, 2015 Posted November 4, 2015 4 minutes ago, Adriano Faria said: Is this the flag ? 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
Adriano Faria Posted November 4, 2015 Author Posted November 4, 2015 1 hour ago, Square Wheels said: British Indian Ocean doesn't seem to be displaying a flag? 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: You can see that this country has the code IO. And this is the flags.css from IPS: 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 );
Square Wheels Posted November 4, 2015 Posted November 4, 2015 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?
Adriano Faria Posted November 4, 2015 Author Posted November 4, 2015 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.
Adriano Faria Posted November 4, 2015 Author Posted November 4, 2015 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.
Square Wheels Posted November 4, 2015 Posted November 4, 2015 I will submit a ticket. My site is currently down, so I will do it later. Thanks
Square Wheels Posted November 5, 2015 Posted November 5, 2015 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
Recommended Posts