This is an update of the UsersOnline Macro initially written by Carlos Rivero. In fact, it is rather a rewrite including the following changes/enhancements:
The archive attached includes the following files:
WebGUI/lib/WebGUI/Macro/UsersOnline.pm - The macro itself. Do not forget to make an entry in your WebGUI configurationfile!
WebGUI/lib/WebGUI/i18n/English/Macro_UsersOnline.pm - English translation.
WebGUI/lib/WebGUI/i18n/German/Macro_UsersOnline.pm - German translation.
WebGUI/lib/WebGUI/Help/Macro_UsersOnline.pm - Help module.
WebGUI/t/Macro/UsersOnline.t - Testing function, which can be used to check the macro. You need to adapt the default template id prior to execution.
www/extras/macro/users-online/*.gif - Images provided with the initial macro and that are still used by the two templates included. Some of the images have been renamed.
Templates/UsersOnline Default View.template - The default template which provides a view identical to the one of the original macro. Create a new Template somewhere in your import node and copy the content. Normally, this template is used by default. However, you need to adapt the default template id in UsersOnline.pm first.
Templates/UsersOnline Detailed View.template/.header - A detailed view which I composed mainly for the purpose of debugging. Create a new Template somewhere in your import node and copy the content (template and header block).
It is further necessary to create a new boolean profile variable "showOnline"! That variable is queried by the macro and users will only be shown as online if the flag is set to true.
For documentation on how to use the macro have a look at the embedded documentation ($ perldoc UsersOnline). In most cases, a call without parameters should return the desired result.
Change Log
2008-10-03 (Version 1.2):
2008-08-26 (Version 1.1):