Table of Contents
discuz picture order confusion solution, discuz solution
Home Backend Development PHP Tutorial Discuz picture order confusion solution, discuz solution_PHP tutorial

Discuz picture order confusion solution, discuz solution_PHP tutorial

Jul 13, 2016 am 09:45 AM
discuz picture

discuz picture order confusion solution, discuz solution

Instructions

When discuz publishes a post, it adds multiple pictures and then publishes the post directly. The order of the pictures sometimes gets messed up
Even if the order of the images in the upload image window is correct, they will still be messed up after publishing

Analysis

Look at the url, you can’t see anything in the program code
Change the picture name to serial number and upload it. The order is messed up. Note the order of the messed up pictures in the post: 76123458
Then find the bbs_forum_attachment_1 table in the database and find that the default order is also this:

I don’t even sort by aid. When I could pick it up, I just picked it up without ordering by
Find the php that directly operates this table: sourceclasstabletable_forum_attachment_n.php
Through the writelog('filename','log') method, it is found that every time the post is refreshed, fetch_all_by_id, this method is executed once
It turns out that when viewing a post, the attachment address that is not inserted into the post must be read from the database every time

Solution

Modify the default parameters passed in the fetch_all_by_id method: order_by='aid'

Refresh the post where the order of the pictures was messed up and found that the order is normal

The above is all about the modification of discuz. I hope it can be helpful to everyone.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1039205.htmlTechArticlediscuz picture order confusion solution, discuz solution explains that when publishing a post, discuz adds multiple pictures, and then Post directly, the order of pictures will sometimes get messed up even though...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve the problem of automatically saving pictures when publishing on Xiaohongshu? Where is the automatically saved image when posting? How to solve the problem of automatically saving pictures when publishing on Xiaohongshu? Where is the automatically saved image when posting? Mar 22, 2024 am 08:06 AM

How to solve the problem of automatically saving pictures when publishing on Xiaohongshu? Where is the automatically saved image when posting?

How to post pictures in TikTok comments? Where is the entrance to the pictures in the comment area? How to post pictures in TikTok comments? Where is the entrance to the pictures in the comment area? Mar 21, 2024 pm 09:12 PM

How to post pictures in TikTok comments? Where is the entrance to the pictures in the comment area?

How to make ppt pictures appear one by one How to make ppt pictures appear one by one Mar 25, 2024 pm 04:00 PM

How to make ppt pictures appear one by one

What should I do if the images on the webpage cannot be loaded? 6 solutions What should I do if the images on the webpage cannot be loaded? 6 solutions Mar 15, 2024 am 10:30 AM

What should I do if the images on the webpage cannot be loaded? 6 solutions

How to arrange two pictures side by side in wps document How to arrange two pictures side by side in wps document Mar 20, 2024 pm 04:00 PM

How to arrange two pictures side by side in wps document

A must-have for Discuz users! Comprehensive analysis of renaming props! A must-have for Discuz users! Comprehensive analysis of renaming props! Mar 12, 2024 pm 10:15 PM

A must-have for Discuz users! Comprehensive analysis of renaming props!

How to rotate Word pictures How to rotate Word pictures Mar 19, 2024 pm 06:16 PM

How to rotate Word pictures

How to set pencil grayscale artistic effect on PPT pictures How to set pencil grayscale artistic effect on PPT pictures Mar 21, 2024 pm 02:51 PM

How to set pencil grayscale artistic effect on PPT pictures

See all articles