免費論壇 繁體 | 簡體
公告:SCLUB雲端專屬主機己開放租用
分享
返回列表 下一主题 ›› ‹‹ 上一主题691 | 0 发帖

SCLUB/Discuz! 7.2附件下载超美化代码



首先,进入discuzcode模板,找到:


  1. <img src="{if $attach[refcheck]}attachment.php?aid=$aidencode&noupdate=yes{else}$attach[url]/$attach[attachment]{/if}" alt="$attach[filename]" />
  2.                 <!--{/if}-->
  3.         <!--{/if}-->
  4.         <!--{else}-->
复制代码




将下边的所有代码全部替换为:


  1. <style type="text/css">
  2. <!--
  3. .typeoption table ,.typeoption td { width: 300px; font-size:12px;}
  4. .movie{
  5. float:left;  

  6. }
  7. -->
  8. </style>
  9. <div class="typeoption">
  10. <div class="movie">
  11.         $attach[attachicon]
  12. </div>
  13. <div style="margin-left: 56px;width: 35.5%;height:auto; border:1px dashed #F30;">
  14. <table cellpadding="0" cellspacing="0" class="formtable datatable" >
  15. <tr class="colplural">
  16. <th><strong>附件下载信息</strong></th><td><font color=#ff0000>$attach[filename]</font></td>
  17. </tr>
  18. <tr>
  19. <th>附件大小:</th><td>$attach[attachsize]</td>
  20. </tr><tr class="colplural">
  21. <th>附件{lang price}:</th><td>{$extcredits[$creditstransextra[1]][title]} $attach[price] {$extcredits[$creditstransextra[1]][unit]} [<a href="misc.php?action=attachpay&aid=$attach[aid]" onclick="showWindow('attachpay', this.href);return false;">{lang attachment_buy}</a>] [<a href="misc.php?action=viewattachpayments&aid=$attach[aid]" onclick="showWindow('attachpay', this.href);return false;" target="_blank">{lang pay_view}</a>]</td>
  22. </tr><tr>
  23. <th>{lang downloads}:</th><td>$attach[downloads]</td>
  24. </tr><tr class="colplural">
  25. <th>更新时间:</th><td>$attach[dateline]</td>
  26. </tr><tr>
  27. <th>下载地址:</th><td>
  28. <a href="attachment.php?aid=$aidencode" target="_blank"{if !$attach['attachimg'] && $GLOBALS[attachcredits]} onclick="return creditconfirm('{$GLOBALS[attachcredits]}');"{/if}><img src="http://www.bbvdd.com/d/20200101123628fdf.gif" border="0" alt="普通方式下载 - $attach[filename]" /></a>
  29. </td>
  30. </tr>
  31. </table>
  32. </div>
  33.         <!--{/if}-->
  34.         </dl>
  35. <!--{/block}-->
  36. <!--{eval return $return;}-->
  37. <!--{eval
  38. }

  39. function attachinpost($attach) {
  40. global $attachrefcheck, $extcredits, $creditstrans, $creditstransextra, $ftp, $thumbstatus, $attachimgpost;
  41. $attach['refcheck'] = (!$attach['remote'] && $attachrefcheck) || ($attach['remote'] && ($ftp['hideurl'] || ($attach['isimage'] && $attachimgpost && strtolower(substr($ftp['attachurl'], 0, 3)) == 'ftp')));
  42. $aidencode = aidencode($attach[aid]);
  43. }-->
  44. <!--{block return}-->
  45.         <!--{if !isset($attach['unpayed'])}-->
  46.                 <!--{if $attach['attachimg']}-->
  47.                         <!--{if !IS_ROBOT}-->
  48.                                 <span style="position: absolute; display: none" id="attach_$attach[aid]" onmouseover="showMenu({'ctrlid':this.id,'pos':'13'})"><img src="{IMGDIR}/attachimg.gif" border="0"></span>
  49.                                 <!--{if $thumbstatus && $attach['thumb']}-->
  50.                                         <a href="javascript:;"><img onclick="zoom(this, '{if $attach[refcheck]}attachment.php?aid=$aidencode&noupdate=yes&nothumb=yes{else}$attach[url]/$attach[attachment]{/if}')" src="{if $attach[refcheck]}attachment.php?aid=$aidencode{else}$attach[url]/$attach[attachment].thumb.jpg{/if}" border="0" id="aimg_$attach[aid]" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /></a>
  51.                                 <!--{else}-->
  52.                                         {eval $GLOBALS[aimgs][$attach[pid]][] = $attach[aid];}{eval $widthcode = attachwidth($attach['width']);}
  53.                                         <img src="images/common/none.gif" file="{if $attach[refcheck]}attachment.php?aid=$aidencode&noupdate=yes{else}$attach[url]/$attach[attachment]{/if}" $widthcode id="aimg_$attach[aid]" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" alt="$attach[filename]" />
  54.                                 <!--{/if}-->
  55.                                 <div class="t_attach" id="aimg_$attach[aid]_menu" style="position: absolute; display: none">                                
  56.                                 <a href="attachment.php?aid=$aidencode&nothumb=yes" title="$attach[filename]" target="_blank"><strong>{lang download}</strong></a> ($attach[attachsize])<br />
  57.                                 <!--{if $attach[description]}-->$attach[description]<br /><!--{/if}-->
  58.                         <!--{else}-->
  59.                                 <dl class="t_attachlist attachimg">
  60.                                 <!--{if !$attach['price'] || $attach['payed']}-->
  61.                                         <!--{if $attach['description']}--><p>{$attach[description]}</p><!--{/if}-->
  62.                                         <img src="{if $attach[refcheck]}attachment.php?aid=$aidencode&noupdate=yes{else}$attach[url]/$attach[attachment]{/if}" alt="$attach[filename]" />
  63.                                 <!--{/if}-->
  64.                                 <div style="display: none">
  65.                         <!--{/if}-->
  66.                 <!--{else}-->

  67. <style type="text/css">
  68. <!--
  69. .typeoption table ,.typeoption td { width: 300px; font-size:12px;}
  70. .movie{
  71. float:left;  

  72. }
  73. -->
  74. </style>
  75. <div class="typeoption">
  76. <div class="movie">
  77.         $attach[attachicon]
  78. </div>
  79. <div style="margin-left: 56px;width: 35.5%;height:auto; border:1px dashed #F30;">
  80. <table cellpadding="0" cellspacing="0" class="formtable datatable" >
  81. <tr class="colplural">
  82. <th><strong>附件下载信息</strong></th><td><font color=#ff0000>$attach[filename]</font></td>
  83. </tr>
  84. <tr>
  85. <th>附件大小:</th><td>$attach[attachsize]</td>
  86. </tr><tr class="colplural">
  87. <th>附件{lang price}:</th><td>{$extcredits[$creditstransextra[1]][title]} $attach[price] {$extcredits[$creditstransextra[1]][unit]} [<a href="misc.php?action=viewattachpayments&aid=$attach[aid]" onclick="showWindow('attachpay', this.href);return false;" target="_blank">{lang pay_view}</a>]</td>
  88. </tr><tr>
  89. <th>{lang downloads}:</th><td>$attach[downloads]</td>
  90. </tr><tr class="colplural">
  91. <th>更新时间:</th><td>$attach[dateline]</td>
  92. </tr><tr>
  93. <th>下载地址:</th><td>
  94. <a href="attachment.php?aid=$aidencode" target="_blank"{if !$attach['attachimg'] && $GLOBALS[attachcredits]} onclick="return creditconfirm('{$GLOBALS[attachcredits]}');"{/if}><img src="http://www.bbvdd.com/d/20200101123628fdf.gif" border="0" alt="普通方式下载 - $attach[filename]" /></a>
  95. </td>
  96. </tr>
  97. </table>
  98. </div>
  99.                         <div class="t_attach" id="attach_$attach[aid]_menu" style="position: absolute; display: none">
  100.                         <!--{if $attach['description']}-->$attach[description]<br /><!--{/if}-->
  101.                         {lang downloads}: $attach[downloads]<br />
  102.                         <!--{if $attach['readperm']}-->{lang readperm}: $attach[readperm]<br /><!--{/if}-->
  103.                 <!--{/if}-->
  104.                 <!--{if $attach['price']}-->
  105.                         {lang price}: {$extcredits[$creditstransextra[1]][title]} $attach[price] {$extcredits[$creditstransextra[1]][unit]}<br />
  106.                         <a href="misc.php?action=viewattachpayments&aid=$attach[aid]" onclick="showWindow('attachpay', this.href);return false;" target="_blank">[{lang pay_view}]</a>
  107.                 <!--{/if}-->
  108.                 <div class="t_smallfont">$attach[dateline]</div>
  109.                 <!--{if !$attach['attachimg'] && $GLOBALS['attachcredits']}-->{lang attachcredits} $GLOBALS[attachcredits]<br /><!--{/if}-->
  110.                 </div>
  111.         <!--{else}-->

  112. <style type="text/css">
  113. <!--
  114. .typeoption table ,.typeoption td { width: 300px; font-size:12px;}
  115. .movie{
  116. float:left;  

  117. }
  118. -->
  119. </style>
  120. <div class="typeoption">
  121. <div class="movie">
  122.         $attach[attachicon]
  123. </div>
  124. <div style="margin-left: 56px;width: 35.5%;height:auto; border:1px dashed #F30;">
  125. <table cellpadding="0" cellspacing="0" class="formtable datatable" >
  126. <tr class="colplural">
  127. <th><strong>附件下载信息</strong></th><td><font color=#ff0000>$attach[filename]</font></td>
  128. </tr>
  129. <tr>
  130. <th>附件大小:</th><td>$attach[attachsize]</td>
  131. </tr><tr class="colplural">
  132. <th>附件{lang price}:</th><td>{$extcredits[$creditstransextra[1]][title]} $attach[price] {$extcredits[$creditstransextra[1]][unit]} [<a href="misc.php?action=attachpay&aid=$attach[aid]" onclick="showWindow('attachpay', this.href);return false;">{lang attachment_buy}</a>] [<a href="misc.php?action=viewattachpayments&aid=$attach[aid]" onclick="showWindow('attachpay', this.href);return false;" target="_blank">{lang pay_view}</a>]</td>
  133. </tr><tr>
  134. <th>{lang downloads}:</th><td>$attach[downloads]</td>
  135. </tr><tr class="colplural">
  136. <th>更新时间:</th><td>$attach[dateline]</td>
  137. </tr><tr>
  138. <th>下载地址:</th><td>
  139. <strong><font color=#ff0000>{lang attach_pay},请先购买再下载...</font></strong>
  140. </td>
  141. </tr>
  142. </table>
  143. </div>
  144.         <!--{/if}-->
  145. <!--{/block}-->
  146. <!--{eval return $return;}-->
  147. <!--{eval
  148. }

  149. }-->
复制代码





附件: 您需要登录才可以下载或查看附件。没有帐号?注册  
分享到: QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
欢迎来到9528虚拟世界分享圈!Http://9528.gain.tw
返回列表 下一主题 ›› ‹‹ 上一主题691 | 0