I recently developed a pretty simple hack to track online users on a Ning site with very little overhead. I've attached the two files needed. Once loaded and hooked up properly you can get info anytime--very useful from your smartphone for example. It's fun to see how many people just joined your network while out at dinner or a movie, say.
Place XG_Online.php in /lib.
Place InfoController.php in /widgets/admin/controllers.
To track online users, you need to add the following PHP code to the end of your footer.php file (just before </body>). This call is meant to be extremely lightweight:
With this core online function, you could build a widget that displays online users graphically. I just haven't gotten around to it yet to add it here.
thank you ted for your help,Ive tried it on my test site it didnt make any error,but unfortunately no infromation showed up...what do you think is the problem?(http://code4ning.ning.com/admin/info/online).
this is the error_log
PHP Parse error: syntax error, unexpected '}' in /apps/code4ning/widgets/admin/controllers/InfoController.php on line 43... thanks.