由于博客遭遇连续spam,Totoro的这个修改应运而生了。
相信使用gmail的朋友一定很喜欢垃圾邮件的那个清除所有垃圾邮件的链接吧,下面是给Totoro插件加上清理全部垃圾评论功能的修改方法:
打开PLUGIN/Totoro/setting1.asp,把
复制内容到剪贴板
代码:
Response.Write "
<form id=""frmBatch"" method=""post"" action=""""><p><input type=""hidden"" id=""edtBatch"" name=""edtBatch"" value=""""/><input class=""button"" type=""submit"" onclick='BatchDeleteAll(""edtBatch"");if(document.getElementById(""edtBatch"").value){this.form.action="""&ZC_BLOG_HOST&"plugin/totoro/commentdel.asp"&""";return window.confirm("""& ZC_MSG058 &""");}else{return false}' value=""删除所选择的评论"" id=""btnPost""/> <input class=""button"" type=""submit"" onclick='BatchDeleteAll(""edtBatch"");if(document.getElementById(""edtBatch"").value){this.form.action="""&ZC_BLOG_HOST&"plugin/totoro/commentpass.asp"&""";return window.confirm("""& ZC_MSG058 &""");}else{return false}' value=""通过所选择的评论"" id=""btnPost""/></p><form>
" & vbCrlf修改为:
复制内容到剪贴板
代码:
Dim comm_ID_arr
Set objRS=objConn.Execute("SELECT [comm_ID] FROM [blog_Comment] "& strSQL &" ORDER BY [comm_ID] DESC")
Do While Not objRS.Eof
comm_ID_arr=objRS(0)&","&comm_ID_arr
objRS.Movenext
Loop
Response.Write "
<form id=""frmBatch"" method=""post"" action=""""><p><input type=""hidden"" id=""edtBatch"" name=""edtBatch"" value=""""/><input class=""button"" type=""submit"" onclick='document.getElementById(""edtBatch"").value="""&comm_ID_arr&""";if(document.getElementById(""edtBatch"").value){this.form.action="""&ZC_BLOG_HOST&"plugin/totoro/commentdel.asp"&""";return window.confirm("""& ZC_MSG058 &""");}else{return false}' value=""删除所有垃圾评论"" id=""btnPost""/> <input class=""button"" type=""submit"" onclick='BatchDeleteAll(""edtBatch"");if(document.getElementById(""edtBatch"").value){this.form.action="""&ZC_BLOG_HOST&"plugin/totoro/commentdel.asp"&""";return window.confirm("""& ZC_MSG058 &""");}else{return false}' value=""删除所选择的评论"" id=""btnPost""/> <input class=""button"" type=""submit"" onclick='BatchDeleteAll(""edtBatch"");if(document.getElementById(""edtBatch"").value){this.form.action="""&ZC_BLOG_HOST&"plugin/totoro/commentpass.asp"&""";return window.confirm("""& ZC_MSG058 &""");}else{return false}' value=""通过所选择的评论"" id=""btnPost""/></p><form>
" & vbCrlf即可。