I have embedded Piwik to my PHP site and I'm calling Piwik from PHP code directly.
In the code Piwik checks whether file exists:
function Piwik_getFlagFromCode($code)
{
$path = 'plugins/UserCountry/flags/%s.png';
$normalPath = sprintf($path,$code);
// flags not in the package !
if(!file_exists($normalPath))
{
return sprintf($path, 'xx');
}
return $normalPath;
}
The PHP file where I'm calling Piwik locates in different folder. Really flag file exists but this function can't locate it and returns 'xx' value.
I have solved this problem just by commenting IF section. But you have to invent something to make it more intelligent.
Thanks,
Anton Andriyevskyy