【原创】教您如何不需要插件给dz论坛帖子图片加边框美化
修改前:
修改后:
方法如下:
1、打开文件template——default——forum——Discuzcode搜索代码- <img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid']
复制代码 2、将代码- [code] <!--{if $_G['setting']['thumbstatus'] && $attach['thumb']}-->
- <img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} style="cursor:pointer" id="aimg_$attach[aid]" aid="$attach[aid]" src="{STATICURL}image/common/none.gif" onclick="zoom(this, this.getAttribute('zoomfile'), 0, 0, '{$_G[setting][showexif]}')" zoomfile="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes?humb=yes{else}{$attach[url]}$attach[attachment]{/if}" file="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode{else}{$attach[url]}$attachthumb{/if}" alt="$_G[forum_thread][subject] " title="$_G[forum_thread][subject] " inpost="1"{if $_GET['from'] != 'preview'} {/if} />
- <!--{else}-->
- <img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} id="aimg_$attach[aid]" aid="$attach[aid]" src="{STATICURL}image/common/none.gif" zoomfile="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes?humb=yes{else}{$attach[url]}$attach[attachment]{/if}" file="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes{else}{$attach[url]}$attach[attachment]{/if}" $widthcode alt="$_G[forum_thread][subject] " title="$_G[forum_thread][subject] " id="aimg_$attach[aid]" inpost="1"{if $_GET['from'] != 'preview'} {/if} />
- <!--{/if}-->
复制代码 修改为!qinai!游客!yincang_youke! 3、将CSS代码样式放置最底部位置!qinai!游客!yincang_youke! 或将CSS代码放置于template——default——common——common.css文件中!qinai!游客!yincang_youke! 【可将CSS代码颜色更换为您喜欢的颜色,不做颜色修改也无碍】
4、登录网站后台,更新缓存即可
相关教程:
【原创】教您如何修改DZ论坛帖子的图片自动居中,无需自行设置居中
【原创】手把手教您如何删除鼠标指向图片出现的上传,下载附件等表框
【原创】教您如何让上传的帖子图片自动加上帖子标题,让搜索引擎读取图片内容说明
|