discuz 手机版发帖缩略图 大小调整

作者:老路 发表于:2020-05-28

手机版确实很方便,但是最近版本手机版在打开帖子图片自动显示为200px的缓存图片,分析了一下代码,终于找到了图片缩略图机制,找到以下文件:

手机模版里面找(你是否安装了其他手机模版):

\template\default\touch\forum\discuzcode.htm  大约在110行。

[os-copy]

unction attachinpost($attach) {
global $_G;
$attach['refcheck'] = (!$attach['remote'] && $_G['setting']['attachrefcheck']) || ($attach['remote'] && ($_G['setting']['ftp']['hideurl'] || ($attach['isimage'] && $_G['setting']['attachimgpost'] && strtolower(substr($_G['setting']['ftp']['attachurl'], 0, 3)) == 'ftp')));
$mobilethumburl = $attach['attachimg'] && $_G['setting']['showimages'] && (!$attach['price'] || $attach['payed']) && ($_G['group']['allowgetimage'] || $_G['uid'] == $attach['uid']) ? getforumimg($attach['aid'], 0,640, 640, 'fixnone') : '' ;
$aidencode = packaids($attach);
$is_archive = $_G['forum_thread']['is_archived'] ? '&fid='.$_G['fid'].'&archiveid='.$_G[forum_thread][archiveid] : '';
}

[/os-copy]

640, 640,为修改缩略图大小

plc .pi .message img,.plc .pi .img_one img { margin:0px 4px 0px 0;max-width:140px; max-height:140px;}  清晰度。

按自己所需情况改 例:.plc .pi .message img,.plc .pi .img_one img { margin:0px 4px 0px 0;width:100%; max-height:auto;}

版权声明

本文仅代表作者观点,不代表XX立场。
本文系作者授权百度百家发表,未经许可,不得转载。

分享:

扫一扫在手机阅读、分享本文