< Back to Other

Country Flag Icons

Suppose you want a flag icon to mark which country a topic is in. WSN already includes a set of national flags in templates/images_default/flags, and template variables to use them. Here's the template variables you can use (in any applicable spot in your templates at Admin -> Themes -> Manage Templates, such as the topic bit or topic details templates):

{LINKNATIONALFLAG} - Shows flag based on the country selected in the topic address.
{LINKNATIONALFLAG[ip]} - Shows flag based on the submitter IP address.
{MEMBERNATIONALFLAG} - Shows flag based on the registration IP address.
{COMMENTTNATIONALFLAG} - Shows flag based on the submitter IP address.
{CATNATIONALFLAG} - Shows flag based on the submitter IP address.

These template variables will produce complete images which you can style using .countryflags. If you want just the image URL and not the full img tag so that you can customize the img tag, use NATIONALFLAGURL in place of NATIONALFLAG.