Welcome Guest, Not a member yet? Register   Sign In
A CI-developed forum?
#11

[eluser]Daniel H[/eluser]
Yup that could be the problem, but bear in mind that it will only fill up if the users are particularly active. Only a small %age of users will be writing to the table often.

Personally I'm not going to include a read/unread feature in my latest project because I do worry about that overhead.
#12

[eluser]Bramme[/eluser]
[quote author="meigwilym" date="1224211340"]@Bramme: compare the user's last login time (and not the current session's) with the each thread's most-recent-post-time
Code:
if($user_previous_login_time < $post_reply_time){
  echo 'unread.png';
}else{
  echo 'read.png'
}
or something...

But I'm not sure of how it would change after you've actually read the thread. Maybe another variable to keep a check somewhere.

Mei[/quote]If you would refresh the previous login time with every page refresh, it could work, no?
#13

[eluser]Daniel H[/eluser]
Regardless, that still doesn't handle whether the post/thread has actually been viewed...
#14

[eluser]Bramme[/eluser]
Oh right. Forgot about that... I'm out of ideas!
#15

[eluser]meigwilym[/eluser]
Me too - can someone enlighten us?
#16

[eluser]Jelmer[/eluser]
The only way I can think of is to have a table that saves for each user and topic combo when it's last been viewed so you can check for each topic if it's been viewed or not (if not, it's either older then the last post or not in the database).

Code:
id | topic_id | user_id | last_view

But I don't really see any advantage to this, only if you want your users to read every topic. I like the more generally used way better: to save the last login and only show new or updated topics since last login as unread.

Also: such a table would become huge, the only way to keep it useable would probably be to have the system purge all entries with a last_view older than a certain setting (like a month) and consider any topics updated before such a limit as read anyway.
#17

[eluser]Bramme[/eluser]
[quote author="Jelmer" date="1224292786"]

But I don't really see any advantage to this, only if you want your users to read every topic. I like the more generally used way better: to save the last login and only show new or updated topics since last login as unread.
[/quote]

I agree, but how would you indicate "you have read this topic"?
#18

[eluser]Jelmer[/eluser]
Quote:I agree, but how would you indicate “you have read this topic”?
That's more an interface question isn't it? I'd do it the same way most forums do, use 2 kinds of icons: one with color for unread topics and a greyscale one for read topics.
#19

[eluser]meigwilym[/eluser]
The only way I can think of is that each time a thread is created, a table is updated for every user that has not read the post. When an user has read the thread, his record is deleted, but will be updated next time the thread is updated.

But this seems to me like a big load on the db for such a small function.

Mei
#20

[eluser]Bramme[/eluser]
[quote author="Jelmer" date="1224299495"]
Quote:I agree, but how would you indicate “you have read this topic”?
That's more an interface question isn't it? I'd do it the same way most forums do, use 2 kinds of icons: one with color for unread topics and a greyscale one for read topics.[/quote]No no, you misunderstood me: I was wondering how you would switch those icons. But I understand it now.




Theme © iAndrew 2016 - Forum software by © MyBB