Country Flag Icons
Country Flag Icons
By Paul
Mar 27, 2009 (Edited Feb 14, 2014)
Suppose you want a flag icon to mark which country a listing 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 listing bit or listing details templates):
{LINKNATIONALFLAG} - Shows flag based on the country selected in the listing 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.
By Paul
Mar 27, 2009 (Edited Feb 14, 2014)
{LINKNATIONALFLAG} - Shows flag based on the country selected in the listing 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 listing is in. |
Rating | |
Views | 536 views. Averaging 0 views per day. |
Similar Listings |