繁體
|
簡體
Sclub交友聊天~加入聊天室當版主
(檢舉)
分享
新浪微博
QQ空间
人人网
腾讯微博
Facebook
Google+
Plurk
Twitter
Line
標題:
[教學]
一款更漂亮的帖子内页帖子标题美化
[打印本頁]
作者:
bonimon
時間:
2010-12-2 11:24
標題:
一款更漂亮的帖子内页帖子标题美化
打開論壇後臺---界面---模板管理---選擇“默認模板套系”
點擊“詳情”
選擇模板--打开 模板文件 templates/default/viewthread_node.htm
找到
<h1>$thread[subject]</h1>
複製代碼
替换成
<h1><!-- 给标题加上发光效果,并在帖子上面显示多少人浏览 START -->
<h2 align="center" style="font-size: 24px; filter: glow(color=#FF0161,strength=3); height:30px; color:#FFFFFF; padding:1px;"><strong>$post[subject]</strong></h2>
<center><font color=navy>本文来自:<font color=blue><span class="smalltxt"><a href="{$boardurl}">$bbname</a></span></font>★<a href="{$boardurl}"><b><font color="#800000">http://2010.hotbbs.info</font></b></a>★ 转帖请注明出处! 作者:<font color=blue><span class="smalltxt">$post[author]</span></font><!--{if $post['first']}--><b> 您是第<font color=red><span class="smalltxt">{echo $thread[views]+2}</span></font>个浏览者</b><!--{/if}-->
<hr></font></center>
<!-- 给标题加上发光效果,并在帖子上面显示多少人浏览 END -->
<!-- 复制推荐给QQ好友开始 -->
<div align="center">
<!--{if $post['number'] == 1}-->
<script language="JavaScript">
<!--
function copyUrl(url){
var content='';
window.clipboardData.setData("Text",url);
alert("复制成功,请粘贴到你的QQ/MSN上推荐给你的好友");
}//-->
</script>
<a href="javascript:copyUrl('本帖标题:$post[subject]\n本帖地址:{$boardurl}viewthread.php?tid=$tid')"><img src="images/copy.gif" border="0"></a>
<!--{/if}--></div></div>
<!-- 复制推荐给QQ好友结束 --><!-- 添加网摘代码开始 --><div class="ad_textlink1" id="ad_thread1_0"><B><FONT color=#3370cc>收藏本文到网摘:</FONT></B><a href="javascript:d=document;window.external.AddFavorite(''+d.location.href+'', ''+d.title+'')" target="_self"><font color="#ee5500">本地收藏夹</a>|<a href="javascript:window.open('http://shuqian.qq.com/post?title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=960,height=600,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)"><font color="#FF6600">QQ书签</font></a>|<a href="javascript:window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(document.title.substring(0,76))+'&iu='+encodeURIComponent(location.href)+'&fr=ien#nw=1','_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0"><font color="#4cb509">百度搜藏</font></a>|<a href="javascript:location.href='http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)",'google','scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();"><font color="#FF6600">Google书签</font></a>|<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange
().text:''):(d.getSelection?d.getSelection():'');void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=帥帥&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();"><font color="#4cb509">新浪ViVi</font></a>|<a href="#" onclick="window.open('http://myweb.cn.yahoo.com/popadd.html?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title), 'Yahoo','scrollbars=yes,width=780,height=550,left=80,top=80,status=yes,resizable=yes');"><font color="#FF6600">雅虎收藏</font></a>|<a href="javascript:t=document.title;u=location.href;e=document.selection?(document.selection.type!='None'?document.selection.createRange().text:''):(document.getSelection?document.getSelection():'');void(open('http://bookmark.hexun.com/post.aspx?title='+escape(t)+'&url='+escape(u)+'&excerpt='+escape(e),'HexunBookmark','scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes'));"><font color="#4cb509">和讯网摘</font></a>|<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange
().text:''):(d.getSelection?d.getSelection():'');void(vivi=window.open('http://my.poco.cn/fav/storeIt.php?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'_blank','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));"><font color="#FF6600">POCO网摘</font></a>|<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();"><font color="#4cb509">365key网摘</font></a>|<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(yesky=window.open('http://hot.yesky.com/dp.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&st=2','_blank','scrollbars=no,width=400,height=480,left=75,top=20,status=no,resizable=yes'));yesky.focus();"><font color="#FF6600">天极网摘</font></a>|<a href="JavaScript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(saveit=window.open('http://wz.csdn.net/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'saveit','scrollbars=no,width=590,height=300,left=75,top=20,status=no,resizable=yes'));saveit.focus();" ><font color="#4cb509">CSDN网摘</font></a></div>
<!-- 添加网摘代码结束 -->$thread[subject]</h1>
複製代碼
點擊“提交”。切記更新緩存
效果請看本站的帖子正頁
http://sclub.com.tw/discuz/forumdisplay.php?fid=8
作者:
liangweisee
時間:
2012-11-14 13:53
不知道这款代码还能用于7.2吗?
歡迎光臨 SCLUB免費論壇申請-使用者論壇 (http://sellers.com.tw/discuz/)
Powered by Discuz! 7.2