473,382 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

forum

I am in the process of writing my own forum. It is gone fairly well so far.
I been searching different forum scripts, both asp and php, and I can't find
this answer.

How is it scripted to only show a forum post that hasn't been read by the
current user?
I feel it has something to do with the last visit, and or the date of the
post.

But I am not sure how this is done. On my phpbb forum, I can go in and read
something, go back to index, refresh, and that post is now marked as read.
how is this done?

Any ideas or suggestions?

i have looked at webwiz forums, snitz forums, as well as phpbb.. and
couldn't find it.

thanks
jeff
Jun 7 '06 #1
8 1434
> How is it scripted to only show a forum post that hasn't been read by the
current user?


When you show a post to a user, you mark in a table somewhere the
combination of userid and postid (sorry, I don't know your schema, but
surely there is a piece of data that uniquely identifies the user, and one
that does the same for the post).

Now, I don't know what database you're using either, but in SQL Server you
could use a LEFT JOIN against this table and when the user exists on the
right, s/he's already read the article, otherwise s/he has not.

A
Jun 8 '06 #2
but wouldn't that create a large DB eventuly??
I mean.. if 1000 members read 1000 posts, their name would have to appear on
every post made.
that would be a million lines in that table.... if i understand you
correctly.
"Aaron Bertrand [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:Oe**************@TK2MSFTNGP05.phx.gbl...
How is it scripted to only show a forum post that hasn't been read by the
current user?


When you show a post to a user, you mark in a table somewhere the
combination of userid and postid (sorry, I don't know your schema, but
surely there is a piece of data that uniquely identifies the user, and one
that does the same for the post).

Now, I don't know what database you're using either, but in SQL Server you
could use a LEFT JOIN against this table and when the user exists on the
right, s/he's already read the article, otherwise s/he has not.

A

Jun 8 '06 #3
> but wouldn't that create a large DB eventuly??

Everything has the potential to create a large db. It's all in how you
manage it.
I mean.. if 1000 members read 1000 posts, their name would have to appear
on every post made.
Why would you use a name? If "Joe Buttafiko" reads post 1, then changes his
username to "Heidi Fleiss" and reads post 2, how are you going to know
they're the same user? Don't you have a surrogate (like UserID) that is a
much skinnier identifier for this kind of thing? Anyway, is that really
going to be more data than the post themselves? I highly doubt it.
that would be a million lines in that table...


Oh no! A million rows? Unless you're running Access or hosting SQL Express
on a laptop with a dying battery, this is not going to be a drop in the
bucket for an enterprise database system. I manage clustered servers on
SANs with TB of data, and I can't imagine that requiring more disk space for
high volumes of traffic is the worst problem you could have (unless you
don't serve ads, I guess).
Jun 8 '06 #4
yes... i do have unique id's for the users, instead of the names. but what i
am getting at, is the forums i have used in the past, don't use that
approach. not sure how they do it, but it isn't don't that way. i have
looked in the tables and i don't see anything showing that a userid has
visited a post.

thanks for the input though... :)
"Aaron Bertrand [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
but wouldn't that create a large DB eventuly??


Everything has the potential to create a large db. It's all in how you
manage it.
I mean.. if 1000 members read 1000 posts, their name would have to appear
on every post made.


Why would you use a name? If "Joe Buttafiko" reads post 1, then changes
his username to "Heidi Fleiss" and reads post 2, how are you going to know
they're the same user? Don't you have a surrogate (like UserID) that is a
much skinnier identifier for this kind of thing? Anyway, is that really
going to be more data than the post themselves? I highly doubt it.
that would be a million lines in that table...


Oh no! A million rows? Unless you're running Access or hosting SQL
Express on a laptop with a dying battery, this is not going to be a drop
in the bucket for an enterprise database system. I manage clustered
servers on SANs with TB of data, and I can't imagine that requiring more
disk space for high volumes of traffic is the worst problem you could have
(unless you don't serve ads, I guess).

Jun 8 '06 #5
> yes... i do have unique id's for the users, instead of the names. but what
i am getting at, is the forums i have used in the past, don't use that
approach. not sure how they do it, but it isn't don't that way. i have
looked in the tables and i don't see anything showing that a userid has
visited a post.


Well, maybe they store it in a cookie on the client's machine. Personally,
I'd rather have the information (but maybe they were very cheap on disk
space).
Jun 8 '06 #6
> yes... i do have unique id's for the users, instead of the names. but what
i am getting at, is the forums i have used in the past, don't use that
approach. not sure how they do it, but it isn't don't that way. i have
looked in the tables and i don't see anything showing that a userid has
visited a post.


Well, maybe they store it in a cookie on the client's machine. Personally,
I'd rather have the information (but maybe they were very cheap on disk
space).
Jun 8 '06 #7
well, i have been searching for the past week, and i can't find the
solution. i know it has to be something simple i am missing.
"Jeff" <gi*****@adelphia.net> wrote in message
news:mI******************************@adelphia.com ...
I am in the process of writing my own forum. It is gone fairly well so far.
I been searching different forum scripts, both asp and php, and I can't
find this answer.

How is it scripted to only show a forum post that hasn't been read by the
current user?
I feel it has something to do with the last visit, and or the date of the
post.

But I am not sure how this is done. On my phpbb forum, I can go in and
read something, go back to index, refresh, and that post is now marked as
read. how is this done?

Any ideas or suggestions?

i have looked at webwiz forums, snitz forums, as well as phpbb.. and
couldn't find it.

thanks
jeff

Jun 14 '06 #8
the number of rows isn't the issue, what i meant is, everytime someone comes
into the forum, it would have to go through each record to see if that user
has viewed each post or reply. i think a time issue would be created. my
server has a great speed, but we are still talking about checking a large
amount of data on each visit. then factor in if 20 people are on at the same
time, and checking through a table that contains 1,000,000 records.
am i wrong for thinking this way??
"Aaron Bertrand [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:ue**************@TK2MSFTNGP02.phx.gbl...
yes... i do have unique id's for the users, instead of the names. but
what i am getting at, is the forums i have used in the past, don't use
that approach. not sure how they do it, but it isn't don't that way. i
have looked in the tables and i don't see anything showing that a userid
has visited a post.


Well, maybe they store it in a cookie on the client's machine.
Personally, I'd rather have the information (but maybe they were very
cheap on disk space).

Jun 17 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: blockhead | last post by:
We are looking for someone to either complete a php forum program or create one for us. There isn't really anything that is available that suits our needs and we have specific wants. If you are...
0
by: Paul Kinsella | last post by:
---------------------------------------------------------------------- NEWS BULLETIN - http://www.companywire.net ---------------------------------------------------------------------- Company...
0
by: Robert Oschler | last post by:
Hello all, I have set up a forum dedicated to WordNet Developers. I just added a section for Python developers that are using PyWordNet or other Python based WordNet interface modules or code. ...
14
by: Matt | last post by:
Any progammers looking for a killer app to develop? How about a voice enabled forum? One of the most powerful, exciting, and engrossing experiences on the Internet is the Forum. The first great...
4
by: frizzle | last post by:
Hi there, Still building my forum. I have a certain mysql-query i just can't figure out. These are my tables (simplified): categories -> id, description forums -> id, cat_id,...
0
by: dba123 | last post by:
OK, maybe I can get some help here, this is a last resort. I know I'm asking a lot by having you download and install this but it's really not that bad and I've had it. Their support has sucked,...
2
by: tridirk | last post by:
Hi; I am getting a Objceted Expected Error on my forum site. I can't find what is wrong? Line: Char: Error: Object expected Code:0 the site is My SMF Forum
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.