Website Construction: News Publishing System

Source: Internet
Author: User

How can we build a news system? A complete news system includes not only the news interface for browsing, but also the powerful functions of many functions and background management.
How can we schedule the allocation of sub-functions in these functions? The following describes the configuration control of various functions. The implementation of the news system is simple, but it can be said that it is very complicated.
The news system can be divided into three parts: the Administrator logs on to the system, the news management system, and the user browses the system. The whole process is simple:
1. Management Personnel publish news --> database --> users browse news
2. Locate the problem --> log on to the Management System --> edit and modify the news
The above process seems simple, but it is not so simple to implement. This is a system development that is far more complicated than the implementation of the message board, but the basic operation principle is the same as that of the message board. the top priority of the news publishing system lies in the database planning and management system implementation.
What are news content: News classification and information ontology.
The two items in the database package letter can be implemented in one data table, but they are not economical. Therefore, we can use two data tables to store the content separately, and one specifically stores the news classification, another ontology is used to store information. how can we call this function to share two tables? Table join is used to solve this problem (this section does not introduce this knowledge. You can refer to the database-related knowledge and obtain the most valuable knowledge from your own efforts, right ?)
The following describes how to implement the management function:
1. First, publishing news
This is a combination of a series of submission forms. Here there are two categories: creating news categories and publishing news; creating news categories, and then publishing relevant news in each category, easy! This is not the case. Think about how all the information ontology is concentrated in a data table and how to distinguish information classification. The table association mentioned above is very important, of course, this method is not required. Creating an independent table for each category can solve the problem, but is it cost-effective? What about maintainability and scalability?
The call of news classification and information ontology causes trouble. Right, the solution is to use table Association.
2. Editing, modification, and deletion Problems
This is the basic application of php + mysql knowledge. It is not difficult to implement these functions. I will not introduce them much here, but note that when you change or delete a category, how can we process the information ontology under this category? Because table Association is used, these functions are processed in the same table.
3. handling multiple jobs
But what happens when many people edit a piece of news at the same time? In this case, the database will only store the Last edited content. This situation will mean that the previous modified users are working hard in vain. To solve this problem with multiple efforts, the primary approach is to take the lead, that is, you have the editing permission first, and then you have only the browsing permission until the editing is complete. this function is like linux permission control, isn't it?
There are several methods to complete this function: 1. Use cookies for control, 2. Add weighted control fields in the Table. Of course, it is easier to use cookies. The cookie implementation method and process are as follows:
When an administrator enters the editing process and sets the cookie, the cookie value is determined by the program segment of the editing function. If this parameter is set to null, the cookie value can be edited. If it is not null, the cookie is denied. When you exit the editing process, the cookie is cleared; the multi-job function is an effective function, which can at least reduce the waste of time and manpower.
The implementation of the news browsing function is very simple. With the page flip function (introduced on this site), the powerful news system is basically completed, and it seems that a very important function is missing. Good news is the search engine, this function will be described in detail later.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.