[Piwik-trac] [Piwik] #254: Link to country flags does not work correctly when embedding Piwik in PHP site
Piwik
trac at piwik.org
Fri Jun 13 14:54:54 CEST 2008
#254: Link to country flags does not work correctly when embedding Piwik in PHP
site
--------------------+-------------------------------------------------------
Reporter: meglio | Type: Bug
Status: new | Priority: major
Milestone: | Component: Plugins
Version: | Keywords: flag flags country countries
--------------------+-------------------------------------------------------
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
--
Ticket URL: <http://dev.piwik.org/trac/ticket/254>
Piwik <http://piwik.org>
Piwik, open source web analytics software
More information about the Piwik-trac
mailing list