discuz 手机版发帖缩略图 大小调整
手机版确实很方便,但是最近版本手机版在打开帖子图片自动显示为200px的缓存图片,分析了一下代码,终于找到了图片缩略图机制,找到以下文件:
手机模版里面找(你是否安装了其他手机模版):
\template\default\touch\forum\discuzcode.htm 大约在110行。
function 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] : '';
}
红色字为修改缩略图大小。
.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;}
手机模版里面找(你是否安装了其他手机模版):
\template\default\touch\forum\discuzcode.htm 大约在110行。
function 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] : '';
}
红色字为修改缩略图大小。
.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;}