Discuz Picture Order confusion Solution _php Tips

Source: Internet
Author: User

Description

Discuz in the post, add more pictures, and then directly post, picture order sometimes will be disorderly off
Even if the picture in the Upload window is in the correct order, it will go off after the release.

Analysis

Look at the URL, the program code can not see what
Change the picture name to the serial number upload, the order is disorderly, write down the order of the pictures in the post is: 76123458
The bbs_forum_attachment_1 table is then found in the database and the default order is found for this:

Unexpectedly also not according to the aid sort, may take the time to take directly has not ordered by
Find the php:source\class\table\table_forum_attachment_n.php that directly manipulate this table
by Writelog (' filename ', ' log ') method, it is found that every time a post is refreshed, fetch_all_by_id, this method executes once
When the original view of the post, not inserted into the post of the attachment address is every time to read from the database

Solve

To modify the incoming default parameters for the fetch_all_by_id method:order_by= ' aid '

Refresh the sequence of pictures just now, find out the order is normal

The above is about the discuz of the whole content of the amendment, I hope to be able to help.

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.