This project obviously has a database, so create a table called subscription with user ID's in it.
two columns:
first column is the user ID of the source user
second column is the user ID of those subscribed
UNIQUE(col1,col2) in that order.
So every time a user clicks subscribe you put the user ID of the author of the article in the first column and user ID of the user that clicked subscribe in the second column.
Sample data (i'll use names instead of IDs):
-
-
author | subscriber
-
-----------------------
-
john | kim
-
john | darrel
-
kim | jim
-
kim | john
-
-
-
When a user adds an article, you basically get all the user's that are subscribed and notify them (email, alert, etc)
-
-
SELECT subscriber
-
FROM subscription
-
WHERE author = '$authorUserID';
-
-
Hope that helped,
Dan