觸屏版圖片尺寸設置,打開\template\default\touch\forum\discuzcode.htm文件,找
- $fix = count($post[imagelist]) == 1 ? 140 : 83;
復制代碼 改為
- $fix = count($post[imagelist]) == 1 ? 650 : 800;
復制代碼 也就是把140的小圖改為寬650高800這樣,差不多是最大屏幕的手機的實際尺寸。這里建議電腦版的圖片上傳時就設置最大寬度不超過700,不然加載速度會很慢。然后再找
- $mobilethumburl = $attach['attachimg'] && $_G['setting']['showimages'] && (!$attach['price'] || $attach['payed']) && ($_G['group']['allowgetimage'] || $_G['uid'] == $attach['uid']) ? getforumimg($attach['aid'], 0, 140, 140, 'fixnone') : '' ;
復制代碼 改為
- $mobilethumburl = $attach['attachimg'] && $_G['setting']['showimages'] && (!$attach['price'] || $attach['payed']) && ($_G['group']['allowgetimage'] || $_G['uid'] == $attach['uid']) ? getforumimg($attach['aid'], 0, 650, 800, 'fixnone') : '' ;
復制代碼
CSS設置,打開\static\image\mobile\style.css,找
- .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 {max-width:98%; display:block;vertical-align: middle;margin-bottom:4px;}
復制代碼
CSS也限制了高和寬,改為按屏幕尺寸的百分比來顯示。為了不撐破,別搞100%了,98%就足夠了。
|