Quote:
引用第3楼雪狼王于2008-05-06 10:22发表的 :
将源代码贴上来。。。
蝈蝈介绍下办法嘛
授人以鱼不如授人以渔
<?xml version="1.0" encoding="gb2312"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="gb2312" />
<meta name="robots" content="all" />
<meta name="author" content="Tencent-ISRD" />
<meta name="Copyright" content="Tencent" />
<meta name="Description" content="Qzone精彩由你而来" />
<meta name="Keywords" content="Qzone,QQ空间,Blog,博客,网络日志,播客,腾讯,QQ,Tencent" />
<title>Qzone精彩由你而来</title>
<script type="text/javascript">
//<![CDATA[
document.domain="qq.com";
document.write('<link rel="stylesheet" rev="stylesheet" href="/qzone_v4/'+top.g_StyleID+'/style.css" type="text/css" media="screen" />');
if((/\/blog/i).test(top.location.href))
top.startStepMark[12]=(new Date()).getTime();
if(!top.customVarContainer.statSent)
top.customVarContainer.statSent=false;
//]]>
</script>
<link rel="Shortcut Icon" href="/favicon.ico" type="image/x-icon" />
<!--
<link rel="alternate" type="application/rss+xml" title="RSS news feed" href="rss.xml" />
-->
<style type="text/css" id="controlStyle">
<!--
body{
padding-left:3px;
overflow:auto;
background:transparent;
margin-right:3px;
}
.owner{
}
.logins{
}
.clients{
}
.showsign{
}
div.userutil{
margin-top:5px;
margin-left:8px;
background-image:url(/ac/qzone_v4/button.gif);
background-repeat:no-repeat;
padding-left:22px;
cursor:pointer;
float:left;
}
div.sendmsg{
background-position:-370px -612px;
}
div.addfav{
background-position:-370px -584px;
}
.contentTable{
width:auto;
word-wrap:normal;
}
-->
</style>
<script type="text/javascript" src="js/blogmain.js"></script>
<script type="text/javascript" src="js/newubb.js"></script>
<script type="text/javascript" src="/qzone/namecard.js"></script>
<script type="text/javascript" id="localVariant">
//<![CDATA[
var contentProperty={
"currentBlogid":null,
"currentVoteid":null,
"currentCommentPage":0,
"lastCommentPage":null,
"totalCommentNumber":0,
"pageList":{},
"pageIndexMap":[],
"currentCList":null,
"editorCallbackToDoList":[]
};
var crRequestList=[];
var portraitRequestList=[];
var nav={
"direct":null,
"queue":[],
"cp":0
};
//]]>
</script>
</head>
<body>
<div id="m_main">
<div id="blogone" class="mode_table">
<div class="mode_table_titles"><span id="titleHref" style="visibility:hidden"><span style="cursor:pointer;text-decoration:underline" onclick="location.href='/qzone/newblog/bloglist.html';">日志</span> > <span id="categoryName" style="text-decoration:underline;cursor:pointer;"></span></span></div>
<div class="mode_table_menus" style="position:relative" id="menuBarContainer">
<span onclick="contentQuote()" class="blogmenu clients" id="btnQuoteOneBlog" style="display:none"><img src="/qzone/client/copy.gif" /> 转载到我空间</span>
<span onclick="copyBlogURL()" class="blogmenu"><img src="/qzone/images/client/bt_link_blog.gif" /> 复制本文网址</span>
<span onclick="hideSign(this)" class="blogmenu" style="line-height:15px" id="btnHideSign">显示签名档</span>
<span id="btnSetFont" title="日志内容显示为大字体" onclick="setFont(this)" class="blogmenu" style="line-height:15px">小字体</span>
<span id="blogSelPaper" title="用此信纸再写一篇日志" onclick="selectBlogPaper()" class="blogmenu" style="line-height:15px;display:none">选用该信纸</span>
<div class="page_operate right"><a href="javascript:;" onclick="blogRoller(0);return false" title="查看上一篇日志" class="preblog tc2 uline">上一篇</a><span class="clearance">|</span><a href="javascript:;" onclick="blogRoller(1);return false;" title="查看下一篇日志" class="nextblog tc2 uline">下一篇</a><span class="clearance">|</span><a href="bloglist.html" title="返回日志列表" class="backblog tc2 uline">返回<strong>日志列表</strong></a></div>
</div>
<div id="blogContentAnchor"></div>
</div>
<div class="mode_table">
<div class="mode_table_titles" id="commentTitle"><a href="http://m-qzone.qq.com/option.jsp" target="_blank" style="float:right"><img class="icon_mobile" src="http://imgcache.qq.com/ac/qzone_v4/b.gif" />想第一个看到日志抢沙发?</a>评论列表</div>
<div class="mode_table_mains blog_comment_main">
<div id="commentHintDiv" class="hint-top" style="width:100%;left:0;border-width:0 0 1px 0;display:none;color:#b30000">
<span>声明:腾讯不会在QQ空间以回复方式通知用户中奖,请大家不要相信这些虚假信息以免上当受骗。<a href="http://service.qq.com/info/4326" target="_blank" style="color:#b30000;text-decoration:underline">更多虚假案例请点击-></a></span>
<a href="javascript:;" title="关闭提示" onclick="closeCheatHint();return false" class="bt-hint-close"></a>
</div>
<div class="comment_pages top_pages" id="pageNavigator">
<a href="javascript:;" onclick="setTimeout(function(){try{if(!!window.sendCommentEditor) {/*location.hash='commendForm';*/sendCommentEditor.editorArea.focus();} else frmComment.content.focus();}catch(err){}}, 200); " class="blogmenu" title="点击这里发表评论">发表评论</a>
<div class="page_s right" id="commentPageIndexTop"><a href="javascript:void(0);" onclick="firstPage();return false;" class="bt_pre_e" title="第一页"><span class="none">第一页</span></a> <a href="javascript:void(0);" onclick="prePage();return false;" class="bt_pre">上一页</a> <a href="javascript:void();" onclick="nextPage();return false;" class="bt_next">下一页</a> <a href="javascript:void(0);" onclick="lastPage();return false;" class="bt_next_e" title="最后页"><span class="none">最后页</span></a></div>
<p class="right">共<strong class="pageall" id="totalCommentNum"></strong>篇评论,第<strong class="hit" id="currentPageNum"></strong>页/共<span id="totalPageNum"></span>页</p>
</div>
<div class="all_delete" id="starDeleteComDiv" style="display:none">
<p class="left" id="leftDeleteComParag" style="display:none;">
<label><input type="checkbox" id="batchSelAllInput" onclick="selectAllComments(this.checked);" />全选</label>
<button onclick="deleteBatchComments();" class="bt_t2">删除</button>
</p>
<p class="right">
<a id="batchDelComHref" onclick="showCommentCheckBoxs(true, false); return false;" href="javascript:;" class="all_delete_link tc2 uline" title="批量删除评论">批量删除</a>
<a id="noBatchDelComHref" style="display:none" onclick="showCommentCheckBoxs(false, false); return false;" href="javascript:;" class="all_delete_link tc2 uline" title="取消批量删除评论">取消批量删除</a>
</p>
</div>
<div class="clear"></div>
<div id="blogCommentListIconAnchor" style="display:none"></div>
<div id="blogCommentListAnchor" style="display:none"></div>
<div class="clear"></div>
<div class="comment_pages" id="pageNavigator1">
<div class="page_s right" id="commentPageIndexBottom"><a href="javascript:void(0);" onclick="if(firstPage()) location.hash='#commentTitle';return false;" class="bt_pre_e" title="第一页"><span class="none">第一页</span></a> <a href="javascript:void(0);" onclick="if(prePage()) location.hash='#commentTitle';return false;" class="bt_pre">上一页</a> <a href="javascript:void();" onclick="if(nextPage()) location.hash='#commentTitle';return false;" class="bt_next">下一页</a> <a href="javascript:void(0);" onclick="if(lastPage()) location.hash='#commentTitle';return false;" class="bt_next_e" title="最后页"><span class="none">最后页</span></a></div>
<p class="right">共<strong class="pageall" id="totalCommentNum"></strong>篇评论,第<strong class="hit" id="currentPageNum"></strong>页/共<span id="totalPageNum"></span>页</p>
</div>
<form id="commendForm" onsubmit="return commentSubmit()">
<div id="comment_editor" class="mode_table">
<!-- <h4 id="commentTitleDiv">发表评论</h4> -->
<div class="mode_table_mains">
<div class="mode_table_menus">
<label for="_hassign"><input type="checkbox" checked="checked" name="hassign" id="_hassign" />使用签名档</label>
<input type="hidden" name="cb_ysc" value="0" />
<input type="hidden" name="cb_chx" value="0" />
<input type="hidden" name="cb_tsza" value="0" />
<a id="startToolSelect" href="javascript:void(0);" onclick="selectTools(this)">请选择道具</a>
<select onchange="changeTool(this)" onblur="changeTool(this)" name="magicEffect" style="display:none;" id="toolSelector">
<option selected="true">请选择道具</option>
<option value="cb_ysc">隐身草</option>
<option value="cb_chx">彩虹炫</option>
<option value="cb_tsza">天使之爱</option>
</select>
</div>
<div id="commentEditorAnchor"></div>
<textarea id="commentEditor" class="content" name="content" rows="13" cols="50" onfocus="getUBBeditor(this)" style="border:solid 1px #CCC;color:gray !important;">点击这里发表评论</textarea>
<div class="mode_table_main logins">温馨提示:点击验证码输入框,以获取验证码</div>
<div class="mode_table_main">
<div class="left logins">请输入验证码:
<input type="text" onblur="hiddenVerify()" onfocus="focusGetVerify(this)" id="verifycode" name="verifycode" class="verifycode text" autocomplete="off" maxlength="4" size="4" style="ime-mode:disabled;" />
</div>
<button onclick="commentSubmit()" class="bt_t2" title="提交">提交</button>
<button onclick="cancelCommentSubmit()" class="bt_t2" title="取消">取消</button>
<label id="msgboardSelfReply" class="loginguest" style="display:none"><input type="checkbox" id="msgReplyCheck" onclick="checkMsgReply(this);" /> 悄悄话 <span id="hintMsgSelfReply"> | (以小纸条形式发送) <a href="javascript:showMsgLeftCnt();">查看今日免费发送数量</a></span></label>
</div>
</div>
</div>
</form>
<!-- <div class="clear"></div>
<div class="right">
<div class="page_operate"><a href="javascript:;" onclick="blogRoller(0);return false" title="查看上一篇日志" class="preblog tc2 uline">上一篇</a><span class="clearance">|</span><a href="javascript:;" onclick="blogRoller(1);return false;" title="查看下一篇日志" class="nextblog tc2 uline">下一篇</a><span class="clearance">|</span><a href="bloglist.html" title="返回日志列表" class="backblog tc2 uline">返回<strong>日志列表</strong></a></div>
</div> -->
</div> <!-- <div class="mode_table_mains blog_comment_main"> -->
</div> <!-- <div class="mode_table"> -->
<div class="clear"></div>
<div class="page full">
<div class="page_operate"><a href="javascript:;" onclick="jumpToTop();blogRoller(0);return false" title="查看上一篇日志" class="preblog tc2 uline">上一篇</a><span class="clearance">|</span><a href="javascript:;" onclick="jumpToTop();blogRoller(1);return false;" title="查看下一篇日志" class="nextblog tc2 uline">下一篇</a><span class="clearance">|</span><a href="bloglist.html" title="返回日志列表" class="backblog tc2 uline">返回<strong>日志列表</strong></a></div>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
function jumpToTop() {
if(isSmall) {
document.body.scrollTop = 0;
}
else
parent.$('mbody').scrollTop = 0;
}
function _quote(s){
s=s.replace(/\[quote\=引自:(.+?)(?:\x20| ){1,2}于\x20(.+?)\x20发表的评论\]/g,"\x03引自:<cite>$1</cite> 于 <ins>$2</ins> 发表的评论<br />\x02").replace(/\[\/quote\]/g,"\x01");
for(var i=0;i<2;i++)
s=s.replace(/\x03([^\x03\x01\x02]*?)\x02([^\x03\x01\x02]*?)\x01/g, function(a,b,c){
return '<blockquote style="width:400px;border:dashed 1px gray;margin:10px;padding:10px">'+b+'引用内容:<br /><br /><q>'+c+'</q></blockquote>';
});
return s.replace(/[\x03\x02\x01]/g,"");
}
var bLoaded = false;
function checkMsgReply(obj) {
if(!bLoaded)
top.includeJS('/qzone/blog/script/common.js', function(){bLoaded=true;checkMsgReply(obj)}, document);
else
checkReply(obj);
if(obj.checked){
MAX_COMMENT_LEN = 500;
}
else {
MAX_COMMENT_LEN = 4500;
}
_fontCount = MAX_COMMENT_LEN; //字数限制
if(!window.sendCommentEditor) return;
if(sendCommentEditor.editorArea.editMode == 1)
toCountFont(sendCommentEditor.id, "html");
else
toCountFont(sendCommentEditor.id, "text");
}
function showMsgLeftCnt() {
if(!bLoaded)
top.includeJS('/qzone/blog/script/common.js', function(){bLoaded=true;showMsgLeftCnt();}, document);
else
showLeftSMS();
}
function selectBlogPaper() {
if(checkLogin() <= 10000) {
top.showLoginBox("mall");
return;
}
if(!!top.g_JData["blogContent"]) {
if(parent.g_iLoginUin == parent.g_iUin) {
location.href="/qzone/newblog/blogeditor.html?paperid=" + parent.g_JData["blogContent"].data.lp_id + "&paperstyle=" + parent.g_JData["blogContent"].data.lp_style + "&paperdialog=1";
}
else {
parent.location.href="http://user.qzone.qq.com/" + parent.g_iLoginUin + "/addNewBlog?paperid=" + parent.g_JData["blogContent"].data.lp_id + "&paperstyle=" + parent.g_JData["blogContent"].data.lp_style;
}
}
else {
top.showMsgBox("抱歉,暂时无法获取该信纸信息!", 1, 2000);
}
}
/**
* 批量删除中选择全选
*/
function selectAllComments(bChecked) {
var oList = document.getElementsByName("commentCheckBox");
if(oList.length==0)
return;
for(var i=0; i<oList.length; ++i){
oList
.checked = !!bChecked;
}
}
function showCommentCheckBoxs(bShow, bCheck){
var oList = document.getElementsByName("commentCheckBox");
if(oList.length==0)
return;
for(var i=0; i<oList.length; ++i){
oList.style.display = ((!!bShow) ? "" : "none");
if(!!bCheck) oList.checked = true;
else oList.checked = false;
}
if(!!bCheck) $("batchSelAllInput").checked = true;
else $("batchSelAllInput").checked = false;
$("leftDeleteComParag").style.display = ((!!bShow) ? "" : "none");
$("batchDelComHref").style.display = ((!!bShow) ? "none" : "");
$("noBatchDelComHref").style.display = ((!!bShow) ? "" : "none");
}
/**
* 名博批量删除评论
*/
function deleteBatchComments() {
if(!contentProperty) return;
var oList = document.getElementsByName("commentCheckBox");
if(oList.length==0) {
return;
}
var tmp;
var strCommentList = '';
var strArchList = '';
var nDeleteCnt = 0;
for(var i=0; i<oList.length; ++i){
if(oList.checked) {
tmp = oList.value.split('_')
strCommentList += ('-' + tmp[0]);
strArchList += ('-' + tmp[1]);
++nDeleteCnt;
}
}
strCommentList = strCommentList.substr(1);
strArchList = strArchList.substr(1);
if(nDeleteCnt == 0) {
parent.showMsgbox("请选择要删除的评论", 0, 2000);
return;
}
if(!!contentProperty && contentProperty.totalCommentNumber < nDeleteCnt)
return;
if(!confirm("您是否要删除选中的用户评论?")) return;
parent.loadXMLAsyncNoCache("delBatchReply", "http://"+BLOG_DOMAIN+CGI_PATH+"blog_batch_del_comment",
function(){
if(parent.g_XDoc["delBatchReply"].selectNodes("error").length > 0){
dalert(null, parent.g_XDoc["delBatchReply"].xml, 2000);
delete parent.g_XDoc["delBatchReply"];
return;
}
dalert(null, parent.g_XDoc["delBatchReply"].xml, 2000, 2);
contentProperty.totalCommentNumber -= nDeleteCnt;
//清理cache
with(contentProperty){
delete parent.g_XDoc["blogRoot"].contentHSList[currentBlogid];
pageList = {};
pageIndexMap = [];
currentCommentPage = lastCommentPage = (!contentProperty.nowaPage)?0:nowaPage[3];
parent.g_XDoc["blogRoot"].replyNumUpdateHSmap[currentBlogid] = totalCommentNumber;
parent.isRefreshTop = true;
if(currentCommentPage == 0) {
setTimeout(contentInit, 1000);
}
else{
var tp = Math.ceil(totalCommentNumber/PAGE_COMMENT_NUM);
var num = totalCommentNumber%PAGE_COMMENT_NUM;
if(num==0 || currentCommentPage<tp-1)
num = PAGE_COMMENT_NUM;
getOnePageComment(num, nowaPage[0], nowaPage[1], nowaPage[2], blogCommentListCallback, 1);
$("commentCount3").innerHTML = totalCommentNumber;
}
}
delete top.g_XDoc["delBatchReply"];
showCommentCheckBoxs(false, false);
},
function(){
dalert(null, BUSY_MSG, 2000);
delete parent.g_XDoc["delBatchReply"];
},
"uin="+parent.g_iLoginUin+"&blogid="+contentProperty.currentBlogid+"&archlist="+strArchList.URLencode()+"&replyidlist="+strCommentList.URLencode()
);
}
/**
* 有评论或没有时显示/隐藏相关element
*/
function showElementsAnyReply(bShow) {
var strCss = !!bShow ? "" : "none";
if(isStar && parent.g_iUin == parent.g_iLoginUin) {
$("starDeleteComDiv").style.display = strCss;
}
if(parent.g_bBlogShowCheatHint == true)
$("commentHintDiv").style.display = strCss;
}
/**
* 关闭提防上当提示信息
*/
function closeCheatHint() {
parent.g_bBlogShowCheatHint = false;
$('commentHintDiv').style.display = 'none';
}
setLoginStatus();
var frmComment=document.getElementById("commendForm");
if(!isSmall)
document.body.onkeydown=scrollBlog;
if((isStar || isBiz) && (top.g_iLoginUin!=top.g_iUin)){
frmComment.hassign.checked=false;
$("startToolSelect").style.display="none";
}
if(top.g_iLoginUin>10000 && top.g_iLoginUin!=top.g_iUin) {
$("msgboardSelfReply").style.display = "";
$("blogSelPaper").title = "我也要使用此信纸写日志";
}
setTimeout(contentInit,50);
//]]>
</script>
</body>
</html>