[eluser]TheFuzzy0ne[/eluser]
OK, I've been thinking. Hopefully I'm on the right track here, because the last two pages of this thread have confused the bejesus out of me...
I still think a library should exist for this reason. The only problem I can see, is that the library would have to be aware of the forum structure to some extent, in order to mark child forums as being read.
To facilitate this, I think the library can contain functions that need to be overridden in order to return the data necessary. For example:
Code:
function get_child_forums($forum_id=0)
{
# The user will override this function, which will return the child forums
# of the specified forum. It's up to the user how they do this, the overridden
# method can call the database, or a cached array, a file - anything!
}
And in case it's not already clear, the library will actually be a model, and the forum model should extend this model. Basically, the user is able to describe their forum structure to the library.
Now, I know I need to think this through a lot more, and perhaps have the forum structure represented by an array or something, but I think this is the key to creating a portable library - by bridging the gap between the library and the users' set-up.