Page 1 of 1

Showing new topics to people?

Posted: Mon Mar 10, 2008 11:39 am
by Mightywayne
I'm currently in a dilemma. I have made a new forum software, but I'm stuck at one last thing: showing unread topics.

If PHPBB wasn't so damn confusing to read, I could just dissect it there, but I can't. So basically, what happens is that when you go to any forum these days, you see topics that have new posts in them, or haven't been read yet, and they will probably have a new symbol next to them to show this.

I just can't think of how to do this. I was thinking cookies, but that'd be a TON of cookies EVERYWHERE. Beyond that, I have no idea what to do at all, and I don't even know the term to search for on google. =/

Re: Showing new topics to people?

Posted: Mon Mar 10, 2008 1:38 pm
by anto91
i ones made a forum and had that problem to.

Ill show how i did, im writing this out of my memory so it will not be very accurate to my actual code.

forum_thread_views

[sql] CREATE TABLE forum_thread_views (userID int(8) UNSIGNED NOT NULL,threadID int(8) UNSIGNED NOT NULL,boardID tinyint(4) UNSIGNED,viewed int(11) UNSIGNED); [/sql]

On view a thread

Update/insert into forum_thread_views set viewed = UNIX_TIMESTAMP(NOW()) or time()

on view board
write a complex query to compare threads were viewed is smaller then the lastpost of the thread

Re: Showing new topics to people?

Posted: Mon Mar 10, 2008 3:10 pm
by Mightywayne
Oh, I see. Thanks a lot, but... that looks like it's going to be really hard on the server. Queries and all that, I mean. Maybe when I get rich one day and have a good server, I'll be able to use this. For now I bookmark and thank you.