• 注册
  • DISCUZ论坛程序 DISCUZ论坛程序 关注:5 内容:99

    Discuz导读页面的一些相关修改,希望能用到

  • 查看作者
  • 打赏作者
  • DISCUZ论坛程序
  • 关注公众号:“站长笔记”或“站长笔记网”;下载资源请登录电脑端体验更佳,站长笔记网域名:www.zzbj.net

    source\module\forum\forum_guide.php

    【导读标题】
    查找
    $navtitle = $lang['guide'].'-'.$lang['guide_'.$view];
    修改为
    $navtitle = '自定义-'.$lang['guide_'.$view];
    
    【支持DIY】 
    查找 include template('forum/guide');
    修改为 include template('diy:forum/guide');
    
    【翻页数】
    查找 $perpage = 50;  其中50修改为12
    
    【更新时间,一共连续4个】
    查找 $data['new'] = get_guide_list('new', 0, 30);  
    其中30修改为0
    
    查找
    $threadids[] = $thread['tid'];
    其下添加
    
            //调用导读帖子内容,调用除“我的帖子”之外
            include_once libfile('function/post');
            $thread['post'] = C::t('forum_post')->fetch_all_by_tid_position($thread['posttableid'],$thread['tid'],1);
            $thread['post'] = array_shift($thread['post']);
            $thread['message'] = messagecutstr($thread['post']['message'], 100);
    
    
    查找$theurl = 'forum.php?mod=guide&view='.$view;
    修改为$theurl = 'portal.php?mod=guide&view='.$view;
    
    打开source\class\table\table_forum_thread.php
    查找return DB::fetch_all("SELECT * FROM ".DB::table('forum_thread')." WHERE ".$tidsql.$addsql);
    其上添加 $tidsql.=" and fid in (2,3,4) and attachment=2";    
    其中2,3,4为你要调用的版块FID,多个版块用逗号隔开
    如果不限制调用图片,删除and attachment=2

    请登录之后再进行评论

    登录
  • 全站动态
  • 任务中心
  • 帖子间隔 侧栏位置: