Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Web System
>
BBS
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
899
Star
3.8K
Fork
1.5K
Discuz
/
DiscuzX
Code
Issues
112
Pull Requests
0
Wiki
Insights
Pipelines
Service
PHPDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
Don’t show this again
1127
修复当图片附件高度超过999px时,图片列表会因封面高度太长而影响页面排版的问题
Merged
ACGI:master
Discuz:master
ACGI
create on 2021-07-09 14:38
Clone/Download
HTTPS
SSH
Copy
Email Patch
Diff file
### **描述此 Pull Request 的变更** 文件1 位置 \source\function\function_forum.php 437行: `empty($_G['setting']['forumpicstyle']['thumbheight']) && $_G['setting']['forumpicstyle']['thumbheight'] = 999;` 改成 `empty($_G['setting']['forumpicstyle']['thumbheight']) && $_G['setting']['forumpicstyle']['thumbheight'] = 0;` 439行: `$_G['setting']['forumpicstyle'] = array('thumbwidth' => 203, 'thumbheight' => 999);` 改成 `$_G['setting']['forumpicstyle'] = array('thumbwidth' => 203, 'thumbheight' => 0);` 原版默认999px高度内的图片会自动根据图片尺寸调整并裁剪, 但是一旦图片高度超过999px, 封面高度不会根据原图尺寸调整, 而是直接取999px作为高度, 让封面变成一个高度999px的长条图,非常影响观感. 搞不懂dz为什么要把高度非要弄个999... 文件2 位置 \source\function\function_post.php 622行: `if(empty($_G['uid']) || !intval($_G['setting']['forumpicstyle']['thumbheight']) || !intval($_G['setting']['forumpicstyle']['thumbwidth'])) {` 改成: `if(empty($_G['uid']) || !intval($_G['setting']['forumpicstyle']['thumbwidth'])) {` 这里只需要判断封面宽度即可, 所以去掉了主题封面高度判断, 因为主题封面高度在未设置或为0时, class_image.php会根据原图尺寸自动调整图片比例. 文件3 位置 \source\admincp\admincp_counter.php 440和441行: ``` empty($_G['setting']['forumpicstyle']['thumbwidth']) && $_G['setting']['forumpicstyle']['thumbwidth'] = 214; empty($_G['setting']['forumpicstyle']['thumbheight']) && $_G['setting']['forumpicstyle']['thumbheight'] = 160; ``` 改成 ``` empty($_G['setting']['forumpicstyle']['thumbwidth']) && $_G['setting']['forumpicstyle']['thumbwidth'] = 203; empty($_G['setting']['forumpicstyle']['thumbheight']) && $_G['setting']['forumpicstyle']['thumbheight'] = 0; ``` 443行: `$_G['setting']['forumpicstyle'] = array('thumbwidth' => 214, 'thumbheight' => 160);` 改成 `$_G['setting']['forumpicstyle'] = array('thumbwidth' => 203, 'thumbheight' => 0);` 这里对应后台重建封面图片时用到. [管理后台>工具>更新统计] 宽度thumbwidth改成203, 对应后台设置主题封面宽度的默认值. 高度thumbheight为0时, 默认开启瀑布流. [管理后台>界面>界面设置>主题列表页>主题封面宽/高度] ### **描述变更理由** 这是版本遗留的问题, X3+应该都存在这个问题   希望这次PR用对了
This pull request needs to pass some approval items
Type
Assign personnel
Status
Reviewer
monkeye
湖中沉
DiscuzX
Pass review
LooTan
Discuz!
oldhuhu
comsenz-service
Completed
(1/1 )
How to merge Pull Request
git checkout master
git pull https://gitee.com/acgi/DiscuzX.git master
git push origin master
Comments
1
Commits
3
Files
3
Checks
Code problems
0
Bulk operation
Expand
Collapse
Reviewer
Code Owner
Reviewer
oldhuhu
forkmerge
comsenz-service
comsenz-service
奶罩
naizhao
老周部落
laozhoubuluo
popcorner
popcorner
Discuz
dismall
北北″
moxue
Hyman
guohui1301
云诺
yunnuowangluo
科站网
dzlab
monkeye
Discuzx
DiscuzX
3dming
LooTan
lootan
湖中沉
zoewho
Discuz!
ComsenzDiscuz
No Setting
Min number
1
Tester
oldhuhu
forkmerge
comsenz-service
comsenz-service
奶罩
naizhao
老周部落
laozhoubuluo
popcorner
popcorner
Discuz
dismall
北北″
moxue
Hyman
guohui1301
云诺
yunnuowangluo
科站网
dzlab
monkeye
Discuzx
DiscuzX
3dming
LooTan
lootan
湖中沉
zoewho
No Setting
Min number
0
Priority
Not specified
Serious
Main
Secondary
Unimportant
Label
Label settings
缺陷/BUG
Link Issue
No link issue
Successfully merged pull requests will close issues
Milestone
No related milestones
Participators
(1)
PHP
1
https://gitee.com/Discuz/DiscuzX.git
git@gitee.com:Discuz/DiscuzX.git
Discuz
DiscuzX
DiscuzX
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register