晋城吧对DiscuzX进行的前端优化要点

2019-04-09 15:33:42于丽

               'forum' => array('//static/js/common.js', '//static/js/home_friendselector.js', '//static/js/forum.js'),

                'home' => array('//static/js/common.js', '//static/js/home_friendselector.js', '//static/js/home_cookie.js', '//static/js/home_common.js', '//static/js/home_face.js', '//static/js/home_manage.js'),

                    'userapp' => array('//static/js/common.js', '//static/js/home_friendselector.js', '//static/js/forum.js', '//static/js/home_common.js'),

2.修改模板的header.htm

什么??这个文件在哪里????我被你们打败了。。

修改如下 ,将第一段代码 替换为第二段

相关文章 大家在看
<script type="text/javascript" src="{$_G[setting][jspath]}common.js?{VERHASH}"></script>
                    <script type="text/javascript" src="{$_G[setting][jspath]}home_friendselector.js?{VERHASH}"></script>
                    <!--{if $_G['basescript'] == 'forum' || $_G['basescript'] == 'group'}-->
                            <script type="text/javascript" src="{$_G[setting][jspath]}forum.js?{VERHASH}"></script>
                    <!--{elseif $_G['basescript'] == 'home'}-->
                           <script type="text/javascript" src="{$_G[setting][jspath]}home_cookie.js?{VERHASH}"></script>
                            <script type="text/javascript" src="{$_G[setting][jspath]}home_common.js?{VERHASH}"></script>
                            <script type="text/javascript" src="{$_G[setting][jspath]}home_face.js?{VERHASH}"></script>
                            <script type="text/javascript" src="{$_G[setting][jspath]}home_manage.js?{VERHASH}"></script>
                   <!--{elseif $_G['basescript'] == 'userapp'}-->
                          <script type="text/javascript" src="{$_G[setting][jspath]}home_common.js?{VERHASH}"></script>
                   <!--{elseif $_G['basescript'] == 'portal'}-->
                           <script type="text/javascript" src="{$_G[setting][jspath]}portal.js?{VERHASH}"></script>
                   <!--{/if}-->
                   <!--{if $_G['basescript'] != 'portal' && $_GET['diy'] == 'yes' && ($_G[mod] == 'topic' || $_G[group][allowdiy]) && !empty($_G['style']['tplfile'])}-->
                           <script type="text/javascript" src="{$_G[setting][jspath]}portal.js?{VERHASH}"></script>
                   <!--{/if}-->
                   <!--{if $_GET[diy] == 'yes' && ($_G[mod] == 'topic' || $_G[group][allowdiy]) && !empty($_G['style']['tplfile'])}-->{subtemplate common/css_diy}<!--{/if}-->