You are invited to Log in or Register a free Frihost Account!

Topic already read or not button.

Okay, It is pretty hard to formulate a topic title for this, as it was also difficult to formulate a google seqrch query for.

Basically, I'm aiding in creating a custom bulletin board for some website. We already have the site running and everything is working perfectly, but now we'd like to add the function that most bulletin board have: topics that you have read have a different coloured icon in front of them.

My first idea was to use cookies for this, because it's pretty simple to create a multidimension array holding cookie so I could store forum ID's with their respective topic ID's and timestamps. The problem is that the original coder of the board created seperate pages for all of the forums, instead of using one hybrid forum display page. (There are a few seperate mini-forums integrated into the website, really as in seperate pages, like 2 different phpBBs on 2 pages) Let's say there are 5 of those forums.
To use one cookie for all of them could cause trouble, because of size limits. (I think most browsers have a 4Kb limit) Using a seperate cookies for every forum would increase the amount of possible topics, though for a board like Frihost that wouldn't even be enough.

Does anyone has an idea on what large boards use to handle this? Any help would be greatly appreciated!

Fire Boar
PHPBB3 uses a topic tracking table (*topics_track). This has columns for user_id, forum_id and topic_id, as well as one to keep track of the time when the post was marked. This may well get huge, you're quite right, and I'm not sure how PHPBB deals with this if at all, but in my opinion the best way would be to ignore everything a month or so old, marking it "read" by default. Have a cron job or virtual cron job that checks for entries in the table with a time old enough to be ignored and deletes them.
Seems like a reasonable idea. I might see if I can get that integrated. Smile Tyvm!
Related topics
Forum Portuguese
Please read this first
Democrats at it again: Caught in another lie
Me Thinks....
Account activation PM?
Sherlock Holmes Yes, No?
The DaVinci Code - by Dan Brown
once again
Rules Enforcement
[official] The Meaning of life
explosives advice
frih$ cash-in to loosen 45 Points limit
Don't believe in Gay Marriage? Then Read this.
Custom Forums
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

© 2005-2011 Frihost, forums powered by phpBB.