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. =/
Showing new topics to people?
Moderator: General Moderators
-
Mightywayne
- Forum Contributor
- Posts: 237
- Joined: Sat Dec 09, 2006 6:46 am
Re: Showing new topics to people?
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
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
-
Mightywayne
- Forum Contributor
- Posts: 237
- Joined: Sat Dec 09, 2006 6:46 am
Re: Showing new topics to people?
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.