|
|
Forum moderator: bigblog |
uCoz Community For Webmasters Custom Solutions CountryCodes and Flags |
CountryCodes and Flags |
I am able to get just a few country flags to show @ the forum.
However, the Ucoz $COUNTRY$ codes country ID (there are 3 $POST_COUNTRY$ etc.) are different than the standard ISO 3166 Country Flag code names. example: ucoz lists 'Germany' in the country code instead of de ... so if I rename the gif from 'de.gif' to Germany.gif, it works fine. The problem is that other countries like U.S. is listed as 'United States' with the Ucoz code... I cannot rename from us.gif to United States.gif because file manager will make it United_States ... that dividing line in between is different than how the system has it so it doesn't show up. This happens with all countries that have 2 seperate words to their names. Also would be quite a task to have to manually rename all country flags I saw some threads in search referring to country flags here but it looks like they no longer exist. Is there a specific set of flags that are named to match ucoz ? - Ucoz Website Since 2009
|
Sunny,
This is what I have in Appearance of Entries (Forum) <?if($POST_COUNTRY_ID$)?>$COUNTRY_ID$<?endif?><img src="http://audioforum.my1.ru/FLAGS/$POST_COUNTRY$.gif"/> The code works: Germany shows since I had to rename from the standard 'de.png' to 'Germany.png'...the country code system here doesn't recognize 'de'. the us.png flag doesn't show up since the system is looking for 'United States.png' instead of the standard 'us.png' for the flag. I can't rename the flag United States 'cause it has a 'space' between the 2 words... so if I rename to United_States it doesn't recognize it. right clicking on link @ users post, shows that it is looking for an image named United States.png Ucoz Website Since 2009
|
Clyde, the following code works fine:
<?if($POST_COUNTRY_ID$)?><img src="http://yoursite/flags/$POST_COUNTRY_ID$.gif"/><?endif?> $POST_COUNTRY_ID$ outputs two-letter country codes, like US for the United States, therefore there are no problems with the spaces. Just note that country codes are capitalized, therefore name the images US.gif etc. I'm not active on the forum anymore. Please contact other forum staff.
|
Sunny, Worked ! Thanks Much Sunny !
Added (2014-07-22, 10:45 AM) Ucoz Website Since 2009
|
Clyde, you could do something like this:
Code <?if($POST_COUNTRY_ID$="US" or $POST_COUNTRY_ID$="DE" or $POST_COUNTRY_ID$="UK")?>link to the first folder<?else?>link to the second folder<?endif?> Of course you will have to list all countries of the corresponding folder. Or you can try to find a third-party script that will display flags. I'm not active on the forum anymore. Please contact other forum staff.
|
Sunny,
Ok, will try that - For now been sacrificing 'not so popular country names' and changing them to the active folder... ...also was thinking I have an "if not" command for avatars that if user has none, add this - might work in this situation... Will play with it. Either way this is resolveable - Thanks for the suggestion Sunny ! Ucoz Website Since 2009
Post edited by Clyde - Thursday, 2014-07-24, 4:52 PM
|
| |||
| |||