2009-08-30, 09:11 PM
This a dirty method but works well. It's not language compatible but imho that's not too important for this since it's a location. This will get rid of your UNKNOWN in the location for the who's online page.
For your plugin add this hook call.
Then add this as the function:
Change the text in red to suit your needs.
If you want lang compatibility you just add a couple lines to the function and alter the text.
Plugin authors should understand the function.
Enjoy.
For your plugin add this hook call.
Quote: $plugins->add_hook("build_friendly_wol_location_end", "keyword_online");
Then add this as the function:
Quote: function keyword_online(&$plugin_array)
{
if (preg_match('/keyword\.php/',$plugin_array['user_activity']['location']))
{
$plugin_array['location_name'] = "Viewing <a href=\"keyword.php\">TITLE</a>";
}
return $plugin_array;
}
Change the text in red to suit your needs.
If you want lang compatibility you just add a couple lines to the function and alter the text.
Quote: global $lang;
$lang->load("keyword");
Plugin authors should understand the function.
Enjoy.