Hello,

i would like to have a bottom bar in each forum topic, showing which other users are viewing this topic also. I saw that it is a feature request. So i came up with the following solution:

We make a table, for example forum_online or sth else. Here we store the uid, nid and a timestamp when a user view that page. Using hook_nodeapi on case "load", we store a record in our database for a user.
And when we render the bottom bar, we load an object with all the users where nid = current nid.
Finally with hook_cron we delete those records, that they are above 5minutes or perhaps, we let the admin choose the time.

What are your thoughts?

Comments

apanag’s picture

I am going to make a new module for the whole drupal, not only for the forums.

apanag

michelle’s picture

Status: Active » Closed (won't fix)

If you make it available, I can look at integrating AF with it. But this isn't something I'm looking at adding to AF itself, at least not in 2.x.

Michelle

apanag’s picture

Hello Michelle,

i just added a dev version of my module.

The module is working, but i need further testing with large forums.

http://drupal.org/project/viewers

I am looking forward for your feedback.

Thanks,
apanag

michelle’s picture

Status: Closed (won't fix) » Active

Setting this active again so I remember to take a look at it. Might be a few days.

Michelle

michelle’s picture

Status: Active » Closed (won't fix)

Ok, more than a few days. Honestly, this isn't something I'm going to write. If someone wants to write an integration patch, I have no problems adding it but it's not something I have any interest in doing myself. I've never found it terribly useful to see what other members are reading a topic at that moment.

Michelle