Page 1 of 1

help with forum "subscribe"

Posted: Mon Jan 10, 2011 11:43 pm
by maxhudson
I have something like a forum (componentadvice.com) that i build pretty much from scratch and is still in progress.

I would like to have something like a subscription feature so when a user clicks a link, it adds the topic to their subscription, they will be notified somehow and recieve a link.

The way my tables are set up right now is like this:

topic table:

topic id (to identify the topic)
topic name (self explanatory)

(thats all you need to know in that table i think)

posts table:

post username
post id (identify post)
post topic (the topic the post was made on. equal to topic id)
post date

(thats all you need to know for that table too i think)

----

The way I was thinking of doing this, was

when they click subscribe, somehow add this to their list of subscriptions
when the page refreshes check if there are any new entries in the table with an id > the previous ids and with the same topic.
display the link to the page (which is displayed as the topic name), the author and the latest posts date

Is this reasonable?

Thanks!