附送一个
附件排列方法仿D3的表格方式,演示:看一楼
更新于2005.12.21
viewthread.php
查找
- $postlist[$attach['pid']]['attachments'][$attach['aid']] = $attach;
复制代码
替换为- //仿D3附件--www.snowcn.com
- $isimage = in_array($extension, array('jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp'));//图片判断
- if ( $isimage && $attachimgpost && !$attach['permid'] ){
- $postlist[$attach['pid']]['attachimg'][$attach[aid]] = $attach;
- }else{
- $postlist[$attach['pid']]['attachments'][$attach['aid']] = $attach;
- }//结束--www.snowcn.com
复制代码
viewthread.htm
查找:- <br><br><img src="images/attachicons/common.gif"> {lang attachment}: <i>{lang attach_nopermission}</i>
复制代码
在下面一行添加:
查找:- <!--{if $post['signature']}--><br><br><br></td></tr><tr><td valign="bottom" $maxsigrows>
复制代码
在上面一行添加:
将<!--仿d3附件排列-->和<!--仿d3附件排列结束-->之间的内容用下面内容替换
- <!--{else}-->
- <!--{loop $post['attachimg'] $attach}-->
- <br><br>
- <!--{if $attach['attachimg']}--><div style="text-align:center">
- <!--{if $attachrefcheck}-->
- <img title="$attach[filename] ($attach[dateline], $attach[attachsize], {$attach[description]}) <!--{if $attach['readperm']}-->{lang readperm} $attach[readperm]<!--{/if}-->" src="attachment.php?aid=$attach[aid]&noupdate=yes" border="0" onload="if(this.width>800) {this.resized=true; this.width=800;}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(!this.resized) {return false;} else {window.open('attachment.php?aid=$attach[aid]');}" onmousewheel="return imgzoom(this);" id="imgatt">
- <!--{else}-->
- <img title="$attach[filename] ($attach[dateline], $attach[attachsize], {$attach[description]}) <!--{if $attach['readperm']}-->{lang readperm} $attach[readperm]<!--{/if}--> " src="$attachurl/$attach[attachment]" border="0" onload="if(this.width>800) {this.resized=true; this.width=800;}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(!this.resized) {return false;} else {window.open('$attachurl/$attach[attachment]');}" onmousewheel="return imgzoom(this);" id="imgatt">
- <!--{/if}--></div>
- <!--{/if}-->
- <!--{/loop}-->
- <!--{if ($post['attachments'])}--><br><br>
- <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
- <tr align="center"><td colspan="7">本贴包含附件</td></tr>
- <tr class="category" align="center"><td width="5%">NO.<td width="40%">附件<td width="15%">更新时间<td width="10%">文件大小<td width="5%">下载<td width="10%">附件限制<td width="15%">描述</td></tr>
- <!--{loop $post['attachments'] $attach}-->
- <!--{if !$attach['attachimg']}-->
- <tr class="altbg1" align="center" ><td> </td><td align="left">
- $attach[attachicon] <!--{if !$discuz_uid}-->$attach[filename](<a href="logging.php?action=login">登录</a>后下载)<!--{else}--><a href="attachment.php?aid=$attach[aid]" target="_blank" class="bold">$attach[filename]</a><!--{/if}-->{template att_video}<td>
- $attach[dateline]<td>
- $attach[attachsize]<td>
- <span class="smalltxt">$attach[downloads]</span><td>
- <!--{if $attach['readperm']}-->{lang readperm} $attach[readperm]<!--{/if}--><td align="left">
- {$attach[description]}</tr>
- <!--{/if}-->
- <!--{/loop}--></table>
- <!--{/if}--><!--{/if}-->
复制代码
如果没有安装一楼的插件,将替换内容中的{template att_video}删除
最后修改css.htm
在最后面的上面添加- /*图片附件美化*/
- #imgatt {border:1px dashed {BORDERCOLOR};padding:4px;}
复制代码
完成
[ 本帖最后由 晶莹雪花 于 2005-12-21 10:02 编辑 ] |