Posts in a topic, seen by some users

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zacky
Forum Newbie
Posts: 19
Joined: Fri Nov 29, 2002 6:08 am

Posts in a topic, seen by some users

Post by zacky »

I want the post to change color for the people that have not seen the post..
what's the best way to check if a user have seen a post or not??
..without spamming the db with all the nick's who have seen the post.. :roll:
User avatar
Kriek
Forum Contributor
Posts: 238
Joined: Wed May 29, 2002 3:46 am
Location: Florida
Contact:

Post by Kriek »

What forum and version are you running?
zacky
Forum Newbie
Posts: 19
Joined: Fri Nov 29, 2002 6:08 am

Post by zacky »

my own forum, and alpha v0.10 8)
just alpha, yet 8)

do you have some tips..?
User avatar
Kriek
Forum Contributor
Posts: 238
Joined: Wed May 29, 2002 3:46 am
Location: Florida
Contact:

Post by Kriek »

Have you considered using cookies? Based off the system that allows you to view whether or not a thread or forum you are viewing has new posts since your last visit. The cookie would track the current user session as well.
zacky
Forum Newbie
Posts: 19
Joined: Fri Nov 29, 2002 6:08 am

Post by zacky »

but I don't like cockies :cry:
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Do you see which threads you've read here? Do you like it?
Then you experienced the amazing powers of cookies ;)
viewtopic.php of phpBB:
...
//
// Set a cookie for this topic
//
if ( $userdata['session_logged_in'] )
{
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
....
setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), ...
zacky
Forum Newbie
Posts: 19
Joined: Fri Nov 29, 2002 6:08 am

Post by zacky »

hm, but what about the bug in phpbb where all the new post's vansishing sometimes? :oops:
and at the end of the session.. should I save it in the db, for each user or what?
:roll:
Post Reply