Discuz Picture Order clutter Solution, Discuz solution _php Tutorial

Source: Internet
Author: User

Discuz Picture Order Chaos solution, Discuz solution


Description

Discuz when posting a post, add multiple pictures, and then post directly, picture order can sometimes be confused
Even if the picture is in the correct order in the Upload Picture window, it will be lost after posting.

Analysis

Look at the URL, the program code can not see what
Change the name of the image to an ordinal upload, the order is disorderly, make note of the post of the random picture order: 76123458
Then find the Bbs_forum_attachment_1 table in the database and find the default order for this as well:

Even if they are not sorted by aid, it is possible to take them directly without order by
Locate 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 I viewed the post, the attachment address that was not inserted in the post was read from the database every time.

Solve

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

Refresh the post in the order of the pictures just now, find the order is normal

The above is about the discuz of the whole content of the changes, I hope to be helpful to everyone.

http://www.bkjia.com/PHPjc/1039205.html www.bkjia.com true http://www.bkjia.com/PHPjc/1039205.html techarticle discuz Picture Order Confusion Solution, Discuz solution Description Discuz When posting a post, add multiple pictures, and then post directly, picture order sometimes will be messy even ...

  • 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.