SCLUB/Discuz! 7.2附件下载超美化代码
首先,进入discuzcode模板,找到:
- <img src="{if $attach[refcheck]}attachment.php?aid=$aidencode&noupdate=yes{else}$attach[url]/$attach[attachment]{/if}" alt="$attach[filename]" />
- <!--{/if}-->
- <!--{/if}-->
- <!--{else}-->
复制代码
将下边的所有代码全部替换为:
- <style type="text/css">
- <!--
- .typeoption table ,.typeoption td { width: 300px; font-size:12px;}
- .movie{
- float:left;
- }
- -->
- </style>
- <div class="typeoption">
- <div class="movie">
- $attach[attachicon]
- </div>
- <div style="margin-left: 56px;width: 35.5%;height:auto; border:1px dashed #F30;">
- <table cellpadding="0" cellspacing="0" class="formtable datatable" >
- <tr class="colplural">
- <th><strong>附件下载信息</strong></th><td><font color=#ff0000>$attach[filename]</font></td>
- </tr>
- <tr>
- <th>附件大小:</th><td>$attach[attachsize]</td>
- </tr><tr class="colplural">
- <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>
- </tr><tr>
- <th>{lang downloads}:</th><td>$attach[downloads]</td>
- </tr><tr class="colplural">
- <th>更新时间:</th><td>$attach[dateline]</td>
- </tr><tr>
- <th>下载地址:</th><td>
- <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>
- </td>
- </tr>
- </table>
- </div>
- <!--{/if}-->
- </dl>
- <!--{/block}-->
- <!--{eval return $return;}-->
- <!--{eval
- }
- function attachinpost($attach) {
- global $attachrefcheck, $extcredits, $creditstrans, $creditstransextra, $ftp, $thumbstatus, $attachimgpost;
- $attach['refcheck'] = (!$attach['remote'] && $attachrefcheck) || ($attach['remote'] && ($ftp['hideurl'] || ($attach['isimage'] && $attachimgpost && strtolower(substr($ftp['attachurl'], 0, 3)) == 'ftp')));
- $aidencode = aidencode($attach[aid]);
- }-->
- <!--{block return}-->
- <!--{if !isset($attach['unpayed'])}-->
- <!--{if $attach['attachimg']}-->
- <!--{if !IS_ROBOT}-->
- <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>
- <!--{if $thumbstatus && $attach['thumb']}-->
- <a href="javascript:;"><img onclick="zoom(this, '{if $attach[refcheck]}attachment.php?aid=$aidencode&noupdate=yes¬humb=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>
- <!--{else}-->
- {eval $GLOBALS[aimgs][$attach[pid]][] = $attach[aid];}{eval $widthcode = attachwidth($attach['width']);}
- <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]" />
- <!--{/if}-->
- <div class="t_attach" id="aimg_$attach[aid]_menu" style="position: absolute; display: none">
- <a href="attachment.php?aid=$aidencode¬humb=yes" title="$attach[filename]" target="_blank"><strong>{lang download}</strong></a> ($attach[attachsize])<br />
- <!--{if $attach[description]}-->$attach[description]<br /><!--{/if}-->
- <!--{else}-->
- <dl class="t_attachlist attachimg">
- <!--{if !$attach['price'] || $attach['payed']}-->
- <!--{if $attach['description']}--><p>{$attach[description]}</p><!--{/if}-->
- <img src="{if $attach[refcheck]}attachment.php?aid=$aidencode&noupdate=yes{else}$attach[url]/$attach[attachment]{/if}" alt="$attach[filename]" />
- <!--{/if}-->
- <div style="display: none">
- <!--{/if}-->
- <!--{else}-->
- <style type="text/css">
- <!--
- .typeoption table ,.typeoption td { width: 300px; font-size:12px;}
- .movie{
- float:left;
- }
- -->
- </style>
- <div class="typeoption">
- <div class="movie">
- $attach[attachicon]
- </div>
- <div style="margin-left: 56px;width: 35.5%;height:auto; border:1px dashed #F30;">
- <table cellpadding="0" cellspacing="0" class="formtable datatable" >
- <tr class="colplural">
- <th><strong>附件下载信息</strong></th><td><font color=#ff0000>$attach[filename]</font></td>
- </tr>
- <tr>
- <th>附件大小:</th><td>$attach[attachsize]</td>
- </tr><tr class="colplural">
- <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>
- </tr><tr>
- <th>{lang downloads}:</th><td>$attach[downloads]</td>
- </tr><tr class="colplural">
- <th>更新时间:</th><td>$attach[dateline]</td>
- </tr><tr>
- <th>下载地址:</th><td>
- <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>
- </td>
- </tr>
- </table>
- </div>
- <div class="t_attach" id="attach_$attach[aid]_menu" style="position: absolute; display: none">
- <!--{if $attach['description']}-->$attach[description]<br /><!--{/if}-->
- {lang downloads}: $attach[downloads]<br />
- <!--{if $attach['readperm']}-->{lang readperm}: $attach[readperm]<br /><!--{/if}-->
- <!--{/if}-->
- <!--{if $attach['price']}-->
- {lang price}: {$extcredits[$creditstransextra[1]][title]} $attach[price] {$extcredits[$creditstransextra[1]][unit]}<br />
- <a href="misc.php?action=viewattachpayments&aid=$attach[aid]" onclick="showWindow('attachpay', this.href);return false;" target="_blank">[{lang pay_view}]</a>
- <!--{/if}-->
- <div class="t_smallfont">$attach[dateline]</div>
- <!--{if !$attach['attachimg'] && $GLOBALS['attachcredits']}-->{lang attachcredits} $GLOBALS[attachcredits]<br /><!--{/if}-->
- </div>
- <!--{else}-->
- <style type="text/css">
- <!--
- .typeoption table ,.typeoption td { width: 300px; font-size:12px;}
- .movie{
- float:left;
- }
- -->
- </style>
- <div class="typeoption">
- <div class="movie">
- $attach[attachicon]
- </div>
- <div style="margin-left: 56px;width: 35.5%;height:auto; border:1px dashed #F30;">
- <table cellpadding="0" cellspacing="0" class="formtable datatable" >
- <tr class="colplural">
- <th><strong>附件下载信息</strong></th><td><font color=#ff0000>$attach[filename]</font></td>
- </tr>
- <tr>
- <th>附件大小:</th><td>$attach[attachsize]</td>
- </tr><tr class="colplural">
- <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>
- </tr><tr>
- <th>{lang downloads}:</th><td>$attach[downloads]</td>
- </tr><tr class="colplural">
- <th>更新时间:</th><td>$attach[dateline]</td>
- </tr><tr>
- <th>下载地址:</th><td>
- <strong><font color=#ff0000>{lang attach_pay},请先购买再下载...</font></strong>
- </td>
- </tr>
- </table>
- </div>
- <!--{/if}-->
- <!--{/block}-->
- <!--{eval return $return;}-->
- <!--{eval
- }
- }-->
复制代码
|
附件:
您需要登录才可以下载或查看附件。没有帐号?注册 