discuz代码分析 forumdisplay.htm模板代码分析(二)

<!--{if $thread['price'] > 0}-->

===此贴价钱>0                     

<!--{if $thread['special'] == '3'}-->

=====上面说过$thread['special']=='3'是代表是什么了..                     

- [{lang thread_reward}                     

<!--{else}-->                     

- [{lang price}==================出售:                     

<!--{/if}-->                     

{$extcredits[$creditstrans][title]}

=====调用相购买积分类型..并输出..

<span class="bold">$thread[price]</span> {$extcredits[$creditstrans][unit]}]            

<!--{elseif $thread['special'] == '3' && $thread['price'] < 0}-->                     

- [{lang reward_solved}]===========己出售..            

<!--{/if}--></span>

复制内容到剪贴板 代码:

<span class="smalltxt">$thread[multipage]</span>

..帖子分页..

复制内容到剪贴板 代码:

<!--{if $thread['new']}-->                     

<a href="redirect.php?tid=$thread[tid]&goto=newpost$highlight#newpost">

<img src="{IMGDIR}/firstnew.gif" border="0" class="absmiddle" alt="" /></a>            

<!--{/if}-->如果是新贴..则..显示出:firstnew.gif图标..          

</td>            

<td class="f_author">

复制内容到剪贴板 代码:            

<!--{if $thread['authorid'] && $thread['author']}-->                     

<a href="viewpro.php?uid=$thread[authorid]">$thread[author]</a>            

<!--{else}-->                     

<!--{if $forum['ismoderator']}-->                               

<a href="viewpro.php?uid=$thread[authorid]">{lang anonymous}</a>                     

<!--{else}-->                               

{lang anonymous}                     

<!--{/if}-->            

<!--{/if}-->这个是输出帖子的作者..            

<br 复制内容到剪贴板 代码:><span class="smalltxt lighttxt">$thread[dateline]</span>帖子发表时间..</td>

复制内容到剪贴板 代码:

<td class="f_views">$thread[replies] / <span class="lighttxt">$thread[views]</span></td>

.....   这里是回复数和查看数..也是这里,我做了一个小HACK..看这里..  

forumdisplay根据回复和人气的值自动加亮,彩字 For D50 [2006/11/17]      

<td class="f_last">

复制内容到剪贴板 代码:

<span class="smalltxt"><a href="redirect.php?tid=$thread[tid]& goto=lastpost$highlight#lastpost">$thread[lastpost]</a>< /span>

最后发表时间... 复制内容到剪贴板 代码:

<br>{lang forum_lastpost_by}

<!--{if $thread['lastposter']}--><a href="viewpro.php?username=$thread[lastposterenc]">$thread[lastposter]</a>

<!--{else}-->

{lang anonymous}

<!--{/if}-->

显示最后发表自:....

$thread[lastposter]还是anonymous            

</td></tr></table>

复制内容到剪贴板 代码:       

<!--{/loop}-->结束循环输出帖子列表..       

</div></div> 复制内容到剪贴板 代码:

<!--{else}-->与:前面的

<!--{if $threadcount}-->相对应..请教..

$threadcount变量的意思..不好意思..我也是正在学习当中..应该是主题总 数..因为在这个else之后,输出的是当这个版块没有帖子数的时候的情况..       

<div class="maintable">

<div class="spaceborder" style="width: {TABLEWIDTH}; border-top: none; border-bottom: none">       

<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center" style="margin-top:-1px;border-top:none">       

<tr><td colspan="7" class="altbg1">{lang forum_nothreads}</td></tr>       

</table>       

</div></div>

复制内容到剪贴板 代码:

<!--{/if}-->结束帖子列表的判断了.. 复制内容到剪贴板 代码:

<!--{if $forum['ismoderator'] && $threadcount}-->

===如果有管理权限和主题数大于0,则开始进入管理的那几个选项了..       

<div class="maintable">

<div class="spaceborder spacebottom" style="width: {TABLEWIDTH}; border-top: none; margin-bottom: {TABLESPACE}px;">       

<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center">       

<tr class="category"><td width="4%"></td><td>{lang admin_moderate}</td></tr>       

<tr><td class="altbg1" colspan="2"><input class="radio" type="hidden" name="operation">       

<input class="checkbox" type="checkbox" name="chkall" >{lang checkall}       

<!--{if $allowdelpost}--><input type="button" class="lightbutton"   value="{lang admin_delthread}"> <!--{/if}-->       

<input type="button" class="lightbutton"   value="{lang admin_move}">       

<input type="button" class="lightbutton"   value="{lang admin_highlight}">       

<input type="button" class="lightbutton"   value="{lang admin_type}">       

<input type="button" class="lightbutton"   value="{lang admin_openclose}">       

<!--{if $allowstickthread}--><input type="button" class="lightbutton"   value="{lang admin_stick_unstick}"><!--{/if}-->       

<input type="button" class="lightbutton"   value="{lang admin_digest_addremove}">       

<!--{if $supe_status && $forum['supe_pushsetting']['status'] == 2}-->

<input type="button" class="lightbutton"   value="{lang admin_supe_push_addremove}"><!--{/if}-->       

</td></tr></table>

</div></div>

<!--{else}-->       

<div class="maintable"><div class="spaceborder spacebottom" style="width: {TABLEWIDTH}; border-top: none; margin-bottom: {TABLESPACE}px; height:0px; font-size:0px; line-height: 0px;">

</div></div>

<!--{/if}-->

</form>

复制内容到剪贴板 代码:

<div class="maintable">

<table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center"><tr><td valign="top">$multipage</td><td align="right"><!--{if $allowpost || !$discuz_uid}-->       

<div id="newspecialfooter" class="right"><a href="post.php?action=newthread&fid=$fid&extra=$extra"><img src="{IMGDIR}/newtopic.gif" border="0" alt="" /></a><a href="###"><img src="{IMGDIR}/newspecial.gif" border="0" alt="" /></a>

<script type="text/javascript">menuregister(false, "newspecialfooter", true)</script></div>

  <!--{if ($allowposttrade && $ec_id) || $allowpostpoll || $allowpostreward || $allowpostactivity || !$discuz_uid}-->            

<div class="popupmenu_popup newspecialmenu" id="newspecialfooter_menu" style="display: none">            

<table cellpadding="4" cellspacing="0" border="0" width="100%">            

<!--{if $allowpostpoll || !$discuz_uid}--><tr><td class="popupmenu_option">

<div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&poll=yes">{lang thread_poll}</a></div></td></tr><!--{/if}-->            

<!--{if ($allowposttrade && $ec_id) || !$discuz_uid}--><tr><td class="popupmenu_option">

<div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&trade=yes">{lang thread_trade}</a></div></td></tr><!--{/if}-->            

<!--{if $allowpostreward || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&reward=yes">{lang thread_reward}</a></div></td></tr><!--{/if}-->             <!--{if $allowpostactivity || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&activity=yes">{lang thread_activity}</a></div></td></tr><!--{/if}-->             </table></div>        <!--{/if}--><!--{/if}--></td></tr>< /table><br></div>这个又是那个分页列表和发 贴下拉菜单..和上面的一样,在这里就不分析了..

转载于:https://www.cnblogs.com/vicenteforever/articles/1620670.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值