Latest Register Log In

+ Advanced Search

Country Flag Icons

Country Flag Icons
By
03/27/09 (Edited 02/14/14)

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.




Description Showing a flag to represent the country a topic is in.
Rating
Views 528 views. Averaging 0 views per day.