pjblog3升级成功



pjblog3出来好多天了,一直没有升级,主要是怕麻烦,因为改动了一些程序,不过今天还是彻底的升级了,遇到些小问题,很快就解决了。

第一个:PJBlog统计模块拓展代码全集最新版 增加"现有"、"待审链接"

如果原来你的blog增加了这功能,那你升级之后肯定是有问题,显示不出数据。要改也很简单,打开common\library.asp文件,查找 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))



OK,保存上传就好了!

第二个:google广告没了

如果你选择的是动态或半静态模式,那修改方法和pjblog2差不多,请参考:http://www.zjidea.com/blog/article.asp?id=298

如果你选择的是静态模式,那找到\Template\static.htm文件,在static.htm文件中找到
程序代码 程序代码

<div id="logPanel" class="Content-body">

在其下面一行加入
程序代码 程序代码

<script type="text/javascript">
<!--
    google_ad_client = "pub-0118456947092670";
                                google_ad_width = 728;
                                google_ad_height = 90;
                                google_ad_format = "728x90_as";
                                google_ad_type = "text_image";
                                google_ad_channel = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

注意,上面的代码是我的,你得改成你的Google广告代码
然后保存上传,更新缓存,重新生成日志文件即可。

第三个:wbc防盗链插件失效
注意,在全静态模式下不能用插件
我换到半静态下用的

修改方法:
1、在根目录下的conn.asp文件,在文件中找到如下代码:
程序代码 程序代码

<%
Call createConnection(AccessFile)
%>


然后替换成下面的代码:
程序代码 程序代码

<%
call createConnection(AccessFile)
session("wbc_value")=day(date())%>


2、找到根目录下attachment.asp文件,在文件中找到如下代码:
程序代码 程序代码

<%
Response.Write("<form name=""frm"" enctype=""multipart/form-data"" method=""post"" action=""attachment.asp?action=upload&MSave=0""><input name=""File"" type=""File"" size=""28"" style=""font-sizepx;border-width:1px""> <input type=""Submit"" name=""Submit"" value=""确定上传"" class=""userbutton""><input type=""checkbox"" name=""MemberDown"" value=""1"" id=""Md"" onclick=""MSave(this)"" title=""只对UBB编辑有效,媒体文件包括图片无效""/><label for=""Md"" title=""只对UBB编辑有效,媒体文件包括图片无效"">此文件只允许会员下载 </label></form>")
End If
Else
    Response.Write("<div style=""padding:6px;color:#f00"">对不起,你没有权限上传附件!</div>")
End If
%>


然后替换成下面的代码:
程序代码 程序代码

<%
Response.Write("<form name=""frm"" enctype=""multipart/form-data"" method=""post"" action=""attachment.asp?action=upload&MSave=0""><input name=""File"" type=""File"" size=""28"" style=""font-sizepx;border-width:1px""> <input type=""Submit"" name=""Submit"" value=""确定上传"" class=""userbutton""><input type=""checkbox"" name=""MemberDown"" value=""1"" id=""Md"" onclick=""MSave(this)"" title=""只对UBB编辑有效,媒体文件包括图片无效""/><label for=""Md"" title=""只对UBB编辑有效,媒体文件包括图片无效"">此文件只允许会员下载 <a href='wbc_upload.asp'>防盗链上传</a></label></form>")
End If
Else
    Response.Write("<div style=""padding:6px;color:#f00"">对不起,你没有权限上传附件!</div>")
End If
%>


然后保存上传,OK搞定!

注意:以上所说的方法都是原来已经存在的功能,如果你是全新安装则有其它地方要修改,请到官方论坛查找相关贴子




文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: blog3
评论: 1 | 引用: 0 | 查看次数: -
回复回复灵犀札记[2008-09-30 01:09 AM | del]
PJ终于还是升级了,哈哈
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.