discuz代码分析 forumdisplay.htm模板代码分析(二)
<!--{if $thread['price'] > 0}-->===此贴价钱>0 <!--{if $thread['special'] == '3'}-->=====上面说过$thread['special']=='3'是代表是什么了.. - [{lang thread_reward} <!--{else}--> - [{lang price}==================出售: <!--{/if}--> {$extcredits[$creditstrans]}=====调用相购买积分类型..并输出..<span class="bold">$thread</span> {$extcredits[$creditstrans]}] <!--{elseif $thread['special'] == '3' && $thread['price'] < 0}--> - [{lang reward_solved}]===========己出售.. <!--{/if}--></span>复制内容到剪贴板 代码:<span class="smalltxt">$thread</span>..帖子分页..复制内容到剪贴板 代码:<!--{if $thread['new']}--> <a href="redirect.php?tid=$thread&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">$thread</a> <!--{else}--> <!--{if $forum['ismoderator']}--> <a href="viewpro.php?uid=$thread">{lang anonymous}</a> <!--{else}--> {lang anonymous} <!--{/if}--> <!--{/if}-->这个是输出帖子的作者.. <br 复制内容到剪贴板 代码:><span class="smalltxt lighttxt">$thread</span>帖子发表时间..</td>复制内容到剪贴板 代码:<td class="f_views">$thread / <span class="lighttxt">$thread</span></td>..... 这里是回复数和查看数..也是这里,我做了一个小HACK..看这里..forumdisplay根据回复和人气的值自动加亮,彩字 For D50 <td class="f_last">复制内容到剪贴板 代码:<span class="smalltxt"><a href="redirect.php?tid=$thread& goto=lastpost$highlight#lastpost">$thread</a>< /span>最后发表时间... 复制内容到剪贴板 代码:<br>{lang forum_lastpost_by}<!--{if $thread['lastposter']}--><a href="viewpro.php?username=$thread">$thread</a><!--{else}-->{lang anonymous}<!--{/if}-->显示最后发表自:....$thread还是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>这个又是那个分页列表和发 贴下拉菜单..和上面的一样,在这里就不分析了..
页:
[1]