且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何为新闻门户网站的注册用户创建订阅功能

更新时间:2023-12-01 15:39:28

虽然这完全取决于您如何构建订阅的逻辑,但您可以遵循许多门户网站遵循的典型逻辑。



1.有一个订阅标签/表单/链接/部分,您可以在其中捕获您网站访问者的信息。订阅所需的最少信息是电子邮件ID。您可能希望根据您的要求捕获的其他可选信息是 -

a。姓名

b。国家(如果您要发布国家特定新闻)

c。州(如果您要发布州特定新闻))

d。语言(如果您的网站是多语言的)

e。邮寄频率偏好

f。获取邮件的时间偏好

g。等等。


2.有一张表格可以捕获所有这些信息

3.订阅可以有两种类型(最低)用于新闻那种网站。您可以在发布后立即将新闻作为邮件发送给所有订阅者,或/并且您可以每小时/每天/每周发送新闻信。

4.如果您想要新闻如果要立即发送,您可以创建一个后台流程,在发布新闻时将这些邮件发送给订阅者。

3.如果您想发送新闻邮件,您可以创建一个Windows服务/或计划在一天中的特定时间运行的程序。

4.您需要有一个包含新闻信件的表格,您可以创建或构建这样的动态逻辑来创建自己。



你可以根据你的要求改变逻辑。



希望,它有帮助:)
Although it's all depend on you how the logic for the subscription to be built but you may follow the typical logic that many portals have followed.

1. Have a subscription tab/form/link/section where you can capture information of the visitors of your website. The minimum information you need for subscription is an email id. Other optional information you may like to capture based on your requirement are-
a. Name
b. Country (If you are publishing country specific news)
c. State (If you are publishing state specific news))
d. Language (If your website is multi-lingual)
e. Mailing frequency preference
f. Time preference for getting mails
g. etc.

2. Have a table that captures all these information
3. The subscription can be of two types (minimum) for news kind of websites. Either you can send a news as a mail to all your subscribers as soon as it is published or/and you can send them an hourly/daily/weekly news letter.
4. If you want the news to be sent immediately then you may create a background process which will send these mails to the subscribers as and when a news is published.
3. If you want to send mails like news letters you can create a windows service / or a program that is scheduled to run on specific time of the day.
4. You need to have a table which contains the news letters which you can create or build such a dynamic logic to create themselves.

You can change the logic according to your requirement.

Hope, it helps :)