欢迎来到懒人模板!我们专注移动互联网,所有模板永久免费下载!
  • 首 页
  • 实现discuz论坛移动端手机版发帖缩略图大小调整的问题

    2018-05-04 10:44 来源/作者:懒人模板 分类:discuz教程  « »
    一、手机版修改方法:

    打开discuz论坛模板文件 \template\default\mobile\forum\discuzcode.htm  在页面上面搜索 200, 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] : '';
    }


    二、触屏版修改方法: 
    打开discuz论坛模板文件  \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,400, 400, 'fixnone') : '' ;
    $aidencode = packaids($attach);
    $is_archive = $_G['forum_thread']['is_archived'] ? '&fid='.$_G['fid'].'&archiveid='.$_G[forum_thread][archiveid] : '';
    }

     

    点击扫描效果预览免费下载免登陆网盘下载
    标签:
    * 懒人模板承诺:本站所有资源免费下载,无病毒,无弹窗,无干扰链接! 提点建议