discuz手機版 圖片縮略圖大小設置/修改清晰度
發布時間:2019-11-28 09:31:57 人瀏覽
來源: 橡膠技術網
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,/, ''); |
轉自:橡膠技術網,橡膠行業門戶網站!

橡膠技術網 www.m.jlxczjs.com!
>更多相關文章
- 論壇搬家后,上傳圖片時提示:服務器限制無法上傳那么大的附件的2022-01-31 06:01:43
- discuz 手機版縮略圖大小顯示修改2019-11-28 09:11:27
- discuz搬家,附件太大服務器無法上傳的原因2019-11-28 09:11:18
- discuz手機版 圖片縮略圖大小設置/修改清晰度2019-11-28 09:11:57
- 優秀建站系統2019-11-27 09:11:21
- 新聞頁面評論代碼2019-11-26 11:11:08
- 后臺新聞,增加新聞的編輯器高度,修改辦法2019-11-20 12:11:16
首頁推薦
最新新聞
網友評論
推薦閱讀
頭條新聞
價格行情
橡膠市場