Forum Topic: Building Forum, Updated Posts?

(153 views • 3 replies)

This topic is 1 page long.

<< < > >>
None

DrRobot

Reply To Post Reply & Quote

Posted at: 8/10/09 01:09 PM

DrRobot DARK LEVEL 17

Sign-Up: 03/12/06

Posts: 398

Hey, currently I'm building a forum, and it's going pretty good so far, however, however, how do i implement the updated since you were gone things? Like here on newgrounds, when somebody posts and you sign on, the picture by the post is yellow. How do i do that in my forum? At least what sort of thing am I looking to do to achieve this?

BTW, everything is custom, so i can modify jsut about anything.


None

citricsquid

Reply To Post Reply & Quote

Posted at: 8/10/09 01:15 PM

citricsquid DARK LEVEL 23

Sign-Up: 06/25/05

Posts: 16,084

Have a last action field, and display all threads with the new posts icon if they've been posted in since the last action. If you want to do a "proper" one, you'd need to track each topic individually. What you could do, to save database space, is when someone reads a topic the "read" field is set, for example:

topic | username | 
1         citricsquid

So you check if a row exists for "citricsquid" and the topic "1", if it does then you display the topic as read. However you'd need to reset this every time a new post is made.

Have a look at how phpbb do it :)


None

DrRobot

Reply To Post Reply & Quote

Posted at: 8/11/09 07:18 PM

DrRobot DARK LEVEL 17

Sign-Up: 03/12/06

Posts: 398

I was thinking that I might make a last login field and store the time when they leave the website, or last log in or seomthing, and any topic that has a time stamp newer than than the one stored in the one on the user, then just display those with the "new" icons. But there is the problem of the setting the "new" ones that were looked at back to regular topics, and also, updating the time since they were on the website last.


None

WoogieNoogie

Reply To Post Reply & Quote

Posted at: 8/14/09 02:28 AM

WoogieNoogie LIGHT LEVEL 14

Sign-Up: 06/26/05

Posts: 3,284

Your best bet would likely be putting a timestamp in the user's data in your database whenever an action takes place by the user. Then when a user stops taking action, it'll stop updating the timestamps.

Use the same timestamps for all posts, and do an "if a is greater than b" thing.


All times are Eastern Standard Time (GMT -5) | Current Time: 11:12 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!