summaryrefslogtreecommitdiff
path: root/smartyplugins/modifier.countryflag.php
blob: 7e190918ef49d1a60350c4dc079a0c1d2e5ad10e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
namespace Bitweaver\Plugins;

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */

/**
 * Smarty plugin
 * -------------------------------------------------------------
 * Type:     modifier
 * Name:     countryflag
 * Purpose:  get countryflag for a given user
 * -------------------------------------------------------------
 */
function smarty_modifier_countryflag($user)
{
  global $gBitSystem;
  $flag = $gBitSystem->getConfig('users_country','Other',$user);
  return "<img alt='flag' src='".IMG_PKG_URL."flags/".$flag.".gif' />";
}