免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 發帖

精仿X系列之版块浏览【图片模式】

  1. 1、forumdisplay模版最上边加
  2. {eval $wj_image_mode = $_COOKIE["wj_image_mode"];}
  3. 复制代码
  4. 2、然后找到
  5. <!--{if $page == 1 && !empty($announcement)}-->
  6. 复制代码
  7. 在上边加
  8. <!--{if $wj_image_mode != 1}-->
  9. 复制代码
  10. 接着找
  11. <!--{else}-->                                <tbody><tr><th colspan="6"><p class="nodata">{lang forum_nothreads}</p></th></tr></tbody>                        <!--{/if}--></table>
  12. 复制代码
  13. 修改为
  14. <!--{else}-->                                <tbody><tr><th colspan="6"><p class="nodata">{lang forum_nothreads}</p></th></tr></tbody>                        <!--{/if}-->        <!--{/if}-->                </table>
  15. 复制代码
  16. 3、然后在
  17. </table>
  18. 复制代码
  19. 下边加
  20. <!-------------图片查看模式--------------->
  21. <style>
  22. .tl .by {
  23. width: 105px;
  24. line-height: 14px;
  25. }
  26. .chked {
  27. padding-left: 15px;
  28. line-height: 16px;
  29. background: url(https://www.kuchingshare.my/template/style/images/picmode.png) no-repeat 0 3px;
  30. color: #1E547F;
  31. cursor: pointer;
  32. background-position: 0 -37px;
  33. }
  34. .unchk {
  35. padding-left: 15px;
  36. line-height: 16px;
  37. background: url(https://www.kuchingshare.my/template/style/images/picmode.png) no-repeat 0 3px;
  38. color: #1E547F;
  39. cursor: pointer;
  40. }
  41. .waterfall {
  42. position: relative;
  43. margin-top: 25px;
  44. margin-left: 22px;
  45. }
  46. .waterfall li {
  47. float: left;
  48. width: 215px;
  49. overflow: hidden;
  50. margin: 0 10px 10px 0;
  51. padding: 0 0 3px;
  52. text-align: left;
  53. border-width: 1px 0 0;
  54. border-top: 1px solid #EAEAEA;
  55. background: url(https://www.kuchingshare.my/template/style/images/piclong.png) no-repeat 100% 100%;
  56. }
  57. .waterfall .c {
  58. overflow: hidden;
  59. padding-bottom: 0;
  60. max-height: 800px;
  61. }
  62. .waterfall .c, .waterfall h3 {
  63. padding: 10px;
  64. border: solid #EAEAEA;
  65. border-width: 0 1px;
  66. background-color: #F8F8F8;
  67. }
  68. .waterfall .c, .waterfall h3 {
  69. white-space: nowrap;
  70. overflow: hidden;
  71. text-overflow: ellipsis;
  72. padding: 10px;
  73. border: solid #EAEAEA;
  74. border-width: 0 1px;
  75. background-color: #F8F8F8;
  76. }
  77. .waterfall .auth {
  78. padding: 0 10px 10px;
  79. border-width: 0 1px 1px;
  80. border-style: solid;
  81. border-color: transparent #EAEAEA #B9B9B9;
  82. background: #F8F8F8;
  83. }
  84. </style>
  85. <!--{if $wj_image_mode == 1}-->
  86. <div style="position: relative;">
  87. <form method="post" name="moderate" id="moderate" action="topicadmin.php?action=moderate&fid=$fid&infloat=yes&nopost=yes">
  88. <input type="hidden" name="formhash" value="{FORMHASH}" />
  89. <input type="hidden" name="listextra" value="$extra" />

  90. <ul id="waterfall" class="ml waterfall cl">
  91. <!--{loop $threadlist $key $thread}-->
  92. <li id="$thread[id]">
  93. <div class="c cl">
  94. {eval $q2 = $db->query("SELECT * FROM cdb_attachments WHERE tid='".$thread[tid]."' AND isimage!=0 ORDER BY pid DESC");}
  95. {eval while ($asdfgh=$db->fetch_array($q2)) $thread[imgurl]=$asdfgh[attachment];}
  96. <!--{if $thread[imgurl]}-->
  97. <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]" target="_blank"><img src="attachments/$thread[imgurl]" alt="$thread[subject]" title="$thread[subject]" width="100%" height="145" /></a>
  98. <!--{else}-->
  99. <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]" target="_blank"><img src="https://www.kuchingshare.my/template/style/images/nophototiny.png" title="$thread[subject]" width="100%" height="145" /></a>
  100. <!--{/if}-->
  101. </div>
  102. <h3 class="xw0">
  103. <!--{if $forum['ismoderator']}-->
  104. <!--{if $thread['fid'] == $fid && $thread['digest'] >= 0}-->
  105. <!--{if $thread['displayorder'] <= 3 || $adminid == 1}-->
  106. <input onclick="tmodclick(this)" class="checkbox" type="checkbox" name="moderate[]" value="$thread[tid]" />
  107. <!--{else}-->
  108. <input class="checkbox" type="checkbox" disabled="disabled" />
  109. <!--{/if}-->
  110. <!--{else}-->
  111. <input class="checkbox" type="checkbox" disabled="disabled" />
  112. <!--{/if}-->
  113. <!--{/if}-->
  114. <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]" onclick="atarget(this)" title="$thread[subject]">$thread[subject]</a>
  115. </h3>
  116. <div class="auth cl">
  117. <cite class="xg1 y" style="float: right;color:#999;">
  118. 喜欢: $thread[views] &nbsp; 回复: <a href="thread-$thread[tid]-1-1.html" title="$thread[replies] 回复">$thread[replies]</a>
  119. </cite>
  120. <!--{if $thread['authorid'] && $thread['author']}-->
  121. <a href="space.php?uid=$thread[authorid]">$thread[author]</a>
  122. <!--{else}-->
  123. <!--{if $forum['ismoderator']}-->
  124. <a href="space.php?uid=$thread[authorid]">匿名</a>
  125. <!--{else}-->
  126. {lang anonymous}
  127. <!--{/if}-->
  128. <!--{/if}-->
  129. </div>
  130. </li>
  131. <!--{/loop}-->
  132. </ul>
  133. </div>
  134. </form>
  135. <!--{/if}-->
  136. <!-------------图片查看模式end--------------->
  137. 复制代码
  138. 然后再找
  139. <li><a class="order {if $orderby == 'heats' || $orderby == 'recommends'}order_active{/if}" href="forumdisplay.php?fid={$fid}&filter=$filter&orderby={if $filter == 'recommend'}recommends{else}heats{/if}$typeadd$sortadd">{lang order_heats}</a></li>
  140. 复制代码
  141. 在下边加
  142. <!--{if $wj_image_mode != 1}--><li style="float:right;"><a onclick="setcookie('wj_image_mode', 1, 999999);location.reload();" title="开启图片模式" class="unchk" href="javascript:;">图片模式</a></li><!--{/if}--><!--{if $wj_image_mode == 1}--><li style="float:right;"><a onclick="setcookie('wj_image_mode', 2, 999999);location.reload();" title="关闭图片模式" class="chked" href="javascript:;">图片模式</a></li><!--{/if}-->
複製代碼

返回列表