Imitating OSO forums (V)

Source: Internet
Author: User
Previous post. php and reply. in php, after the speech is submitted successfully, a page called post_end.php is displayed. this page mainly prompts that the speech is submitted successfully and provides a faq. php links. The program is very simple. I wrote them below: & lt; html & gt; your speech has been submitted & lt; br & gt; & lt; ahref & quot; faq. php & quot; & gt; returns the previous post. php and reply. in php, after the speech is submitted successfully, a page called post_end.php is displayed. this page mainly prompts that the speech is submitted successfully and provides a faq. php links, the program is very simple, and I will write them below:

Your speech has been submitted

Back to troubleshooting homepage

In this section, we will focus on the eight features we lack in the Forum listed at the beginning:
1. in my forum, users can only speak after logon. the user ID is included in a cookie variable named "cookie_user.
I think this should not be the main content of the Forum program. There are many well-developed programs for your reference regarding user logon. if you want to improve your Forum program, you can consider. php and reply. add a user login module in php. You can also automatically help the user register when the user logs on for the first time.
2. I have no sub-forums.
In fact, you must add an id_style field to the data table guestbook to indicate the id of the sub-forum. In addition, you 'd better design a data table named bm_style, which contains two fields: style_code (sub-forum code), style_name (sub-forum name), and the field id_style in guestbook should store the sub-forum code.
3. I did not count the clicks on a topic.
Add the count_read field to the table guestbook, set the initial value to 1 in post. php, and accumulate it in read. php.
4. in the OSO forum, I have not designed any icons that indicate new posts before each topic.
Record the last time the user reads the post in the user's cookie, and then compare it with time_close. if time_close is greater than this value, the topic is marked as a new post.
5. I did not consider the topic arrangement and display time range provided by the OSO Forum.
You can select a drop-down list box and change the content of the select statement order clause in read. php based on the selected arrangement. The where clause is added based on the display time range selected by the user.
6. no member posting points.
Add the point field in the my_user table, set an initial value during registration, and add the corresponding points in post. php and reply. php.
7. the Forum management function is not available for moderators.
Add the type field to the my_user table, indicating the user type. if the type is moderator, you can enter a management interface to delete the guestbook data table.
8. no sub-editing function is available.
Users can update their posts (that is, the name in the guestbook is the same as the name in the cookie.
At this point, this exercise is all over. if you have any questions, please criticize and correct them. in this case, you may be suspected of having copied OSO (UI part). I would like to thank all OSO comrades.


[This article is copyrighted by the author and osuo. if you need to reprint it, please indicate the author and its source]

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.