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