discuz手机版 图片缩略图大小设置/修改清晰度

发布时间:2019-11-28 09:31:57   人浏览 来源: f88体育平台网

f88体育平台网 - 电脑科技


discuz手机版 图片缩略图大小设置/修改清晰度
\template\default\mobile\forum\discuzcode.htm和
\template\default\touch\forum\discuzcode.htm
找到discuzcode.htm文件,搜索“200”会有两处代码如下
 
function imagelist($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, 200, 200, 'fixnone') : '' ;
$aidencode = packaids($attach); $is_archive = $_G['forum_thread']['is_archived'] ?"&fid=".$_G['fid']."&archiveid=".$_G[forum_thread][archiveid] : ''; }
size参数改大了之后你再在手机上看效果,缩略图是不是变大了?
看看,是不是我的网站缩略图还是原来那么大(200PX),但是清晰度怎么异常高呢?还有个小窍门,暂且让我保留一会儿,呵呵~
 
找到 static/image/mobile/style.css
修改这段样式中的红色字体
.plc .pi .message img,.plc .pi .img_one img { margin:0px 4px 0px 0; max-width:300px; max-height:300px; }
 

Discuz! X3.4的触屏版是应用的html5 canvas接口进行处理图片的。
我们要修改的文件位于:/static/js/mobile/buildfileupload.js

修改329和330行:
var maxheight = 500;
var maxwidth = 500;

修改为:
var maxheight = 1000;
var maxwidth = 3000;

修改第372行:
var newdataurl = canvas.toDataURL(s.files[0].type).replace(/data:.+;base64,/, '');

修改为:
var newdataurl = canvas.toDataURL(s.files[0].type,1.0).replace(/data:.+;base64,/, '');


转f88体育:f88体育平台网,橡胶行业门户网站!

f88体育平台网 www.z831u.com!
>更多相关文章
网友评论

首页 | 橡胶新闻 | 橡胶价格 | 市场数据 | f88体育平台 | 资料下载 | 橡胶文化 | 橡胶标准 | 橡胶制品 | 橡胶管理 | 橡胶展会 | 胶网图片 | | |
联系电话:021-59195925 咨询合作:13524284813 邮箱:[email protected] f88体育平台网_橡胶门户网微信订阅号 QQ: 36656166
橡胶门户网 Copyright 2006-2020 胶网版权所有