Page 1 of 1

Topic Subscription question

Posted: Sat Dec 02, 2006 4:19 am
by kaisellgren
Hi,

I am not asking how topic subscription works here. I am asking how to make one. I have written a nice looking forum system and I would like to create topic subscription function also. I know couple of methods to do this but they sound too 'heavy'.

What do you suggest? How do these IPB's, PHPBB's and other forums' subscription work?

Thank you for your time,
Kai

Posted: Sat Dec 02, 2006 4:59 am
by Flamie
simple, make a table called
users_subscriptions
with the following fields:
user_id, topic_id

when someone posts in a topic:
SELECT user_id FROM users_subscriptions WHERE topic_id=$thistopic
Loop thru the result, and mail() everyone :)

Oh and, when someone subscribes to a topic, just insert a row with the topic id and his id in that table ;p