By khoogheem on
wondering if anyone has a module they have created or something already there (which I can't seem to find) that would in a block show who else is viewing the node that you are currently on.
Say we have a site that has videos and you wish to see all other users that are currently viewing.
block would be similar to:
Currently Viewing: 30 members
-user1
-user2
(this would be a config on how many to show in the box)
If not.. I am wondering if it is best a add-on to tracker where we would look at current node users is on and see if that is the last known node they viewed (assuming they are still in a session)..
Comments
Some comments
I do not know of such a module. You could use the existing history table but the query would probably be expensive. I would probably make a small module that implements the 'view' op of the nodeapi hook and for each user record the last node viewed (in a new table). The module could also implement the block to show the information. The module would likely want to implement the init hook and clear the entry for the current user. Because one can just leave the website you might want to store uid,nid and a timestamp in the table and use a cron job to clear entries older than some time. Then you need a settings page for things like how many to show in the block and an expire after time.
@khoogheem: I am also looking
@khoogheem: I am also looking for this, have you found anything that provides this functionality?
This is commonplace on forums and it would be great as an admin to know how many users/visitors are currently viewing the node I am working on.
Thanks
Mike