This should be in development not general support.
You must hook to "build_friendly_wol_location_end" and then your function must be similar to this one:
function meteo_online(&$plugin_array)
{
if (preg_match('/meteo\.php/',$plugin_array['user_activity']['location']))
{
$plugin_array['location_name'] = "Viewing <a href=\"meteo.php\">Meteo</a>";
}
return $plugin_array;
}
Do you mean that i need to make a plugin for That ??
Yes that is correct, otherwise the function wouldn't get executed.
It doesn't require a huge amount of code, download the attached plugin template and modify:
$plugins->add_hook("my_hook", "myplugin_function");
To:
$plugins->add_hook("build_friendly_wol_location_end", "myplugin_function");
And in the function myplugin_function() put:
function myplugin_function(&$plugin_array)
{
if (preg_match('/meteo\.php/',$plugin_array['user_activity']['location']))
{
$plugin_array['location_name'] = "Viewing <a href=\"meteo.php\">Meteo</a>";
}
return $plugin_array;
}
That should do it.
I'm looking for this same thing, what must I change on your code if my pages are donate.php and rules.php ?
Well change "meteo" to "donate" and "Meteo" to "Donate"
Alright thank you, it works.
thank you very much i test it in Localhost and it work prefectly
But i have an other question : this one worked for "Meteo page" , How about if i add more costum pages ??
Like this:
function myplugin_function(&$plugin_array)
{
if (preg_match('/meteo\.php/',$plugin_array['user_activity']['location']))
{
$plugin_array['location_name'] = "Viewing <a href=\"meteo.php\">Meteo</a>";
}
if (preg_match('/meteo2\.php/',$plugin_array['user_activity']['location']))
{
$plugin_array['location_name'] = "Viewing <a href=\"meteo2.php\">Meteo2</a>";
}
return $plugin_array;
}