|
-
Apr 1st, 2004, 04:34 AM
#1
Thread Starter
Hyperactive Member
Read Messages on Forums
I have a forum on my site and want to add the feature that each user can see which threads they have viewed and which they haven't.
What is the best way of doing this? Is the only way to have a list of which threads every single user has viewed in a database. Surely in a message board like this table will be massive, especially as every thread is archived or is there someway of checking the cache and dates?
ASP, PHP, VB, JavaScript, CSS, HTML, a little C and a little CGI.
Richard Whitehouse.
Join the Footie Predictions League
"Make it idiot proof and someone will make a better idiot."
-
Apr 1st, 2004, 05:44 AM
#2
Fanatic Member
Re: Read Messages on Forums
Originally posted by richy
[B]I have a forum on my site and want to add the feature that each user can see which threads they have viewed and which they haven't.[B]
By makeing a few asumptions you should be able to get around alsorts of problems and only add one perminant field to the user table.
Use this field to record the exact time and date "Now()" that they last visited the site. Then mark each post that is new since then. If you use the session variable to store the unique ID of these tables before updateing [Date Of Last Visit] for this visit with the new time and date then you can remove viewed IDs from the list as they get viewed.
If that sounds like too much you could just do:
Code:
<p>There are :<%=Sum(Records > LastVisit)%>
new posts since your last visit</p>
-
Apr 1st, 2004, 05:46 AM
#3
Fanatic Member
Admittidly you might have to use a different name for the function and probably have a more realistic input for it like
VB Code:
CountOfPosts(Rs.fields("LastvisitDate").value)
-
Apr 1st, 2004, 05:53 AM
#4
Thread Starter
Hyperactive Member
Thanks very much Matt. Now its time to get to the drawing board!
ASP, PHP, VB, JavaScript, CSS, HTML, a little C and a little CGI.
Richard Whitehouse.
Join the Footie Predictions League
"Make it idiot proof and someone will make a better idiot."
-
Apr 19th, 2004, 10:28 AM
#5
Fanatic Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|