[Pugged] Tracking Read Topics/Messages, and the "unread" flag.
Tim Perdue
ciapug@ciapug.org
Fri, 6 Sep 2002 14:27:22 -0500
--UoPmpPX/dBe4BELn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Fri, Sep 06, 2002 at 02:13:53PM -0500, Chris Hettinger wrote:
> So am I correctly hearing you, I have basically two choices:
>=20
> 1. Based on a date comparison only:
> I store a time/date stamp in the members profile, upon a visit I compare =
the forums/topics most recent activity to the stamp stored for the user.
>=20
> Pros: Likely the easiest way
> Cons: Can't flag a topic for forum individually.
>=20
> OR
>=20
> 2. I maintain a table containing a record for each user's read topics:
> Like Tim's table diagram. In a table I store the id for every topic the u=
ser has read.
>=20
> Pro: Could individually track a topic
> Cons: Phew, logic. I would have to not only maintain the topic id, but th=
at topic recent activity (last post stamp) to handle each time he views tha=
t topics, so that I don't have to also track each reply to a specific topic=
.... *head explodes*
=20
It probably doesn't have to be difficult. Probably could be done in a single
query and a single IF() statement, depending on your table structures.
Although if you're using MySQL.... it might be a whole lot harder and requi=
re
a nightmare of twisted code.
hehehehe
You could probably post your table structures and we could take a look to s=
ee
what's involved.
> ... Sigh.
>=20
> Chris Van Cleve:
> I think #2. Once the user visits a the forums index page (Forum listing) =
I grab the last visited date, assign it to a variable then update that fiel=
d in the members profile with the current time/date. This assigned variable=
is then used as the comparison for each forum and topic. I think the key s=
hould be that I only do that last visit update one time. Which I think I am=
doing, correctly. hmmm.
>=20
> Tim:
> You mentioned Phorum, how would their process mostly like compare to that=
of phpBB forums, or Invision Boards (another php based forum app) ... I ha=
ve the phpBB source files, and looked through them but they are pretty cryp=
tic to me still, so tearing them apart for logic is a hunting trip. I final=
ly found a db table list and saw one name topic_watch which could be the ta=
ble they use, similar to option 2 ...=20
I don't know about those boards, as I never used them.
Tim
--=20
Founder - PHPBuilder.com / Geocrawler.com / SourceForge
GPG Public Key: http://www.perdue.net/personal/pgp.php
Perdue, Inc. / Immortal LLC
515-554-9520
--UoPmpPX/dBe4BELn
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9eQGaLxmgedYDVWQRAlNXAJ9XdQ77vx7REG5Bh4kuPS/TeBaPEgCfcmC2
6CAlUFEjNkwcrEcFMtk1E3Q=
=+A5O
-----END PGP SIGNATURE-----
--UoPmpPX/dBe4BELn--