Forum OpenACS Development: Re: new functionality in forums HEAD

Collapse
Posted by Michael Totschnig on
Here is a more complete description of what this code does:
It creates a feature called use_ReadingInfo, which can be activated in function forum::use_ReadingInfo_p.
It stores information about which threads a user has already read in two tables forums_reading_info and forums_reading_info_user. Thus it can render unread threads in bold, instead of the default behavior, which considers as new threads changes during the last 24 hours. In the forums overview as well as in the forums-portlet it displays the number of unread threads. The code tries to update reading info when threads are moved between forums, when messages are moved between threads, and when messages are approved, rejected or deleted.
Collapse
Posted by David Arroyo Menéndez on

I've began to port this funcionality to oracle, such as you've done.

I had written this feature using views and I store if a message is visited when someone calls to row.tcl

I'm losting some information using views, because I can't know when the thread was viewed, but perhaps the worst problem is that when someone want to know if a thread is read, we must to do a count and it maybe not very fast if the thread is large. What do you think about it?

Collapse
Posted by Michael Totschnig on
I had a look at the views package and I think it is worth using it if it makes available a service we can use.

You say that you cannot know when the thread was viewed. But in the datamodel I see that there is a field last_viewed in table views, and also it is not that important when it was viewed, but if it was viewed.

I do not understand either why you say that you have to do a count to know if a thread is read. But it seems important to me to store the number of read threads per forum in a denormalized table, as my code does in table forums_reading_info_user.

I think that we could use the views package instead of table forums_reading_info, but still use table forums_reading_info_user (possibly with another name) for storing the count of read threads.