欢迎光临
我们一直在努力

PJ博客升级到3后自定义的统计代码失效修改方法

打开common文件夹下的library.asp
约在213行, 在Str = Replace(Str, "$blog_OnlineNums$", vOnline) 后面加如下代码
str=replace(str,"$blog_UnshownLinks$",blog_UnshownLinks)
str=replace(str,"$all_blog_Links$",all_blog_Links)
str=replace(str,"$All_ViewNums$",All_ViewNums)
'運行天數統計
str=replace(str,"$blog_RunDays$",DateDiff ("d","2007-06-09 ",date))
'今日評論數
str=replace(str,"$Today_blog_CommNums$",Conn.ExeCute("Select COUNT(comm_ID) FROM blog_Comment Where Year(comm_PostTime)=Year(Now) and Month(comm_PostTime)=Month(Now) and Day(comm_PostTime)=Day(Now)")(0))
'今日日志數
str=replace(str,"$Today_blog_LogNums$",Conn.ExeCute("Select COUNT(log_ID) FROM blog_Content Where Year(log_PostTime)=Year(Now) and Month(log_PostTime)=Month(Now) and Day(log_PostTime)=Day(Now)")(0))
'今日留言數
str=replace(str,"$Today_MessageNums$",Conn.ExeCute("Select COUNT(book_id) FROM blog_book Where Year(book_PostTime)=Year(Now) and Month(book_PostTime)=Month(Now) and Day(book_PostTime)=Day(Now)")(0))
'今日訪問數
str=replace(str,"$Today_VisitNums$",Conn.ExeCute("Select COUNT(coun_ID) FROM blog_Counter Where Year(coun_Time)=Year(Now) and Month(coun_Time)=Month(Now) and Day(coun_Time)=Day(Now)")(0))
'今日引用數
str=replace(str,"$Today_blog_TbCount$",Conn.ExeCute("Select COUNT(tb_ID) FROM blog_Trackback Where Year(tb_PostTime)=Year(Now) and Month(tb_PostTime)=Month(Now) and Day(tb_PostTime)=Day(Now)")(0))

约在228行, 在info_code = Str后加入

'今日日志数
str=replace(str,"$Today_blog_LogNums$",Conn.ExeCute("Select COUNT(log_ID) FROM blog_Content Where Year(log_PostTime)=Year(Now) and Month(log_PostTime)=Month(Now) and Day(log_PostTime)=Day(Now)")(0))
'今日评论数
str=replace(str,"$Today_blog_CommNums$",Conn.ExeCute("Select COUNT(comm_ID) FROM blog_Comment Where Year(comm_PostTime)=Year(Now) and Month(comm_PostTime)=Month(Now) and Day(comm_PostTime)=Day(Now)")(0))
'今日留言数
str=replace(str,"$Today_MessageNums$",Conn.ExeCute("Select COUNT(book_id) FROM blog_book Where Year(book_PostTime)=Year(Now) and Month(book_PostTime)=Month(Now) and Day(book_PostTime)=Day(Now)")(0))
'今日引用数
str=replace(str,"$Today_blog_TbCount$",Conn.ExeCute("Select COUNT(tb_ID) FROM blog_Trackback Where Year(tb_PostTime)=Year(Now) and Month(tb_PostTime)=Month(Now) and Day(tb_PostTime)=Day(Now)")(0))
'今日访问数
str=replace(str,"$Today_VisitNums$",Conn.ExeCute("Select COUNT(coun_ID) FROM blog_Counter Where Year(coun_Time)=Year(Now) and Month(coun_Time)=Month(Now) and Day(coun_Time)=Day(Now)")(0))
'待审链接数
str=replace(str,"$blog_UnshownLinks$",Conn.ExeCute("Select COUNT(link_isshow) FROM blog_Links Where link_isshow=False")(0))
'现有链接数
str=replace(str,"$all_blog_Links$",Conn.ExeCute("Select COUNT(link_isshow) FROM blog_Links Where link_isshow=True")(0))
'所有日志浏览量总和
str=replace(str,"$All_ViewNums$",Conn.Execute("Select SUM(log_ViewNums) FROM blog_Content")(0))
'运行天数统计
str=replace(str,"$blog_RunDays$",DateDiff("d","2007-06-09",date))

打开cache.asp约在第8行后面加入
,blog_UnshownLinks,all_blog_Links,All_ViewNums

约在93行blog_wapURL = CBool(blog_Infos(44, 0))'使用 wap 转换文章超链接 加入
blog_UnshownLinks = Conn.ExeCute("Select COUNT(*) FROM blog_Links Where link_isshow=False")(0) '待审连接数
all_blog_Links = Conn.ExeCute("Select COUNT(*) FROM blog_Links Where link_isshow=True")(0)
All_ViewNums = Conn.ExeCute("Select SUM(log_ViewNums) FROM blog_Content")(0)

不想修改的请直接下载文件覆盖就行
下载地址:
[mDown=attachments/month_0807/d2008725133719.rar]点击下载此文件[/mDown]

历史上的今天
7 月
25
赞(0) 打赏
未经允许不得转载:席天卷地个人博客 » PJ博客升级到3后自定义的统计代码失效修改方法
分享到: 更多 (0)
标签:

评论 抢沙发

评论前必须登录!

 

QQ :13945502电话:13913571631

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

×
订阅图标按钮