First, thank you for this. I learned a lot and have a few things planned!
When following the example, I noticed that if you went to the url:
http://www.yoursite.com/test (with no .php) the page still comes up fine, but the online locations page would break. I fixed this easily by adding an extra statement to the switch in the plugin using the
online_location_process hook:
PHP Code:
switch ($filename)
{
case 'test': //added this line, would need to do for each file if more than one
case 'test.php':
$userinfo['activity'] = 'mypage';
break;
// add more cases here if you have more than one custom page. no need for multiple plugins. one plugin can handle all.
}
I'm not sure if this has anything to do with the fact I'm using the mod rewrite url rules.