-2

Hey, i am coding a small php forum from scratch and would like to show readers what posts he hasnt read yet and what forum categories have unread posts since this visit, pretty much how phpbb or invision boards work.

How do i approach this, cookies? phpbb doesnt seem to use cookies for this, not very a good idea do have a cookie for each post... maybe use css visited attribute? but i dont see how would that work if a new post pops up.

Thanks.

Joan Silverstone
  • 385
  • 1
  • 3
  • 15
  • Posting related code/database schema will help to answer this question – Andrew Sledge Dec 22 '10 at 20:45
  • http://stackoverflow.com/questions/2288814/php-forums-how-to-cope-with-unread-discussions-topics-posts, http://stackoverflow.com/questions/1997399/how-do-forums-show-you-unread-topics, http://stackoverflow.com/questions/514232/determining-unread-items-in-a-forum, http://stackoverflow.com/questions/2057845/how-to-show-unread-read-status-of-forum-posts-like-vbulletin-phpbb-others – simshaun Dec 22 '10 at 20:51
  • any reason why you can't download a phpbb and read that great code? – ajreal Dec 22 '10 at 22:13

2 Answers2

0

you basically need a logging system, that logs user views of each post

Yasser Souri
  • 1,967
  • 2
  • 19
  • 26
0

I agree with Yasser Souri, you need a logging system, but whether to store it on the users side or the servers side is the question. Storing it on the servers side means you have to manage removing old data(if you are using a database), or even session values. But on a good note, its as simple as storing a flag, so you dont need to store a large amount of data which also means that storing it on the users side, in my opinion, is a better option. Yea, they might have a huge amount of "cookies" but who cares, they can delete them ;) In all seriousness, how many forums would they need to visit before their computer starts to bog down? Hundreds of millions.

Dalton Conley
  • 1,599
  • 2
  • 28
  • 36