找回密码
 立即注册
搜索
查看: 1859|回复: 0

【discuz x3.1教程】discuz.htm 论坛首页分标段详解析

[复制链接]

581

主题

110

回帖

4066

积分

管理员

积分
4066

众神之神

发表于 2014-11-15 12:17:26 | 显示全部楼层 |阅读模式
下面这段的主要意思是:如果没有板块ID并且设置了站点公告,就显示站点公告 展示面包屑导航
  1. <!--{template common/header}-->
  2. <!-- 引入头部文件 -->

  3. <!--
  4. 如果没有板块ID并且设置了站点公告,就显示站点公告
  5. {lang announcements}:公告
  6. $announcements:展示站点公告标题带超链接,以及发布站点公告的时间
  7. {lang homepage}:首页
  8. $_G[setting][bbname]:站点名称
  9. {$_G[setting][navs][2][navname]}:论坛(即当前所属导航栏目)
  10. $navigation:面包屑导航
  11. -->

  12. <div id="pt" class="bm cl">
  13.         <!--{if empty($gid) && $announcements}-->
  14.         <div class="y">
  15.                 <div id="an">
  16.                         <dl class="cl">
  17.                                 <dt class="z xw1">{lang announcements}: </dt>
  18.                                 <dd>
  19.                                         <div id="anc"><ul id="ancl">$announcements</ul></div>
  20.                                 </dd>
  21.                         </dl>
  22.                 </div>
  23.                 <script type="text/javascript">announcement();</script>
  24.         </div>
  25.         <!--{/if}-->
  26.         <div class="z">
  27.                 <a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a><em>»</em><a href="forum.php">{$_G[setting][navs][2][navname]}</a>$navigation
  28.         </div>
  29.         <div class="z"><!--{hook/index_status_extra}--></div>
  30. </div>
复制代码

下面这段的主要意思是在头部放置一个广告,和一个DIY文件
  1. <!--
  2. 这个地方是一个广告
  3. 具体设置为:后台-运营-站点广告-门户/论坛/群组/空间 格子广告
  4. -->
  5. <!--{if empty($gid)}-->
  6.         <!--{ad/text/wp a_t}-->
  7. <!--{/if}-->

  8.         <style id="diy_style" type="text/css"></style>
  9. <!-- 这个地方开始放置DIY文件 -->
  10. <!--{if empty($gid)}-->
  11.         <div class="wp">
  12.                 <!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
  13.         </div>
  14. <!--{/if}-->
复制代码

下面这段主要显示了今日: 0|昨日: 1|帖子: 1|会员: 1|欢迎新会员: admin,以及左侧我的帖子,最新回复字样
  1. <!--
  2. $_G['setting']['forumallowside']:是否开启侧边栏(具体设置:首台-界面-界面设置-论坛首页-选择显示边栏)
  3. 如果没有板块ID即板块不存在则显示是今日: 0|昨日: 1|帖子: 1|会员: 1|欢迎新会员: admin
  4. {lang index_today}:今日
  5. $todayposts:今天的发帖量
  6. {lang index_yesterday}:昨日
  7. $postdata[0]:昨天的发帖量
  8. {lang index_posts}:帖子
  9. $posts:论坛发帖的总量
  10. {lang index_members}:会员
  11. $_G['cache']['userstats']['totalmembers']:论坛会员数量
  12. {lang welcome_new_members}:欢迎新会员
  13. $_G['cache']['userstats']['newsetuser']:新注册的会员名
  14. $_G['uid']:当前用的uid值
  15. {lang my_posts}:我的帖子
  16. {lang show_newthreads}:最新回复
  17. 如果有新会员注册,则显示新会员名字
  18. $_G['uid']:当前用的uid值,如果是登录状态,则显示我的帖子字样
  19. 如果用户的情况下会显示|并且显示{lang show_newthreads}最新回复
  20. -->
  21. <div id="ct" class="wp cl{if $_G['setting']['forumallowside']} ct2{/if}">
  22.         <!--{if empty($gid)}-->
  23.                 <div id="chart" class="bm bw0 cl">
  24.                         <p class="chart z">{lang index_today}: <em>$todayposts</em><span class="pipe">|</span>{lang index_yesterday}: <em>$postdata[0]</em><span class="pipe">|</span>{lang index_posts}: <em>$posts</em><span class="pipe">|</span>{lang index_members}: <em>$_G['cache']['userstats']['totalmembers']</em><!--{if $_G['cache']['userstats']['newsetuser']}--><span class="pipe">|</span>{lang welcome_new_members}: <em><a href="home.php?mod=space&username={echo rawurlencode($_G['cache']['userstats']['newsetuser'])}" target="_blank" class="xi2">$_G['cache']['userstats']['newsetuser']</a></em><!--{/if}--></p>
  25.                         <div class="y">
  26.                                 <!--{hook/index_nav_extra}-->
  27.                                 <!--{if $_G['uid']}--><a href="forum.php?mod=guide&view=my" title="{lang my_posts}" class="xi2">{lang my_posts}</a><!--{/if}--><!--{if !empty($_G['setting']['search']['forum']['status'])}--><!--{if $_G['uid']}--><span class="pipe">|</span><!--{/if}--><a href="forum.php?mod=guide&view=new" title="{lang show_newthreads}" class="xi2">{lang show_newthreads}</a><!--{/if}-->
  28.                         </div>
  29.                 </div>
  30.         <!--{/if}-->
  31.         <!-- 这个地方放置一个DIY文件 -->
  32.         <!--[diy=diy_chart]--><div id="diy_chart" class="area"></div><!--[/diy]-->
复制代码

下面是首页四格的主要展现形式,最新主题,最新回复,热帖,精华帖子的展现形式基本一样
  1. <!--{if !$_G['setting']['grid']['gridtype']}-->展示风格图文并茂
  2. <!--{if $_G['setting']['grid']['gridtype']}-->展示风格简洁文字
复制代码
  1. <div class="mn">
  2.                 <!--
  3.                  $_G['setting']['grid']['showgrid']:如果在后台开启了首页四格
  4.                  $_G['setting']['grid']['gridtype']:如果有数据,即:有图片
  5.                  {lang latest_images}:最新图片
  6.                  {lang collection_lastthread}:最新主题
  7.                  {lang show_newthreads}:最新回复
  8.                  {lang hot_thread}:热帖
  9.                  {lang post_digest_thread}:精华帖子
  10.                  -->

  11.                 <!--{if !empty($_G['setting']['grid']['showgrid'])}-->
  12.                 <!-- index four grid -->
  13.                 <div class="fl bm">
  14.                         <div class="bm bmw cl">
  15.                                 <div id="category_grid" class="bm_c" >
  16.                                         <table cellspacing="0" cellpadding="0"><tr>
  17.                                         <!--{if !$_G['setting']['grid']['gridtype']}-->
  18.                                                 <td valign="top" class="category_l1">
  19.                                                         <div class="newimgbox">
  20.                                                                 <h4><span class="tit_newimg"></span>{lang latest_images}</h4>
  21.                                                                 <div class="module cl slidebox_grid" style="width:218px">
  22.                                                                         <script type="text/javascript">
  23.                                                                         var slideSpeed = 5000;
  24.                                                                         var slideImgsize = [218,200];
  25.                                                                         var slideBorderColor = '{$_G['style']['specialborder']}';
  26.                                                                         var slideBgColor = '{$_G['style']['commonbg']}';
  27.                                                                         var slideImgs = new Array();
  28.                                                                         var slideImgLinks = new Array();
  29.                                                                         var slideImgTexts = new Array();
  30.                                                                         var slideSwitchColor = '{$_G['style']['tabletext']}';
  31.                                                                         var slideSwitchbgColor = '{$_G['style']['commonbg']}';
  32.                                                                         var slideSwitchHiColor = '{$_G['style']['specialborder']}';
  33.                                                                         {eval $k = 1;}
  34.                                                                         <!--{loop $grids['slide'] $stid $svalue}-->
  35.                                                                                 slideImgs[<!--{echo $k}-->] = '$svalue[image]';
  36.                                                                                 slideImgLinks[<!--{echo $k}-->] = '{$svalue[url]}';
  37.                                                                                 slideImgTexts[<!--{echo $k}-->] = '$svalue[subject]';
  38.                                                                                 {eval $k++;}
  39.                                                                         <!--{/loop}-->
  40.                                                                         </script>
  41.                                                                         <script language="javascript" type="text/javascript" src="{$_G[setting][jspath]}forum_slide.js?{VERHASH}"></script>
  42.                                                                 </div>
  43.                                                         </div>
  44.                                                 </td>
  45.                                         <!--{/if}-->
  46.                                         <!--
  47.                                         下面是最新主题
  48.                                         $grids['newthread']是一个数组里面包含了最新发布的主题标题,作者还有发布时间等等
  49.                                          -->
  50.                                         <td valign="top" class="category_l2">
  51.                                                 <div class="subjectbox">
  52.                                                         <h4><span class="tit_subject"></span>{lang collection_lastthread}</h4>
  53.                                                 <ul class="category_newlist">
  54.                                                         <!--{loop $grids['newthread'] $thread}-->
  55.                                                                 <!-- 如果没有最新主题的时候会显示下面的 -->
  56.                                                         <!--{if !$thread['forumstick'] && $thread['closed'] > 1 && ($thread['isgroup'] == 1 || $thread['fid'] != $_G['fid'])}-->
  57.                                                                         <!--{eval $thread[tid]=$thread[closed];}-->
  58.                                                                 <!--{/if}-->
  59.                                                                 <!--
  60.                                                                 下面三个if判断意思依次是
  61.                                                                 是否显示主题高亮
  62.                                                                 是否显示帖子信息
  63.                                                                 是否在新窗口打开
  64.                                                                 -->
  65.                                                                 <li><a href="forum.php?mod=viewthread&tid=$thread[tid]&extra=$extra"
  66.                                                                 {if $thread['highlight']} $thread['highlight']{/if}
  67.                                                                 {if $_G['setting']['grid']['showtips']}
  68.                                                                  tip="{lang title}: <strong>$thread[oldsubject]</strong><br/>{lang author}: $thread[author] ($thread[dateline])<br/>{lang show}/{lang reply}: $thread[views]/$thread[replies]" onmouseover="showTip(this)"{else} title="$thread[oldsubject]"
  69.                                                                  {/if}
  70.                                                                  {if $_G['setting']['grid']['targetblank']} target="_blank"{/if}>
  71.                                                                  $thread[subject]
  72.                                                                  </a></li>
  73.                                                                 <!--{/loop}-->
  74.                                                  </ul>
  75.                                          </div>
  76.                                         </td>
复制代码
  1. <!--
  2.                                         下面这段是最新回复
  3.                                         $grids['newreply']是一个数组,里面包含了最新回复的文章标题,回复时间,以及作者等等
  4.                                         -->

  5.                                         <td valign="top" class="category_l3">
  6.                                                 <div class="replaybox">
  7.                                                         <h4><span class="tit_replay"></span>{lang show_newthreads}</h4>
  8.                                                 <ul class="category_newlist">
  9.                                                         <!--{loop $grids['newreply'] $thread}-->
  10.                                                         <!-- 如果没有回复的时候会显示下面的 -->
  11.                                                         <!--{if !$thread['forumstick'] && $thread['closed'] > 1 && ($thread['isgroup'] == 1 || $thread['fid'] != $_G['fid'])}-->
  12.                                                                         <!--{eval $thread[tid]=$thread[closed];}-->
  13.                                                                 <!--{/if}-->
  14.                                                                 <!--
  15.                                                                 下面三个if判断意思依次是
  16.                                                                 是否显示主题高亮
  17.                                                                 是否显示帖子信息
  18.                                                                 是否在新窗口打开
  19.                                                                 -->
  20.                                                                 <li><a href="forum.php?mod=redirect&tid=$thread[tid]&goto=lastpost#lastpost"
  21.                                                                 {if $thread['highlight']} $thread['highlight']{/if}
  22.                                                                 {if $_G['setting']['grid']['showtips']}tip="{lang title}: <strong>$thread[oldsubject]</strong><br/>{lang author}: $thread[author] ($thread[dateline])<br/>{lang show}/{lang reply}: $thread[views]/$thread[replies]" onmouseover="showTip(this)"{else} title="$thread[oldsubject]"{/if}
  23.                                                                 {if $_G['setting']['grid']['targetblank']} target="_blank"{/if}>$thread[subject]</a></li>
  24.                                                                 <!--{/loop}-->
  25.                                                  </ul>
  26.                                          </div>
  27.                                         </td>
  28.                                         <td valign="top" class="category_l3">
  29.                                                 <div class="hottiebox">
  30.                                                         <h4><span class="tit_hottie"></span>{lang hot_thread}</h4>
  31.                                                 <ul class="category_newlist">
  32.                                                         <!--{loop $grids['hot'] $thread}-->
  33.                                                         <!--{if !$thread['forumstick'] && $thread['closed'] > 1 && ($thread['isgroup'] == 1 || $thread['fid'] != $_G['fid'])}-->
  34.                                                                         <!--{eval $thread[tid]=$thread[closed];}-->
  35.                                                                 <!--{/if}-->
  36.                                                                 <li><a href="forum.php?mod=viewthread&tid=$thread[tid]&extra=$extra"{if $thread['highlight']} $thread['highlight']{/if}{if $_G['setting']['grid']['showtips']} tip="{lang title}: <strong>$thread[oldsubject]</strong><br/>{lang author}: $thread[author] ($thread[dateline])<br/>{lang show}/{lang reply}: $thread[views]/$thread[replies]" onmouseover="showTip(this)"{else} title="$thread[oldsubject]"{/if}{if $_G['setting']['grid']['targetblank']} target="_blank"{/if}>$thread[subject]</a></li>
  37.                                                                 <!--{/loop}-->
  38.                                                  </ul>
  39.                                          </div>
  40.                                         </td>
复制代码

下面这句是在后台设置开启了论坛热点的情况下会显示
  1. <!--
  2.                 $_G['cache']['heats']['message']:如果后台开启了论坛热点
  3.                 {lang hotthreads_forum}:论坛热点
  4.                 $_G['cache']['heats']['message']是一个数组里面包含了热点帖子ID 发布时间 帖子标题 帖子描述 tag标签等等;
  5.                 $data[subject]:热点文章标题
  6.                 $data[subject]:热点描述
  7.                  -->
  8.                 <!--{if !empty($_G['cache']['heats']['message'])}-->
  9.                         <div class="bm">
  10.                                 <div class="bm_h cl">
  11.                                         <h2>{lang hotthreads_forum}</h2>
  12.                                 </div>
  13.                                 <div class="bm_c cl">
  14.                                         <div class="heat z">
  15.                                                 <!--{loop $_G['cache']['heats']['message'] $data}-->
  16.                                                         <dl class="xld">
  17.                                                                 <!-- 如果是管理员状态,会显示删除状态 -->
  18.                                                                 <dt><!--{if $_G['adminid'] == 1}--><a class="d" href="forum.php?mod=misc&action=removeindexheats&tid=$data[tid]" onclick="return removeindexheats()">delete</a><!--{/if}-->
  19.                                                                 <a href="forum.php?mod=viewthread&tid=$data[tid]" target="_blank" class="xi2">$data[subject]</a></dt>
  20.                                                                 <dd>$data[message]</dd>
  21.                                                         </dl>
  22.                                                 <!--{/loop}-->
  23.                                         </div>
  24.                                         <ul class="xl xl1 heatl">
  25.                                         <!--{loop $_G['cache']['heats']['subject'] $data}-->
  26.                                                 <li><!--{if $_G['adminid'] == 1}--><a class="d" href="forum.php?mod=misc&action=removeindexheats&tid=$data[tid]" onclick="return removeindexheats()">delete</a><!--{/if}-->· <a href="forum.php?mod=viewthread&tid=$data[tid]" target="_blank" class="xi2">$data[subject]</a></li>
  27.                                         <!--{/loop}-->
  28.                                         </ul>
  29.                                 </div>
  30.                         </div>
  31.                 <!--{/if}-->
复制代码

下面我订阅的专辑显示界面
  1. <!--
  2.                 下面我订阅的专辑显示界面
  3.                 {lang my_order_collection}:我订阅的专辑
  4.                  -->
  5.                  <!--
  6.                  $_G[setting][anonymoustext]:匿名
  7.                  {lang forum_threads}主题
  8.                  {lang collection_commentnum}: 评论
  9.                  {lang forum_lastpost}: 最后发表
  10.                  {lang never}: 从未
  11.                   -->
  12.                 <div class="fl bm">
  13.                         <!--{if !empty($collectiondata['follows'])}-->

  14.                         <!--{eval $forumscount = count($collectiondata['follows']);}-->
  15.                         <!--{eval $forumcolumns = 4;}-->

  16.                         <!--{eval $forumcolwidth = (floor(100 / $forumcolumns) - 0.1).'%';}-->
  17.                         <div class="bm bmw {if $forumcolumns} flg{/if} cl">
  18.                                 <div class="bm_h cl">
  19.                                         <span class="o">
  20.                                                 <img id="category_-1_img" src="{IMGDIR}/$collapse['collapseimg_-1']" title="{lang spread}" alt="{lang spread}" onclick="toggle_collapse('category_-1');" />
  21.                                         </span>
  22.                                         <h2><a href="forum.php?mod=collection&op=my">{lang my_order_collection}</a></h2>
  23.                                 </div>
  24.                                 <div id="category_-1" class="bm_c" style="{echo $collapse['category_-1']}">
  25.                                         <table cellspacing="0" cellpadding="0" class="fl_tb">
  26.                                                 <tr>
  27.                                                 <!--{eval $ctorderid = 0;}-->
  28.                                                 <!--{loop $collectiondata['follows'] $key $colletion}-->
  29.                                                         <!--{if $ctorderid && ($ctorderid % $forumcolumns == 0)}-->
  30.                                                                 </tr>
  31.                                                                 <!--{if $ctorderid < $forumscount}-->
  32.                                                                         <tr class="fl_row">
  33.                                                                 <!--{/if}-->
  34.                                                         <!--{/if}-->
  35.                                                         <td class="fl_g"{if $forumcolwidth} width="$forumcolwidth"{/if}>
  36.                                                                 <div class="fl_icn_g">
  37.                                                                 <a href="forum.php?mod=collection&action=view&ctid={$colletion[ctid]}" target="_blank"><img src="{IMGDIR}/forum{if $followcollections[$key]['lastvisit'] < $colletion['lastupdate']}_new{/if}.gif" alt="$colletion[name]" /></a>
  38.                                                                 </div>
  39.                                                                 <dl>
  40.                                                                         <dt><a href="forum.php?mod=collection&action=view&ctid={$colletion[ctid]}">$colletion[name]</a></dt>
  41.                                                                         <dd><em>{lang forum_threads}: <!--{echo dnumber($colletion[threadnum])}--></em>, <em>{lang collection_commentnum}: <!--{echo dnumber($colletion[commentnum])}--></em></dd>
  42.                                                                         <dd>
  43.                                                                         <!--{if $colletion['lastpost']}-->
  44.                                                                                 <!--{if $forumcolumns < 3}-->
  45.                                                                                         <a href="forum.php?mod=redirect&tid=$colletion[lastpost]&goto=lastpost#lastpost" class="xi2"><!--{echo cutstr($colletion[lastsubject], 30)}--></a> <cite><!--{date($colletion[lastposttime])}--> <!--{if $colletion['lastposter']}-->$colletion['lastposter']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
  46.                                                                                 <!--{else}-->
  47.                                                                                         <a href="forum.php?mod=redirect&tid=$colletion[lastpost]&goto=lastpost#lastpost">{lang forum_lastpost}: <!--{date($colletion[lastposttime])}--></a>
  48.                                                                                 <!--{/if}-->
  49.                                                                         <!--{else}-->
  50.                                                                                 {lang never}
  51.                                                                         <!--{/if}-->
  52.                                                                         </dd>
  53.                                                                         <!--{hook/index_followcollection_extra $colletion[ctid]}-->
  54.                                                                 </dl>
  55.                                                         </td>
  56.                                                         <!--{eval $ctorderid++;}-->

  57.                                                 <!--{/loop}-->
  58.                                                 <!--{if ($columnspad = $ctorderid % $forumcolumns) > 0}--><!--{echo str_repeat('<td class="fl_g"'.($forumcolwidth ? " width="$forumcolwidth"" : '').'></td>', $forumcolumns - $columnspad);}--><!--{/if}-->
  59.                                                 </tr>
  60.                                         </table>

  61.                                 </div>
  62.                         </div>
  63.                         <!--{/if}-->
复制代码

下面这段显示的是我收藏的版块和私密版块,需要再后台设置
  1. <!--
  2.                         下面这段显示的是我收藏的版块和私密版块
  3.                         {lang forum_myfav}:我收藏的版块
  4.                         {lang private_forum}:私密版块
  5.                          -->

  6.                         <!--{if empty($gid) && !empty($forum_favlist)}-->
  7.                         <!--{eval $forumscount = count($forum_favlist);}-->
  8.                         <!--{eval $forumcolumns = $forumscount > 3 ? ($forumscount == 4 ? 4 : 5) : 1;}-->

  9.                         <!--{eval $forumcolwidth = (floor(100 / $forumcolumns) - 0.1).'%';}-->

  10.                         <div class="bm bmw {if $forumcolumns} flg{/if} cl">
  11.                                 <div class="bm_h cl">
  12.                                         <span class="o">
  13.                                                 <img id="category_0_img" src="{IMGDIR}/$collapse['collapseimg_0']" title="{lang spread}" alt="{lang spread}" onclick="toggle_collapse('category_0');" />
  14.                                         </span>
  15.                                         <h2><a href="home.php?mod=space&do=favorite&type=forum">{lang forum_myfav}</a></h2>
  16.                                 </div>
  17.                                 <div id="category_0" class="bm_c" style="{echo $collapse['category_0']}">
  18.                                         <table cellspacing="0" cellpadding="0" class="fl_tb">
  19.                                                 <tr>
  20.                                                 <!--{eval $favorderid = 0;}-->
  21.                                                 <!--{loop $forum_favlist $key $favorite}-->
  22.                                                 <!--{if $favforumlist[$favorite[id]]}-->
  23.                                                 <!--{eval $forum=$favforumlist[$favorite[id]];}-->
  24.                                                 <!--{eval $forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];}-->
  25.                                                         <!--{if $forumcolumns>1}-->
  26.                                                                 <!--{if $favorderid && ($favorderid % $forumcolumns == 0)}-->
  27.                                                                         </tr>
  28.                                                                         <!--{if $favorderid < $forumscount}-->
  29.                                                                                 <tr class="fl_row">
  30.                                                                         <!--{/if}-->
  31.                                                                 <!--{/if}-->
  32.                                                                 <td class="fl_g"{if $forumcolwidth} width="$forumcolwidth"{/if}>
  33.                                                                         <div class="fl_icn_g"{if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="width: {$forum[extra][iconwidth]}px;"{/if}>
  34.                                                                         <!--{if $forum[icon]}-->
  35.                                                                                 $forum[icon]
  36.                                                                         <!--{else}-->
  37.                                                                                 <a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}><img src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="$forum[name]" /></a>
  38.                                                                         <!--{/if}-->
  39.                                                                         </div>
  40.                                                                         <dl{if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="margin-left: {$forum[extra][iconwidth]}px;"{/if}>
  41.                                                                                 <dt><a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}{if $forum[extra][namecolor]} style="color: {$forum[extra][namecolor]};"{/if}>$forum[name]</a><!--{if $forum[todayposts] && !$forum['redirect']}--><em class="xw0 xi1" title="{lang forum_todayposts}"> ($forum[todayposts])</em><!--{/if}--></dt>
  42.                                                                                 <!--{if empty($forum[redirect])}--><dd><em>{lang forum_threads}: <!--{echo dnumber($forum[threads])}--></em>, <em>{lang forum_posts}: <!--{echo dnumber($forum[posts])}--></em></dd><!--{/if}-->
  43.                                                                                 <dd>
  44.                                                                                 <!--{if $forum['permission'] == 1}-->
  45.                                                                                         {lang private_forum}
  46.                                                                                 <!--{else}-->
  47.                                                                                         <!--{if $forum['redirect']}-->
  48.                                                                                                 <a href="$forumurl" class="xi2">{lang url_link}</a>
  49.                                                                                         <!--{elseif is_array($forum['lastpost'])}-->
  50.                                                                                                 <!--{if $forumcolumns < 3}-->
  51.                                                                                                         <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="xi2"><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
  52.                                                                                                 <!--{else}-->
  53.                                                                                                         <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost">{lang forum_lastpost}: $forum[lastpost][dateline]</a>
  54.                                                                                                 <!--{/if}-->
  55.                                                                                         <!--{else}-->
  56.                                                                                                 {lang never}
  57.                                                                                         <!--{/if}-->
  58.                                                                                 <!--{/if}-->
  59.                                                                                 </dd>
  60.                                                                                 <!--{hook/index_favforum_extra $forum[fid]}-->
  61.                                                                         </dl>
  62.                                                                 </td>
  63.                                                                 <!--{eval $favorderid++;}-->
  64.                                                         <!--{else}-->
  65.                                                                 <td class="fl_icn" {if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="width: {$forum[extra][iconwidth]}px;"{/if}>
  66.                                                                         <!--{if $forum[icon]}-->
  67.                                                                                 $forum[icon]
  68.                                                                         <!--{else}-->
  69.                                                                                 <a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}><img src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="$forum[name]" /></a>
  70.                                                                         <!--{/if}-->
  71.                                                                 </td>
  72.                                                                 <td>
  73.                                                                         <h2><a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}{if $forum[extra][namecolor]} style="color: {$forum[extra][namecolor]};"{/if}>$forum[name]</a><!--{if $forum[todayposts] && !$forum['redirect']}--><em class="xw0 xi1" title="{lang forum_todayposts}"> ($forum[todayposts])</em><!--{/if}--></h2>
  74.                                                                         <!--{if $forum[description]}--><p class="xg2">$forum[description]</p><!--{/if}-->
  75.                                                                         <!--{if $forum['subforums']}--><p>{lang forum_subforums}: $forum['subforums']</p><!--{/if}-->
  76.                                                                         <!--{if $forum['moderators']}--><p>{lang forum_moderators}: <span class="xi2">$forum[moderators]</span></p><!--{/if}-->
  77.                                                                         <!--{hook/index_favforum_extra $forum[fid]}-->
  78.                                                                 </td>
  79.                                                                 <td class="fl_i">
  80.                                                                         <!--{if empty($forum[redirect])}--><span class="xi2"><!--{echo dnumber($forum[threads])}--></span><span class="xg1"> / <!--{echo dnumber($forum[posts])}--></span><!--{/if}-->
  81.                                                                 </td>
  82.                                                                 <td class="fl_by">
  83.                                                                         <div>
  84.                                                                         <!--{if $forum['permission'] == 1}-->
  85.                                                                                 {lang private_forum}
  86.                                                                         <!--{else}-->
  87.                                                                                 <!--{if $forum['redirect']}-->
  88.                                                                                         <a href="$forumurl" class="xi2">{lang url_link}</a>
  89.                                                                                 <!--{elseif is_array($forum['lastpost'])}-->
  90.                                                                                         <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="xi2"><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
  91.                                                                                 <!--{else}-->
  92.                                                                                         {lang never}
  93.                                                                                 <!--{/if}-->
  94.                                                                         <!--{/if}-->
  95.                                                                         </div>
  96.                                                                 </td>
  97.                                                         </tr>
  98.                                                         <tr class="fl_row">

  99.                                                         <!--{/if}-->
  100.                                                 <!--{/if}-->
  101.                                                 <!--{/loop}-->
  102.                                                 <!--{if ($columnspad = $favorderid % $forumcolumns) > 0}--><!--{echo str_repeat('<td class="fl_g"'.($forumcolwidth ? " width="$forumcolwidth"" : '').'></td>', $forumcolumns - $columnspad);}--><!--{/if}-->
  103.                                                 </tr>
  104.                                         </table>

  105.                                 </div>
  106.                         </div>
  107.                         <!--{ad/intercat/bm a_c/-1}-->
  108.                 <!--{/if}-->
复制代码


下面显示各个板块的详细信息,主要有允许横排,和不允许横排的情况,可以在后台设置
第一种情况允许横排显示
  1. <!--
  2.                 下面这段就开始显示各版块的详细信息了。
  3.                 $catlist是一个数组,里面包含各版块的名字,还有分区版主等等。
  4.                 {lang spread}:收起/展开
  5.                 {IMGDIR}/$cat[collapseimg]:收起和展开的图标collapsed_no.gif为收起collapsed_yes.gif为展开图标
  6.                 $cat['moderators']:分区版主
  7.                 如果有分区版主的话,就显示分区版主
  8.                 $cat[name]:大区的名字
  9.                 $cat[forums]:是一个数组,里面包含了每一个大区下分类版块的id,也就是fid
  10.                 $forum:是一个数组,里面包含了当前大区下每一个版块的名字,以及发帖量,最后一篇发帖文章还有发帖时间。
  11.                 $cat['forumcolumns']: 如果下级子版块横排数为0则按下面版式来显示版块列表,横排数可在后台设置的
  12.                 $forum[icon]:版块图标
  13.                  -->
  14.                 <!--{loop $catlist $key $cat}-->
  15.                         <!--{hook/index_catlist $cat[fid]}-->
  16.                         <div class="bm bmw {if $cat['forumcolumns']} flg{/if} cl">
  17.                                 <div class="bm_h cl">
  18.                                         <span class="o">
  19.                                                 <img id="category_$cat[fid]_img" src="{IMGDIR}/$cat[collapseimg]" title="{lang spread}" alt="{lang spread}" onclick="toggle_collapse('category_$cat[fid]');" />
  20.                                         </span>
  21.                                         <!--{if $cat['moderators']}--><span class="y">{lang forum_category_modedby}: $cat[moderators]</span><!--{/if}-->
  22.                                         <!--{eval $caturl = !empty($cat['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$cat['domain'].'.'.$_G['setting']['domain']['root']['forum'] : '';}-->
  23.                                         <h2><a href="{if !empty($caturl)}$caturl{else}forum.php?gid=$cat[fid]{/if}" style="{if $cat[extra][namecolor]}color: {$cat[extra][namecolor]};{/if}">$cat[name]</a></h2>
  24.                                 </div>
  25.                                 <div id="category_$cat[fid]" class="bm_c" style="{echo $collapse['category_'.$cat[fid]]}">
  26.                                         <table cellspacing="0" cellpadding="0" class="fl_tb">
  27.                                                 <tr>
  28.                                                 <!--{loop $cat[forums] $forumid}-->
  29.                                                 <!--{eval $forum=$forumlist[$forumid];}-->
  30.                                                 <!--{eval $forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];}-->
  31.                                                 <!--{if $cat['forumcolumns']}-->
  32.                                                         <!--{if $forum['orderid'] && ($forum['orderid'] % $cat['forumcolumns'] == 0)}-->
  33.                                                                 </tr>
  34.                                                                 <!--{if $forum['orderid'] < $cat['forumscount']}-->
  35.                                                                         <tr class="fl_row">
  36.                                                                 <!--{/if}-->
  37.                                                         <!--{/if}-->
  38.                                                         <td class="fl_g" width="$cat[forumcolwidth]">
  39.                                                                 <div class="fl_icn_g"{if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="width: {$forum[extra][iconwidth]}px;"{/if}>
  40.                                                                 <!--{if $forum[icon]}-->
  41.                                                                         $forum[icon]
  42.                                                                 <!--{else}-->
  43.                                                                         <a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}><img src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="$forum[name]" /></a>
  44.                                                                 <!--{/if}-->
  45.                                                                 </div>
  46.                                                                 <!--
  47.                                                                 $forum[todayposts]:本版块今天发帖的数量,
  48.                                                                 {lang forum_threads}:主题
  49.                                                                 $forum[threads]:所有主题的数量
  50.                                                                 {lang forum_posts}:帖数
  51.                                                                 $forum[posts]:所有贴数的数量
  52.                                                                 {lang private_forum}:私密版块
  53.                                                                 如果版块设置了权限,就会显示私密权限
  54.                                                                 如果设置的url转发则显示链接到外部地址
  55.                                                                 $forum['lastpost']:是一个数组,也就是证明有最后回复的时候
  56.                                                                 $cat['forumcolumns'] < 3:如果在后台设置论坛水平横排设置小于3的时候
  57.                                                                 $forum[lastpost][dateline]:最后发表时间
  58.                                                                 $forum['lastpost']['author']:最后发表的作者
  59.                                                                 $_G[setting][anonymoustext]:后台可以设置是否允许匿名发帖
  60.                                                                 {lang forum_lastpost}:最后发表
  61.                                                                 {lang never}:从未
  62.                                                                  -->
  63.                                                                 <dl{if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="margin-left: {$forum[extra][iconwidth]}px;"{/if}>
  64.                                                                         <dt><a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}{if $forum[extra][namecolor]} style="color: {$forum[extra][namecolor]};"{/if}>$forum[name]</a><!--{if $forum[todayposts] && !$forum['redirect']}--><em class="xw0 xi1" title="{lang forum_todayposts}"> ($forum[todayposts])</em><!--{/if}--></dt>
  65.                                                                         <!--{if empty($forum[redirect])}--><dd><em>{lang forum_threads}: <!--{echo dnumber($forum[threads])}--></em>, <em>{lang forum_posts}: <!--{echo dnumber($forum[posts])}--></em></dd><!--{/if}-->
  66.                                                                         <dd>
  67.                                                                         <!--{if $forum['permission'] == 1}-->
  68.                                                                                 {lang private_forum}
  69.                                                                         <!--{else}-->
  70.                                                                                 <!--{if $forum['redirect']}-->
  71.                                                                                         <a href="$forumurl" class="xi2">{lang url_link}</a>
  72.                                                                                 <!--{elseif is_array($forum['lastpost'])}-->
  73.                                                                                         <!--{if $cat['forumcolumns'] < 3}-->
  74.                                                                                                 <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="xi2"><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
  75.                                                                                         <!--{else}-->
  76.                                                                                                 <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost">{lang forum_lastpost}: $forum[lastpost][dateline]</a>
  77.                                                                                         <!--{/if}-->
  78.                                                                                 <!--{else}-->
  79.                                                                                         {lang never}
  80.                                                                                 <!--{/if}-->
  81.                                                                         <!--{/if}-->
  82.                                                                         </dd>
  83.                                                                         <!--{hook/index_forum_extra $forum[fid]}-->
  84.                                                                 </dl>
  85.                                                         </td>
复制代码

第二种情况,没有设置横排展示,即竖排显示的情况下
  1. <!--{else}-->
  2.                                                 <!--
  3.                                                 如果设置了版块图标则显示版块图标
  4.                                                  -->

  5.                                                         <td class="fl_icn" {if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="width: {$forum[extra][iconwidth]}px;"{/if}>
  6.                                                                 <!--{if $forum[icon]}-->
  7.                                                                         $forum[icon]
  8.                                                                 <!--{else}-->
  9.                                                                         <a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}><img src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="$forum[name]" /></a>
  10.                                                                 <!--{/if}-->
  11.                                                         </td>
  12.                                                         <!--
  13.                                                         这个地方显示了子版块的名字
  14.                                                         后台如果允许显示今天发帖量就显示今天发帖量
  15.                                                         后台如果允许显示描述,就显示描述
  16.                                                         后台如果允许显示描述,就显示版主就显示版主
  17.                                                          -->
  18.                                                         <td>
  19.                                                                 <h2><a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}{if $forum[extra][namecolor]} style="color: {$forum[extra][namecolor]};"{/if}>$forum[name]</a><!--{if $forum[todayposts] && !$forum['redirect']}--><em class="xw0 xi1" title="{lang forum_todayposts}"> ($forum[todayposts])</em><!--{/if}--></h2>
  20.                                                                 <!--{if $forum[description]}--><p class="xg2">$forum[description]</p><!--{/if}-->
  21.                                                                 <!--{if $forum['subforums']}--><p>{lang forum_subforums}: $forum['subforums']</p><!--{/if}-->
  22.                                                                 <!--{if $forum['moderators']}--><p>{lang forum_moderators}: <span class="xi2">$forum[moderators]</span></p><!--{/if}-->
  23.                                                                 <!--{hook/index_forum_extra $forum[fid]}-->
  24.                                                         </td>
  25.                                                         <!--
  26.                                                         下面这一段主要显示了每个版块下的发帖量,展示形式如9 / 13 8 / 10
  27.                                                          -->
  28.                                                         <td class="fl_i">
  29.                                                                 <!--{if empty($forum[redirect])}--><span class="xi2"><!--{echo dnumber($forum[threads])}--></span><span class="xg1"> / <!--{echo dnumber($forum[posts])}--></span><!--{/if}-->
  30.                                                         </td>
  31.                                                         <!--
  32.                                                         下面这段主要是显示最后发表的标题带连接,发表时间以及发表作者名,如果没有发表,则显示从未
  33.                                                         -->
  34.                                                         <td class="fl_by">
  35.                                                                 <div>
  36.                                                                 <!--{if $forum['permission'] == 1}-->
  37.                                                                         {lang private_forum}
  38.                                                                 <!--{else}-->
  39.                                                                         <!--{if $forum['redirect']}-->
  40.                                                                                 <a href="$forumurl" class="xi2">{lang url_link}</a>
  41.                                                                         <!--{elseif is_array($forum['lastpost'])}-->
  42.                                                                                 <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="xi2"><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
  43.                                                                         <!--{else}-->
  44.                                                                                 {lang never}
  45.                                                                         <!--{/if}-->
  46.                                                                 <!--{/if}-->
  47.                                                                 </div>
  48.                                                         </td>
  49.                                                 </tr>
  50.                                                 <tr class="fl_row">
  51.                                                 <!--{/if}-->
  52.                                                 <!--{/loop}-->
  53.                                                 $cat['endrows']
  54.                                                 </tr>
  55.                                         </table>
  56.                                 </div>
  57.                         </div>
复制代码

下面这一块显示的是淘专辑
  1. <!--
  2.                 下面这一块显示的是淘专辑
  3.                 {lang recommend_collection}:淘专辑推荐
  4.                 {lang forum_threads}:主题
  5.                 {lang forum_lastpost}:最后发表
  6.                  -->
  7.                
  8.                         <!--{if !empty($collectiondata['data'])}-->

  9.                         <!--{eval $forumscount = count($collectiondata['data']);}-->
  10.                         <!--{eval $forumcolumns = 4;}-->

  11.                         <!--{eval $forumcolwidth = (floor(100 / $forumcolumns) - 0.1).'%';}-->

  12.                         <div class="bm bmw {if $forumcolumns} flg{/if} cl">
  13.                                 <div class="bm_h cl">
  14.                                         <span class="o">
  15.                                                 <img id="category_-2_img" src="{IMGDIR}/$collapse['collapseimg_-2']" title="{lang spread}" alt="{lang spread}" onclick="toggle_collapse('category_-2');" />
  16.                                         </span>
  17.                                         <h2><a href="forum.php?mod=collection">{lang recommend_collection}</a></h2>
  18.                                 </div>
  19.                                 <div id="category_-2" class="bm_c" style="{echo $collapse['category_-2']}">
  20.                                         <table cellspacing="0" cellpadding="0" class="fl_tb">
  21.                                                 <tr>
  22.                                                 <!--{eval $ctorderid = 0;}-->
  23.                                                 <!--{loop $collectiondata['data'] $key $colletion}-->
  24.                                                         <!--{if $ctorderid && ($ctorderid % $forumcolumns == 0)}-->
  25.                                                                 </tr>
  26.                                                                 <!--{if $ctorderid < $forumscount}-->
  27.                                                                         <tr class="fl_row">
  28.                                                                 <!--{/if}-->
  29.                                                         <!--{/if}-->
  30.                                                         <td class="fl_g"{if $forumcolwidth} width="$forumcolwidth"{/if}>
  31.                                                                 <div class="fl_icn_g">
  32.                                                                 <a href="forum.php?mod=collection&action=view&ctid={$colletion[ctid]}" target="_blank"><img src="{IMGDIR}/forum.gif" alt="$colletion[name]" /></a>
  33.                                                                 </div>
  34.                                                                 <dl>
  35.                                                                         <dt><a href="forum.php?mod=collection&action=view&ctid={$colletion[ctid]}">$colletion[name]</a></dt>
  36.                                                                         <dd><em>{lang forum_threads}: <!--{echo dnumber($colletion[threadnum])}--></em>, <em>{lang collection_commentnum}: <!--{echo dnumber($colletion[commentnum])}--></em></dd>
  37.                                                                         <dd>
  38.                                                                         <!--{if $colletion['lastpost']}-->
  39.                                                                                 <!--{if $forumcolumns < 3}-->
  40.                                                                                         <a href="forum.php?mod=redirect&tid=$colletion[lastpost]&goto=lastpost#lastpost" class="xi2"><!--{echo cutstr($colletion[lastsubject], 30)}--></a> <cite><!--{date($colletion[lastposttime])}--> <!--{if $colletion['lastposter']}-->$colletion['lastposter']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
  41.                                                                                 <!--{else}-->
  42.                                                                                         <a href="forum.php?mod=redirect&tid=$colletion[lastpost]&goto=lastpost#lastpost">{lang forum_lastpost}: <!--{date($colletion[lastposttime])}--></a>
  43.                                                                                 <!--{/if}-->
  44.                                                                         <!--{else}-->
  45.                                                                                 {lang never}
  46.                                                                         <!--{/if}-->
  47.                                                                         </dd>
  48.                                                                         <!--{hook/index_datacollection_extra $colletion[ctid]}-->
  49.                                                                 </dl>
  50.                                                         </td>
  51.                                                         <!--{eval $ctorderid++;}-->

  52.                                                 <!--{/loop}-->
  53.                                                 <!--{if ($columnspad = $ctorderid % $forumcolumns) > 0}--><!--{echo str_repeat('<td class="fl_g"'.($forumcolwidth ? " width="$forumcolwidth"" : '').'></td>', $forumcolumns - $columnspad);}--><!--{/if}-->
  54.                                                 </tr>
  55.                                         </table>

  56.                                 </div>
  57.                         </div>

  58.                         <!--{/if}-->

  59.                 </div>
复制代码

下面这段的基本展现形式:在线会员 - 总计 2 人在线 - 最高记录是 5 于 2014-11-15.
  1. <!--
  2.                 下面这段的基本展现形式:在线会员 - 总计 2 人在线 - 最高记录是 5 于 2014-11-15.
  3.                 {lang onlinemember}:在线会员
  4.                 {lang onlines}:人在线
  5.                 {lang index_guests}:位游客
  6.                 {lang index_mostonlines}:最高记录是
  7.                 {lang on}:于
  8.                  -->
  9.                 <!--{if empty($gid) && $_G['setting']['whosonlinestatus']}-->
  10.                         <div id="online" class="bm oll">
  11.                                 <div class="bm_h">
  12.                                 <!--{if $detailstatus}-->
  13.                                         <span class="o"><a href="forum.php?showoldetails=no#online" title="{lang spread}"><img src="{IMGDIR}/collapsed_no.gif" alt="{lang spread}" /></a></span>
  14.                                         <h3>
  15.                                                 <strong><a href="home.php?mod=space&do=friend&view=online&type=member">{lang onlinemember}</a></strong>
  16.                                                 <span class="xs1">- <strong>$onlinenum</strong> {lang onlines}
  17.                                                 - <strong>$membercount</strong> {lang index_members}(<strong>$invisiblecount</strong> {lang index_invisibles}),
  18.                                                 <strong>$guestcount</strong> {lang index_guests}
  19.                                                 - {lang index_mostonlines} <strong>$onlineinfo[0]</strong> {lang on} <strong>$onlineinfo[1]</strong>.</span>
  20.                                         </h3>
  21.                                 <!--{else}-->
  22.                                         <!--{if empty($_G['setting']['sessionclose'])}-->
  23.                                                 <span class="o"><a href="forum.php?showoldetails=yes#online" title="{lang spread}"><img src="{IMGDIR}/collapsed_yes.gif" alt="{lang spread}" /></a></span>
  24.                                         <!--{/if}-->
  25.                                         <h3>
  26.                                                 <strong>
  27.                                                         <!--{if !empty($_G['setting']['whosonlinestatus'])}-->
  28.                                                                 {lang onlinemember}
  29.                                                         <!--{else}-->
  30.                                                                 <a href="home.php?mod=space&do=friend&view=online&type=member">{lang onlinemember}</a>
  31.                                                         <!--{/if}-->
  32.                                                 </strong>
  33.                                                 <span class="xs1">- {lang total} <strong>$onlinenum</strong> {lang onlines}
  34.                                                 <!--{if $membercount}-->- <strong>$membercount</strong> {lang index_members},<strong>$guestcount</strong> {lang index_guests}<!--{/if}-->
  35.                                                 - {lang index_mostonlines} <strong>$onlineinfo[0]</strong> {lang on} <strong>$onlineinfo[1]</strong>.</span>
  36.                                         </h3>
  37.                                 <!--{/if}-->
  38.                                 </div>
复制代码

以下会显示当前在线会员
  1. <!--
  2.                         以下会显示当前在线会员
  3.                         lang online_only_guests:
  4.                          -->
  5.                         <!--{if $_G['setting']['whosonlinestatus'] && $detailstatus}-->
  6.                                 <dl id="onlinelist" class="bm_c">
  7.                                         <dt class="ptm pbm bbda">$_G[cache][onlinelist][legend]</dt>
  8.                                         <!--{if $detailstatus}-->
  9.                                                 <dd class="ptm pbm">
  10.                                                 <ul class="cl">
  11.                                                 <!--{if $whosonline}-->
  12.                                                         <!--{loop $whosonline $key $online}-->
  13.                                                                 <li title="{lang time}: $online[lastactivity]">
  14.                                                                 <img src="{STATICURL}image/common/$online[icon]" alt="icon" />
  15.                                                                 <!--{if $online['uid']}-->
  16.                                                                         <a href="home.php?mod=space&uid=$online[uid]">$online[username]</a>
  17.                                                                 <!--{else}-->
  18.                                                                         $online[username]
  19.                                                                 <!--{/if}-->
  20.                                                                 </li>
  21.                                                         <!--{/loop}-->
  22.                                                 <!--{else}-->
  23.                                                         <li style="width: auto">{lang online_only_guests}</li>
  24.                                                 <!--{/if}-->
  25.                                                 </ul>
  26.                                         </dd>
  27.                                         <!--{/if}-->
  28.                                 </dl>
  29.                         <!--{/if}-->
  30.                         </div>
  31.                 <!--{/if}-->
复制代码

以下这个地方显示友情连接
  1. <!-- 以下这个地方显示友情连接 -->
  2.                 <!--{if empty($gid) && ($_G['cache']['forumlinks'][0] || $_G['cache']['forumlinks'][1] || $_G['cache']['forumlinks'][2])}-->
  3.                 <div class="bm lk">
  4.                         <div id="category_lk" class="bm_c ptm">
  5.                                 <!--{if $_G['cache']['forumlinks'][0]}-->
  6.                                         <ul class="m mbn cl">$_G['cache']['forumlinks'][0]</ul>
  7.                                 <!--{/if}-->
  8.                                 <!--{if $_G['cache']['forumlinks'][1]}-->
  9.                                         <div class="mbn cl">
  10.                                                 $_G['cache']['forumlinks'][1]
  11.                                         </div>
  12.                                 <!--{/if}-->
  13.                                 <!--{if $_G['cache']['forumlinks'][2]}-->
  14.                                         <ul class="x mbm cl">
  15.                                                 $_G['cache']['forumlinks'][2]
  16.                                         </ul>
  17.                                 <!--{/if}-->
  18.                         </div>
  19.                 </div>
  20.                 <!--{/if}-->

  21.                 <!--{hook/index_bottom}-->
  22.         </div>
复制代码

一下的主要意思是如果开启了侧边栏会显示...
如果是管理员身份,会显示提示更新信息
导航固定浮动的效果,后台可以设置开启关闭
引入底部文件
  1. <!--
  2.         如果开启了侧边栏
  3.          -->
  4.         <!--{if $_G['setting']['forumallowside']}-->
  5.                 <div id="sd" class="sd">
  6.                         <!--{hook/index_side_top}-->
  7.                         <div class="drag">
  8.                                 <!--[diy=diy2]--><div id="diy2" class="area"></div><!--[/diy]-->
  9.                         </div>
  10.                         <!--{hook/index_side_bottom}-->
  11.                 </div>
  12.         <!--{/if}-->
  13. </div>

  14. <!-- 如果是管理员身份,会显示提示更新信息 -->
  15. <!--{if $_G['group']['radminid'] == 1}-->
  16.         <!--{eval helper_manyou::checkupdate();}-->
  17. <!--{/if}-->

  18. <!-- 导航固定浮动的效果,后台可以设置开启关闭 -->
  19. <!--{if empty($_G['setting']['disfixednv_forumindex']) }--><script>fixed_top_nv();</script><!--{/if}-->
  20. <!-- 引入footer文件 -->
  21. <!--{template common/footer}-->
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|十三博客 ( 鲁ICP备2023000528号 )

GMT+8, 2026-6-1 17:27 , Processed in 0.103736 second(s), 25 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表