Discuz Image order disorder solution, discuz solution. Discuz Image order disorder solution. discuz solution description: when posting a post, discuz adds multiple images and then directly posts the post, the image order is sometimes messy, even if the discuz Image order is chaotic, the discuz solution
Description
When posting a post, discuz adds multiple images and then publishes the post directly. The image order is sometimes messy.
Even if the image order in the uploaded image window is correct, the image will still be out of order after the image is published.
Analysis
Look at the url, the program code does not see anything
Change the image name to the serial number for uploading. The order of the disordered images in the post is: 76123458.
Then find the bbs_forum_attachment_1 table in the database, and find the default order as follows:
It is not sorted by aid. it is possible that order by is not obtained directly.
Find the php: source \ class \ table \ table_forum_attachment_n.php directly operating on this table.
Through the writelog ('filename ', 'log') method, it is found that every time a post is refreshed, fetch_all_by_id, this method is executed once
When viewing the post, the attachments that are not inserted into the post must be read from the database every time.
Solution
Modify the input default parameters of the fetch_all_by_id method:Order_by = 'aid'
Refresh the posts with disordered Image order and find that the order is normal.
The above is all about discuz modification, and I hope it will be helpful to you.
When posting a post, discuz adds multiple images and then publishes the post directly. The image order sometimes gets out of order even if...