D
D
dim4ik2013-12-12 19:59:53
PHP
dim4ik, 2013-12-12 19:59:53

How is the tracker on Habré arranged?

The task is to keep track of new comments to the post. (or new blog posts)
As I understand this task:
The user visited the page and we recorded the date of viewing (apparently in a separate table "post_tracker").
Let's say the user clicked "follow/follow" posts in the tracker and in the mail.
Then another user added a comment to the post (or several). As a result, this post will have +1 comment.
For notifications by mail, apparently there should be one more parameter, that the notification was sent successfully and do not re-notify. And for the tracker, you need to store this value +1 somewhere.
Please, tell me an example of how and where you can see an example of such a tracker (I need to understand the algorithm) or explain the algorithm of such a tracker.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Sundukov, 2013-12-13
@dim4ik

@dim4ik every comment has a comment_publish_date , every view also has a view_date . This data is more than enough for work (not any "store +1"). You need to send comments for which: comment_publish_date > view_date (unix timestamp in hand).

N
Nikolai Turnaviotov, 2013-12-13
@foxmuldercp

I would first write a TOR for the problem that needs to be solved.
And then he danced on the points, depending on the initial data.
When you formalize the task by points, it will be easier to understand what and how to solve

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question