A quick look through the support forum will reveal that there is one request that comes up again and again for the future of my Simple Forum plugin - and that is a way to identify which ‘new’ posts a member has or has not seen. A few users have become quite passionate on the subject and obviously think I am stupid for having overlooked such a trivial detail. Many stand-alone forums offer this capability (I understand) so why doesn’t Simple Forum?
Well - there are a few reasons. The quickest is that I have not implemented such a feature but the real reason is that I have not yet found a model that works. And this has been my response every time this has come up along with the challenge that if someone suggests a model that does work then I will look at it and see if it can be done. And that still stands.
But first - I’ll talk a little about the background. A major piece of forum software is a giant undertaking involving lots of people. Because that is all it does they can shape the ‘engine’ any way those people decide to shape it and do whatever they want to do with it. In the case of Simple Forum it is just me, my MacBook Pro and the confines of the WordPress architecture. It was also, as the name implies, intended to be ’simple’! It has become, of course, anything but.
So - I have said it before and I will say it here again so in the future I can just point people to this post and thread. I don’t want to do anything that will bog down the WordPress database and bloat the plugin so much that it slows to a crawl. That’s the first and most important point. Next, consider the following:
If I have 1 forum member and 1 forum post - I need to have 1 piece of data (a switch in effect) to record whether that 1 member has read that 1 post. If I have 10 forum members and 10 posts, I need 100 switches. At the time of writing this, my forum has 120 members and 3008 posts which gives a grand total of 360,960 pieces of data! And this isn’t a busy forum!
So - using this sort of method is not really viable. There has to be another way if only I could find it. What I DO do in Simple Forum, is log the date and time a member last visited, This is not noted at login time or, for that matter, at logout time as most people, I am sure, fail to log out at all when they have finished their visit. It is noted when the system determines that they have not loaded a page for longer that 15 minutes. When this is discovered, the date and time is recorded against their user record as their last visit. Next time they make a visit, all posts made since that recorded date/time are marked as ‘new to them’. But, of course, as they visit or read these posts (if they do and I can’t verify they actually do read them) then the ‘new posts to them’ flag is still set as is their last visited date. How can I make it so that these change as posts are read?
The first and obvious thought is to update the ‘last visited’ date/time in their record to match each post they open as they do so but, of course, this has the effect of removing all the post flags if the first one they open happens to be the most recent of all so this doesn’t work either.
So this is the challenge. Everyone wants it to happen nobody knows how to do it! And when the answer materialises it will probably be easy and it will be one of those forehead slapping moments. The best solutions are always like that. And if you have an idea then please join the discussion and let me know.