Page 1 of 1

Replace names of countries by a flag

Posted: 2005-01-13 14:44:14
by binoyt
I use the template "twink", but what I request can apply for others templates. I would like to replace the names of countries by flags.

It would be necessary to include a code to indicate which flag for which text. I have tested something like that, but I don't have enough of knowledge to do it. Can somebody could do it?

Here, an example of flag, like I would for my site: http://games.clanbase.com/fr.gif

Thank you.

Posted: 2005-01-13 15:43:07
by antp
name your gif files with the value that you put in the catalog (e.g. if english movies have "USA" in the Country field, call this flag USA.gif), then instead of $$ITEM_COUNTRY put <img src="$$ITEM_COUNTRY.gif" alt="$$ITEM_COUNTRY"> for example.

Posted: 2005-01-13 21:36:39
by binoyt
It's a good soluce, thanks. But what can I do for international movies ?

For exemple, I have the data "FR/UK" in the field countries, how can I cut it to replace each part in the code?

Here, I put the modified code, adapted to the template "twink":
<img src="'pics\\pays_'+movie.getAttribute('Country')+'.gif'"/>

Posted: 2005-01-13 22:22:39
by antp
I forgot that twink's template was not plain html or php, but xml
Well, that will not be so simple I think :/