Ask a difficult question?

Source: Internet
Author: User
Ask a difficult question? Hello everyone, how can I add custom form items (template-data insertion-Data Query) in the discuz system )??


Please give a reply!


Reply to discussion (solution)

What do form items mean? Form? Or php pages and templates?

What do form items mean? Form? Or php pages and templates?



At present, the discuz Post mode is basically the category title post content.


I want to add several items, such as adding area select and remarks input. What is the price for classification information, and the new and old levels choose this?

It is easy to create templates. The difficulty is that the program involved in posting should be changed, the database should be written, and the output should be ensured.

Data can be obtained directly at $ _ POST in the background. if a field is created on the pre_forum_thread table, $ newthread = array (, you can add fields and data to the table. if you create a table separately, you can use DB: insert to insert data.

Data can be obtained directly at $ _ POST in the background. if a field is created on the pre_forum_thread table, $ newthread = array (, you can add fields and data to the table. if you create a table separately, you can use DB: insert to insert data.



Data can be obtained directly at $ _ POST in the background. if a field is created on the pre_forum_thread table, $ newthread = array (, you can add fields and data to the table. if you create a table separately, you can use DB: insert to insert data.



So how to get data? Which program is used to read the database and obtain the Post data? I plan to create a copy and use it again.

Of course, you can use DB: select to write it yourself, but I don't want to. I think this is not closely related to the system.

// Obtain the topic C: t ('forum _ thread')-> fetch (1); // The topic id, returns a one-dimensional array C :: t ('forum _ thread')-> fetch_all (array (1, 2, 3); // The topic id (array), returns a two-dimensional array // gets the post C :: t ('forum _ Post')-> fetch (); // The topic id, and post id, returns a one-dimensional array C: t ('forum _ Post ') -> fetch_all (9, array (25, 26, 27); // The topic id and Post id (array). a two-dimensional array is returned.


Find \ source \ class \ table \ table_forum_post.php and \ source \ class \ table \ table_forum_thread.php for details.

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.