本帖最后由 imgen 于 2010-12-11 13:46 编辑
原样式:
美化后:演示:韩寒非官方网站 http://www.twocold.org/
无图版:(自动适应宽度)
修改方法:(修改前记得备份相应文件)
1、打开:template\default\common\common.css
查找:- /* 热点:站长推荐内容,在页面右下角弹出 */
- .focus { position: fixed; right: 10px; bottom: 10px; z-index: 300; overflow: hidden; width: 270px; border: 1px solid; border-color: #CCC #999 #999 #CCC; background: {WRAPBG}; }
- * html .focus { position: absolute; top: expression(offsetParent.scrollTop+document.documentElement.clientHeight-this.offsetHeight); }
- .focus .flb { margin: 0; padding: 6px 10px; background: url({IMGDIR}/thead.png) repeat-x 0 0; }
- .focus .flb em { font-size: 12px; color: {LINK}; }
- .focus .detail { padding: 10px; text-align: left; }
- .focus .detail h4 { margin-bottom: 5px; }
- .focus .detail img { float: left; margin-right: 8px; width: 58px; }
- .focus .detail a { color: #06C; }
- .focus .moreinfo { float: right; display: inline; margin-right: 10px; padding: 6px 15px 6px 0; background: url({IMGDIR}/arw_r.gif) no-repeat 100% 50%; }
复制代码 替换为:- /* 热点:站长推荐内容,在页面右下角弹出 */
- .focus { position: fixed; right: 10px; bottom: 10px; z-index: 300; overflow: hidden; width: 300px; height:180px;}
- * html .focus { position:absolute ; top: expression(offsetParent.scrollTop+document.documentElement.clientHeight-this.offsetHeight); }
- .focus .flb { padding:0;margin:0;height:27px;line-height:27px;background: url({IMGDIR}/focustit.gif) repeat-x 0 0; color:#711018;font-size: 18px;}
- .focus .flb em {padding-left:10px;color:#711018}
- .focus .flb em img {padding-right:5px;}
- .focus .flb span { padding-top:4px;padding-right:10px; float:right; }
- .focus .detail { padding:10px; text-align:left; border:1px solid #e4e4e5; background:{WRAPBG}; width:278px; position:absolute; }
- .focus .detail h4 { margin-bottom: 5px; font-size:14px; height:18px; overflow:hidden; }
- .focus .detail .tipsimg { float: left; margin-right:5px}
- .focus .detail .tipsimg img { padding:1px; border:1px solid #ccc; width: 112px;height:92px; }
- .focus .detail .tipscon { float:right; width:155px; height:105px; overflow:hidden; }
- .focus .detail a { color: #e61056; }
复制代码 2、打开:template\default\common\footer.htm
查找:- <div class="focus" id="sitefocus">
- <h3 class="flb">
- <em><!--{if $_G['cache']['focus']['title']}-->{$_G['cache']['focus']['title']}<!--{else}-->{lang focus_hottopics}<!--{/if}--></em>
- <span><a href="javascript:;" onclick="setcookie('nofocus_$focusid', 1, 86400);$('sitefocus').style.display='none'" class="flbc" title="{lang close}">{lang close}</a></span>
- </h3>
- <hr class="l" />
- <div class="detail">
- <h4><a href="{$focus['url']}" target="_blank">$focus['subject']</a></h4>
- <p>
- <!--{if $focus[image]}-->
- <a href="{$focus['url']}" target="_blank"><img src="{$focus['image']}" onload="thumbImg(this, 1)" _width="58" _height="58" /></a>
- <!--{/if}-->
- $focus['summary']
- </p>
- </div>
- <hr class="l" />
- <a href="{$focus['url']}" class="moreinfo" target="_blank">{lang focus_show}</a>
- </div>
复制代码 替换为:(有用户反映修改后无法关闭站长推荐,原因是因为我发帖子时候DZ自动过滤了下面代码中的onclick="setcookie('nofocus_$focusid', 1, 86400);$('sitefocus').style.display='none'" 请您查找您的footer.htm中有没有前面这段代码,如果没有请重新用下面的代码替换即可。)- <div class="focus" id="sitefocus">
- <h3 class="flb">
- <em><img src="{IMGDIR}/focuslogo.gif" align="absmiddle"><!--{if $_G['cache']['focus']['title']}-->{$_G['cache']['focus']['title']}<!--{else}-->{lang focus_hottopics}<!--{/if}--></em>
- <span><a href="javascript:;" onclick="setcookie('nofocus_$focusid', 1, 86400);$('sitefocus').style.display='none'" class="flbc" title="{lang close}">{lang close}</a></span>
- </h3>
- <hr class="l" />
- <div class="detail">
- <h4><a href="{$focus['url']}" target="_blank">$focus['subject']</a></h4>
- <!--{if $focus[image]}-->
- <div class="tipsimg">
- <a href="{$focus['url']}" target="_blank"><img src="{$focus['image']}" onload="thumbImg(this, 1)" _width="112" _height="92" /></a>
- </div>
- <div class="tipscon">
- <p>$focus['summary'] <a href="{$focus['url']}" target="_blank">{lang focus_show}</a></p>
- </div>
- <!--{else}-->
- <p>
- $focus['summary'] <a href="{$focus['url']}" target="_blank">{lang focus_show}</a>
- </p>
- <!--{/if}-->
- </div>
- </div>
复制代码 3、上传附件中的图片到论坛static\image\common目录(直接上传,不会有覆盖)
提问一:我想让这个站长推荐每次都弹出,而不是关闭后刷新就不弹出怎么办?
回答:
打开:template\default\common\footer.htm
找到- setcookie('nofocus_$focusid', 1, 86400);
复制代码 删除即可。
或者不删除直接修改86400这个数值即可,86400表示关闭后86400秒内不在弹出。
提问二:如何修改“站长推荐”这几个字呢?
回答:后台-扩展-站长推荐-设置
更多美化:
仿官方最新登录美化for DiscuzX1.5
https://discuz.dismall.com/thread-1998659-1-1.html
|