Hey xtopolis, thanks for that! Helped quite a bit.. and i've had a look at a few more topics on the same subject, and think i've come up with the simplest solution.. i'll put it here just incase anyone in the future has the same problem.. hopefully this should help
Also, i've not tested this yet.. going to start implmenting it after i've finished this post.. here we go
*// User registers //*
We will update the $user->last_loggedin (field in the users table) to time()
*// User logs in //*
All of the posts/topics that are 'new' (Which are between time() and $user->last_loggedin) are added to a database... (Which consists of, user_id.. topic_id.. post_id)
All posts/topics that are in the database.. appear as 'new' to the corrosponding user
*// Someone else posts a topic/post //*
When a new topic/post is added.. it is inserted into the database.. with all users that are online (within the last.. 20 minutes..).. again.. user_id.. topic_id.. post_id
When a topic is viewed.. it's deleted from the database (again, with corrosponding user id)
*// User logs out //*
All entries in the database with their user ids on them.. are removed!
Then the whole process starts again...
The user logs in.. grabbing all of the posts from their last login.. to the current time..
This seems such a stupiiddd way to do this. And here's my reasoning.. Let's say 1000 users are logged in at the same time.. then someone posts a new POST... that's 1000 new rows in the database just for one single post..
Let's say a user doesn't login for a hell of a long time.. and like.. 50,000 new posts are added.. they login.. and 50,000 new entries are added to the database..
I guess i could limit the last one to the last 30 days or something.. even though major forum software doesn't seem to take that path :\
I'll let you know how it goes, anyhow.