Discuz教程网

[代码修改] Discuz X2 楼主显示标题,带美化

[复制链接]
authicon dly 发表于 2011-9-19 09:19:37 | 显示全部楼层 |阅读模式
184024pn1rxr9oxorenute.jpg.thumb.jpg

重新弄了一下,好像这样还好看一些

打开viewthread_node.htm文件,
搜索

  1. <!--{hook/viewthread_postheader $postcount}-->
  2. </div>
  3. </div>
  4. </div>
复制代码
在下面添加

  1. <!--{if $post['number']==1}-->
  2. <table cellspacing="0" cellpadding="0" width="100%" >
  3. <tr>
  4. <td class="plc ptm pbn">
  5. <!--{if !IS_ROBOT}-->
  6. <div class="y">
  7. <span class="xg1">{lang show}:</span> <font style="font-size:20px"><span class="xi1">$_G[forum_thread][views]</span></font>
  8. <span class="pipe">|</span>
  9. <span class="xg1">{lang reply}:</span> <font style="font-size:20px"><span class="xi1">$_G[forum_thread][replies]</span></font>
  10. </div>
  11. <!--{/if}-->
  12. <h1 class="ts" style="line-height:30px">
  13. <!--{if $_G['forum_thread']['typeid'] && $_G['forum']['threadtypes']['types'][$_G['forum_thread']['typeid']]}-->
  14. <!--{if !IS_ROBOT && ($_G['forum']['threadtypes']['listable'] || $_G['forum']['status'] == 3)}-->
  15. <a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=typeid&typeid=$_G[forum_thread][typeid]">[{$_G['forum']['threadtypes']['types'][$_G['forum_thread']['typeid']]}]</a>
  16. <!--{else}-->
  17. [{$_G['forum']['threadtypes']['types'][$_G['forum_thread']['typeid']]}]
  18. <!--{/if}-->
  19. <!--{/if}-->
  20. <!--{if $threadsorts && $_G['forum_thread']['sortid']}-->
  21. <a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=sortid&sortid=$_G[forum_thread][sortid]">[{$_G['forum']['threadsorts']['types'][$_G['forum_thread']['sortid']]}]</a>
  22. <!--{/if}-->
  23. <a href="forum.php?mod=viewthread&tid=$_G[tid]" id="thread_subject">$_G[forum_thread][subject]</a>
  24. <span class="xw0 xs1 xg1">
  25. <!--{if $_G['forum_thread'][displayorder] == -2}-->({lang moderating})
  26. <!--{elseif $_G['forum_thread'][displayorder] == -3}-->({lang have_ignored})
  27. <!--{elseif $_G['forum_thread'][displayorder] == -4}-->({lang draft})
  28. <!--{/if}-->
  29. <!--{if $_G['forum_thread']['recommendlevel']}-->
  30. <img src="{IMGDIR}/recommend_$_G['forum_thread']['recommendlevel'].gif" alt="" title="{lang thread_recommend} $_G['forum_thread'][recommends]" />
  31. <!--{/if}-->
  32. <!--{if $_G['forum_thread'][heatlevel]}-->
  33. <img src="{IMGDIR}/hot_$_G['forum_thread'][heatlevel].gif" alt="" title="$_G['forum_thread'][heatlevel] {lang heats}" />
  34. <!--{/if}-->
  35. <!--{if $_G['forum_thread']['closed'] == 1}-->
  36. <img src="{IMGDIR}/locked.gif" alt="{lang close}" title="{lang close}" class="vm" />
  37. <!--{/if}-->
  38. <a href="forum.php?mod=viewthread&tid=$_G[tid]$fromuid" onclick="return copyThreadUrl(this)" title="{lang share_url_copy_comment}">[{lang share_url_copy}]</a>
  39. </span>
  40. <!--{hook/viewthread_title_extra}-->
  41. </h1>
  42. </p>
  43. </td>
  44. </tr>
  45. </table>
  46. <br>
  47. <!--{/if}-->
复制代码
其中

  1. <!--{if $post['number']==1}-->
  2. <!--{/if}-->
复制代码
是判断是否是一楼的代码。

演示:http://www.luzhnet.com/thread-5595-1-1.html







上一篇:Discuz X2超强漂亮DIY头部二级导航栏[全站导航+支持任何版本]
下一篇:插件XML编码转换工具 (集成至右键|ConvertZ|PHP-CLI|Win7)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-2 07:04

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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