News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

CountryFlags

Started by SMFHacks.com Team, August 14, 2006, 01:07:43 PM

Previous topic - Next topic

danialasghar

Quote from: vbgamer45 on June 07, 2011, 06:55:17 AM
It sounds like you are missing a file edit if there was a failure on it install you will have to modify a file add that function

You mean i need to install manually?

vbgamer45

Yeah looks like you are missing this in your Sources/Subs.php

// Nice big array of countries!
function country_flags()
{
$flags = array(
'00' => '',
'af' => 'Afghanistan', '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', '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',
'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, Republic of the', 'cd' => 'Congo, The Democratic Republic of the', 'ck' => 'Cook Islands',
'cr' => 'Costa Rica', 'ci' => 'Côte d\'Ivoire', 'hr' => 'Croatia',
'cu' => 'Cuba', 'cy' => 'Cyprus', 'cz' => 'Czech Republic',
'dk' => 'Denmark', 'dj' => 'Djibouti', 'dm' => 'Dominica',
'do' => 'Dominican Republic', 'ec' => 'Ecuador', 'eg' => 'Egypt',
'sv' => 'El Salvador', 'england' => 'England', 'gq' => 'Equatorial Guinea',
'er' => 'Eritrea',
'ee' => 'Estonia', 'et' => 'Ethiopia', 'fk' => 'Falkland Islands (Islas 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', 'gn' => 'Guinea', 'gw' => 'Guinea-Bissau',
'gy' => 'Guyana', 'ht' => 'Haiti', 'hm' => 'Heard Island and McDonald Islands',
'va' => '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, Republic of', 'il' => 'Israel', 'it' => 'Italy',
'jm' => 'Jamaica', 'jp' => 'Japan', 'jo' => 'Jordan',
'kz' => 'Kazakhstan', 'ke' => 'Kenya', 'ki' => 'Kiribati',
'kp' => 'Korea, Democratic People\'s Republic of', 'kr' => 'Korea, Republic of', 'kw' => 'Kuwait',
'kg' => 'Kyrgyzstan', 'la' => 'Lao People\'s Democratic Republic', 'lv' => 'Latvia',
'lb' => 'Lebanon', 'ls' => 'Lesotho', 'lr' => 'Liberia',
'ly' => 'Libyan Arab Jamahiriya', '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', 'ms' => 'Montserrat', 'ma' => 'Morocco',
'mz' => 'Mozambique', 'mm' => 'Myanmar', 'na' => 'Namibia',
'nr' => 'Nauru', 'np' => 'Nepal', 'nl' => 'Netherlands',
'an' => 'Netherlands Antilles', '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' => 'Palestinian Territory, Occupied', 'pa' => 'Panama',
'pg' => 'Papua New Guinea', 'py' => 'Paraguay', 'pe' => 'Peru',
'ph' => 'Philippines', 'pn' => 'Pitcairn', 'pl' => 'Poland',
'pt' => 'Portugal', 'pr' => 'Puerto Rico', 'qa' => 'Qatar',
're' => 'Reunion', 'ro' => 'Romania', 'ru' => 'Russian Federation',
'rw' => 'Rwanda', 'sh' => 'Saint Helena', 'kn' => 'Saint Kitts and Nevis',
'lc' => 'Saint Lucia', 'pm' => 'Saint Pierre and Miquelon', 'vc' => 'Saint Vincent and the Grenadines',
'ws' => 'Samoa', 'sm' => 'San Marino', 'st' => 'Sao Tome and Principe',
'sa' => 'Saudi Arabia', 'scotland' => 'Scotland', 'sn' => 'Senegal',
'cs' => 'Serbia and Montenegro', 'sc' => 'Seychelles', 'sl' => 'Sierra Leone',
'sg' => 'Singapore', 'sk' => 'Slovakia', 'si' => 'Slovenia',
'sb' => 'Solomon Islands',
'so' => 'Somalia', 'za' => 'South Africa', 'gs' => 'South Georgia and the South Sandwich Islan',
'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', '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',
'vn' => 'Viet Nam', 'vg' => 'Virgin Islands, British', 'vi' => 'Virgin Islands, U.S.', 'wales' => 'Wales',
'wf' => 'Wallis and Futuna', 'wales' => 'Wales', 'eh' => 'Western Sahara',
'ye' => 'Yemen', 'zm' => 'Zambia', 'zw' => 'Zimbabwe',
);
return $flags;
}


Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Jorge D. Fuentes

It seems the package installer is missing something in the load.php file that it's looking for.

I get this error on load.php:
-----------
Code: (Find) [Select]

         mem.birthdate, mem.member_ip, mem.member_ip2, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login,

Code: (Replace) [Select]

         mem.birthdate, mem.member_ip, mem.member_ip2, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login, mem.country_flag,
--------------
I guess it's possible that there's another mod (I've got one that adds the XBLA/PSN items to that same area) that's changing the line, and then when this mod looks for that same line, it doesn't find it.

I also get this error, again for load.php:
-----
Code: (Find) [Select]

         mem.openid_uri, mem.birthdate, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login, mem.karma_good,

Code: (Replace) [Select]

         mem.openid_uri, mem.birthdate, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login, mem.karma_good, mem.country_flag,
-----------------

So yeah, I cannot install this... :(

phill104

After upgrading to SMF2.0 I installed this package (which was working with smf 1.x.x) and now I am not seeing any configuration options in the back end. In Features and Options I only have General, Layout ans Signatures. Any Ideas?

vbgamer45

It should be under Modifications Settings
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Richardgm

I'm having a problem installing this on 2.0.

I had it installed on 1.X, but for some reason when trying to install on 2.0... I'm alerted to the fact that:

"The following files need to made writable to continue installation:
/home
/home/XXXXXX/public_html/forum/Themes/babylon/images/flags"

However, when I input my FTP information an internal error (500) is given for the entire website.

When I contact my hosts, they tell me that the mod set incorrect permissions for the home directory; which in-turn made my website inoperative.

Is there any way around the mod wanting to rewrite permissions?

meko me

very nice mod thank you very much sir.

rica.carv

#908
Portuguese Portugal language update:

<file name="$languagedir/Modifications.portuguese_pt.php">
<operation>
<search position="end" />
<add><![CDATA[
// Country Flag mod
$txt['country_flag_label'] = 'Por favor, seleccione o seu pais';
$txt['country_flag_error_required'] = 'Tem de seleccionar o pais onde se encontra actualmente';
$txt['country_flag_ask'] = 'Permitir selecção da bandeira do pais';
$txt['country_flag_disabled'] = 'Não exibir (Desligado)';
$txt['country_flag_profile'] = 'No Perfil';
$txt['country_flag_registration'] = 'No Registo';
$txt['country_flag_both'] = 'Em ambos';
$txt['country_flag_required'] = 'Obrigar o utilizador a escolher uma localização?';
$txt['country_flag_show'] = 'Exibir bandeira do pais no quadro do utilizador (Onde os tópicos são exibidos).';
$txt['country_flag'] = 'País';
]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Country Flag mod
$txt['country_flag_label'] = 'Por favor, seleccione o seu pais';
$txt['country_flag_error_required'] = 'Tem de seleccionar o pais onde se encontra actualmente';
$txt['country_flag_ask'] = 'Permitir selecção da bandeira do pais';
$txt['country_flag_disabled'] = 'Não exibir (Desligado)';
$txt['country_flag_profile'] = 'No Perfil';
$txt['country_flag_registration'] = 'No Registo';
$txt['country_flag_both'] = 'Em ambos';
$txt['country_flag_required'] = 'Obrigar o utilizador a escolher uma localização?';
$txt['country_flag_show'] = 'Exibir bandeira do pais no quadro do utilizador (Onde os tópicos são exibidos).';
$txt['country_flag'] = 'País';
]]></add>
</operation>
</file>


Insert on file languages.xml from the unzipped installation pack.

Anyway, i have an issue with SMF 2.0. The flags doesn't apear on the profile summary, althought they appear on the topics:
Profile example
Topic example

I'm struggling through the code, and i can't figure out wich is the problem....
I also wanted to do some modifications, for instance, to manage the appearance of the flags on the topic: Flag only, Flag with country text, and enable or disable the "Country:" (on my case, "Pais:") text on the topics....
Also would like to see the flags on the members list....
Can it be donne???
Or can anyone point me on the right directions???

There's also a small bug, that when someone selects no country AFTER had selected a country, it keeps displaying in the threads page, but it displays "Pais: 00"
Anyone got this issue also???

Many thanks

stratocaster

Quote from: sharks on February 02, 2011, 05:53:17 PM
My cpanel error log is full of these errors:

File does not exist: /home/sharks/forum/Themes/default/images/flags/00.png
...
Where to find and how to fix those missing 00.png ... flags??
...

Quote from: rica.carv on July 08, 2011, 05:46:42 AM
...
There's also a small bug, that when someone selects no country AFTER had selected a country, it keeps displaying in the threads page, but it displays "Pais: 00"
Anyone got this issue also???
...

I have the same issue.

/Themes/default/images/flags/00.png  (many of these logs)

Thanks...

rica.carv

#910
Well, the 00.png couldn't exist really, since it's no flag at all for the mod.
I've got to dig on the code, to see if i can came up with anything that overrides the 00.png display....

00.png issue solved...
I've changed the code, so that if the user selected no country, it won't display any flag line at all....

Now, more dig, to see if i can set options for the formating of the country line....

phill104

After updating a forum from 1.x to 2.x we lost all the flag data for exisiting users. I cannot seem to find it in the DB, I think I must be going blind. Where is it so I can restore?

jacbier

Quote from: phill104 on July 19, 2011, 09:42:00 AM
After updating a forum from 1.x to 2.x we lost all the flag data for exisiting users. I cannot seem to find it in the DB, I think I must be going blind. Where is it so I can restore?

Is the directory Flags still intact on the server?

sharks

Hi vbgamer45

I am installing this mod in a fresh SMF forum installation and i'm getting this error:

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

When i scroll further down to see what the problem is:
8.    Execute Modification    ./Themes/babylon/Display.template.php    File not found

I think you should change the "File not found" requirement to "Skipping file" if the babylon theme is not available, as i have purposefully deleted it from my Themes folder. The absence of the Babylon theme should not generate any installation errors. I hope you understand my point.
The problem is that if i insist and continue to install it, it will give me the same error when uninstalling this mod, since i have forcefully installed your mod.
I would like to avoid any confusions in the future, in case i need to uninstall this mod at a later time. So, please fix the package.xml (i suppose that's where the bug should be?) and make it "skipping file" if babylon theme is absent. Thank you! :)

vbgamer45

Good idea but it is save to ignore does not cause any harm
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Branko.

#915
Hi vbgamer45!
Is necessary to make some changes in all install.xml files like:
-after 'mn' => 'Mongolia',   add   'me' => 'Montenegro',
-'cs' => 'Serbia and Montenegro'   change to  'rs' => 'Serbia',
-both flags exists in flags folder
Remark: Serbia and Montenegro country (State Union) no longer exists.

Please insert translation for croatian and serbian :

Croatian
<file name="$languagedir/Modifications.croatian.php">
<operation>
<search position="end" />
<add><![CDATA[
// Country Flag mod
$txt['country_flag_label'] = 'Molimo izaberite vasu drzavu';
$txt['country_flag_error_required'] = 'Morate izabrati drzavu iz koje dolazite';
$txt['country_flag_ask'] = 'Izaberite zastavu';
$txt['country_flag_disabled'] = 'Ne prikazuj (Zabranjeno)';
$txt['country_flag_profile'] = 'Profil';
$txt['country_flag_registration'] = 'Registracija';
$txt['country_flag_both'] = 'Oboje';
$txt['country_flag_required'] = 'Zahtijeva da clan izabere lokaciju?';
$txt['country_flag_show'] = 'Prikazi zastavu na stranici (Gdje je poruka prikazana).';
$txt['country_flag'] = 'Drzava';


Croatian UTF-8

<file name="$languagedir/Modifications.croatian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Country Flag mod
$txt['country_flag_label'] = 'Molimo izaberite vasu drzavu';
$txt['country_flag_error_required'] = 'Morate izabrati drzavu iz koje dolazite';
$txt['country_flag_ask'] = 'Izaberite zastavu';
$txt['country_flag_disabled'] = 'Ne prikazuj (Zabranjeno)';
$txt['country_flag_profile'] = 'Profil';
$txt['country_flag_registration'] = 'Registracija';
$txt['country_flag_both'] = 'Oboje';
$txt['country_flag_required'] = 'Zahtijeva da clan izabere lokaciju?';
$txt['country_flag_show'] = 'Prikazi zastavu na stranici (Gdje je poruka prikazana).';
$txt['country_flag'] = 'Drzava';


Serbian

<file name="$languagedir/Modifications.serbian.php">
<operation>
<search position="end" />
<add><![CDATA[
// Country Flag mod$txt['country_flag_label'] = 'Molimo izaberite vasu drzavu';
$txt['country_flag_error_required'] = 'Morate izabrati drzavu iz koje dolazite';
$txt['country_flag_ask'] = 'Izaberite zastavu';
$txt['country_flag_disabled'] = 'Ne prikazuj (Zabranjeno)';
$txt['country_flag_profile'] = 'Profil';
$txt['country_flag_registration'] = 'Registracija';
$txt['country_flag_both'] = 'Oboje';
$txt['country_flag_required'] = 'Zahteva da clan izabere lokaciju?';
$txt['country_flag_show'] = 'Prikazi zastavu na stranici (Gde je poruka prikazana).';
$txt['country_flag'] = 'Drzava';


Serbian UTF-8

<file name="$languagedir/Modifications.serbian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Country Flag mod$txt['country_flag_label'] = 'Molimo izaberite vasu drzavu';
$txt['country_flag_error_required'] = 'Morate izabrati drzavu iz koje dolazite';
$txt['country_flag_ask'] = 'Izaberite zastavu';
$txt['country_flag_disabled'] = 'Ne prikazuj (Zabranjeno)';
$txt['country_flag_profile'] = 'Profil';
$txt['country_flag_registration'] = 'Registracija';
$txt['country_flag_both'] = 'Oboje';
$txt['country_flag_required'] = 'Zahtijeva da clan izabere lokaciju?';
$txt['country_flag_show'] = 'Prikazi zastavu na stranici (Gdje je poruka prikazana).';
$txt['country_flag'] = 'Drzava';


Best regards,Branko
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Plutuss


On SMF 2 RC 4,

It installed fine without errors or warnings.

But while I can select the flag in the profile, which does indeed show nicely in the post view, it does not show at all in the profile view. The code seems to be in profile.template too.

Any history of this issue?

vbgamer45

Would suggest to upgrade 2.0 final and see if that helps
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Branko.

Quote from: vbgamer45 on July 29, 2011, 12:33:49 PM
Thanks for the translation
You're welcome, vbgamer45  whenever you need it.
Please remember, and changes in xml also.Its very important.

Best regards
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

Advertisement: