pjblog首页及全站日志纯静态插件v1.1[6月7日更新]

下面加入:
                        
call NewComment()
                        call blog_makehtml(blogid)


找到:
    if LinkMain then
      session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 置顶成功!"
     else
      session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 取消首页置顶!"
    end if


在下面加入:
    
call Bloglinks()

找到:
    Session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 删除成功!"
    Bloglinks(2)
    PostLink


在下面加入:
    
call Bloglinks()


2.打开common下的function.asp
从第二行开始插入:

'*************************************
'删除静态文章
'*************************************
function delfile(fileurl)
    on error resume next
    dim fso
    set fso=server.Cr�ateObject("Scripting.FileSystemObject")
    IF fso.FileExists(FilePath) Then
    fso.Del�teFile server.MapPath("/" & fileurl),true
    End IF
    set fso=nothing
end function

'*************************************
'生成分类
'*************************************
function Categoryid(typeid)
     Dim Arr_Category,i,log_Category
         TempVar=""
         SQL="Sel�ct cate_ID,cate_Name,cate_Order,cate_Intro,cate_OutLink,cate_URL,cate_icon,cate_count,cate_Lock,cate_local,cate_Secret FROM blog_Category oDER BY cate_Order ASC"
         Set log_Category=Conn.Execute(SQL)
         SQLQueryNums=SQLQueryNums+
         if log_Category.eof o log_Category.bof then
              ReDim Arr_Category(0,0)
         else
              Arr_Category=log_Category.GetRows()
         end if
         Set log_Category=Nothing

    Dim Category_Len,Menu_Diver
    '--------------输出日志横向菜单------------------
    if typeid=0 then
            Menu_Diver=""
            Category_code="<div id=""menu""><div id=""Left""></div><div id=""Right""></div><ul><li class=""menuL""></li>"

            if ubound(Arr_Category,)=0 then
            Category_code=Category_code&"<li class=""menuR""></li></ul></div>"
                exit function
            end if
            
            Category_Len=ubound(Arr_Category,2)
            
            For i=0 to Category_Len
                    if int(Arr_Category(9,i))=0 o int(Arr_Category(9,i))= then
                    Response.Write(Menu_Diver)
                       if Arr_Category(4,i) then
                          if cbool(Arr_Category(0,i)) then
                              if stat_ShowHiddenCate o stat_Admin then
                             Category_code=Category_code&"<li><a class=""menuA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
                             end if
                           else
                             Category_code=Category_code&"<li><a class=""menuA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
                          end if
                        else
                          if cbool(Arr_Category(0,i)) then
                              if stat_ShowHiddenCate o stat_Admin then
                             Category_code=Category_code&"<li><a class=""menuA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
                             end if
                           else
                             Category_code=Category_code&"<li><a class=""menuA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
                          end if
                      end if
                       Category_code=Category_code&"<li class=""menuDiv""></li>"
                    end if
            Next
            
            Category_code=Category_code&"<li class=""menuR""></li></ul></div>"
    Category_code="document.write ('"&Category_code&"');"
    call shengchengjs(Category_code,"Category_h.js")
    end if

    if typeid= then
            Category_code=""
            if ubound(Arr_Category,)=0 then exit function
                
            Category_Len=ubound(Arr_Category,2)
                
            For i=0 to Category_Len
                if int(Arr_Category(9,i))=0 o int(Arr_Category(9,i))=2 then
                 if Arr_Category(4,i) then
                      if cbool(Arr_Category(0,i)) then
                           if stat_ShowHiddenCate o stat_Admin then Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a><br/>")
                       else
                           Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a><br/>")
                      end if
                 else
                      if cbool(Arr_Category(0,i)) then
                           if stat_ShowHiddenCate o stat_Admin then Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&" ["&Arr_Category(7,i)&"]</a> <a href=""feed.asp?cateID="&Arr_Category(0,i)&""" title=""订阅该分类内容""><img src=""images/rss.png"" border=""0"" style=""margin:3px 4px -px 0px;"" alt=""""/></a><br/>")
                       else
                           Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&" ["&Arr_Category(7,i)&"]</a> <a href=""feed.asp?cateID="&Arr_Category(0,i)&""" title=""订阅该分类内容""><img src=""images/rss.png"" border=""0"" style=""margin:3px 4px -px 0px;"" alt=""""/></a><br/>")
                      end if
                 end if
                end if
            Next
    Category_code="document.write ('"&Category_code&"');"
    call shengchengjs(Category_code,"Category_s.js")
    end if
end function

'*************************************
'生成最新文章
'*************************************
function Newarticle()
             Dim blog_Article
                 Dim book_Articles,book_Article
                 Set book_Articles=Conn.Execute("Sel�ct top 0 C.log_ID,C.log_Author,C.log_IsShow,C.log_PostTime,C.log_title,L.cate_ID,L.cate_Secret FROM blog_Content AS C,blog_Category AS L wh�re L.cate_ID=C.log_CateID and L.cate_Secret=false and C.log_IsDraft=false oder by log_PostTime Desc")
                 SQLQueryNums=SQLQueryNums+
                 TempVar=""
                 Do While Not book_Articles.EOF
                     if book_Articles("cate_Secret") then
                       book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&"[隐藏分类日志]"
                      elseif book_Articles("log_IsShow") then
                       book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&book_Articles("log_title")
                      else
                       book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&"[隐藏日志]"
                     end if
                     TempVar="|$|"
                     book_Articles.MoveNext
                 Loop
                 Set book_Articles=Nothing
                 blog_Article=Split(book_Article,"|$|")
            
              dim Article_Items,Article_Item
                 For Each Article_Items IN blog_Article
                  Article_Item=Split(Article_Items,"|,|")
                  NewArticle=NewArticle&"<a class=""sideA"" href=""article"&Article_Item(0)&".html"">"&CCEncode(CutStr(Article_Item(3),25))&"</a>"
                 Next
        NewArticle="document.write ('"&NewArticle&"');"
    call shengchengjs(NewArticle,"NewArticle.js")
end function

'*************************************
'生成最新评论
'*************************************
function NewComment()
'=====================最新评论缓存=====================
    Dim blog_Comment,ShowLen,i
    ShowLen=0 '显示最新评论预览数量
    '-----------------写入最新评论缓存--------------------
        Dim log_Comments
        SQL="Sel�ct top "&ShowLen&" comm_ID,blog_ID,comm_Author,comm_Content,comm_PostTime" &_
            " FROM blog_Comment as C,blog_Content as T,blog_Category as A wh�re C.blog_ID=T.log_ID and T.log_IsShow=true and T.log_CateID=A.cate_ID and A.cate_Secret=false oder by C.comm_PostTime Desc"
        Set log_Comments=Conn.Execute(SQL)
        SQLQueryNums=SQLQueryNums+
        if log_Comments.eof o log_Comments.bof then
                ReDim blog_Comment(0,0)
            else
                blog_Comment=log_Comments.GetRows(ShowLen)
            end if
        Set log_Comments=Nothing

    '-----------------读取最新评论缓存--------------------
          dim Comment_Item_Len,NewComment
          Comment_Item_Len=ubound(blog_Comment,2)
          For i=0 to Comment_Item_Len
                 NewComment=NewComment&"<a class=""sideA"" href=""article"&blog_Comment(,i)&".html#comm_"&blog_Comment(0,i)&""" title=""评  论  人:"&blog_Comment(2,i)&"
评论时间:"&blog_Comment(4,i)&"
评论内容:"&CCEncode(CutStr(DelQuote(blog_Comment(3,i)),00))&""">"&CCEncode(CutStr(DelQuote(blog_Comment(3,i)),25))&"</a>"
          Next
    NewComment="document.write ('"&NewComment&"');"
    call shengchengjs(NewComment,"NewComment.js")
end function

'*************************************
'生成最新留言
'*************************************
function NewMessage()
             Dim blog_Message
                 Dim book_Messages,book_Message
                 Set book_Messages=Conn.Execute("Sel�ct top 0 * FROM blog_book oder by book_PostTime Desc")
                 SQLQueryNums=SQLQueryNums+
                 TempVar=""
                 Do While Not book_Messages.EOF
                     if book_Messages("book_HiddenReply") then
                        book_Message=book_Message&TempVar&book_Messages("book_ID")&"|,|"&book_Messages("book_Messager")&"|,|"&book_Messages("book_PostTime")&"|,|"&"[隐藏留言]"
                      else
                        book_Message=book_Message&TempVar&book_Messages("book_ID")&"|,|"&book_Messages("book_Messager")&"|,|"&book_Messages("book_PostTime")&"|,|"&book_Messages("book_Content")
                     end if
                     TempVar="|$|"
                     book_Messages.MoveNext
                 Loop
                 Set book_Messages=Nothing
                 blog_Message=Split(book_Message,"|$|")
            
              dim Message_Items,Message_Item,NewMessage
                 For Each Message_Items IN blog_Message
                  Message_Item=Split(Message_Items,"|,|")
                  NewMessage=NewMessage&"<a class=""sideA"" href=""LoadMod.asp?plugins=GuestBookForPJBlog#book_"&Message_Item(0)&""" title=""留  言  人:"&Message_Item()&"
留言时间:"&Message_Item(2)&"
留言内容:"&CCEncode(CutStr(Message_Item(3),25))&""">"&CCEncode(CutStr(Message_Item(3),25))&"</a>"
                 Next
    NewMessage="document.write ('"&NewMessage&"');"
    call shengchengjs(NewMessage,"NewMessage.js")
end function

'*************************************
'生成热门日志
'*************************************
function HotArticle()
     Dim blog_HotArticle
        Dim book_HotArticles,book_HotArticle
        Set book_HotArticles=Conn.Execute("Sel�ct top 0 C.*,L.cate_ID,L.cate_Secret FROM blog_Content AS C,blog_Category AS L wh�re L.cate_ID=C.log_CateID and L.cate_Secret=false and C.log_IsDraft=false oder by log_ViewNums Desc")
        SQLQueryNums=SQLQueryNums+
        TempVar=""
        Do While Not book_HotArticles.EOF
            if book_HotArticles("cate_Secret") then
               book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&"[隐藏分类日志]"
             elseif book_HotArticles("log_IsShow") then
               book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&book_HotArticles("log_title")
             else
               book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&"[隐藏日志]"
            end if
            TempVar="|$|"
            book_HotArticles.MoveNext
        Loop
        Set book_HotArticles=Nothing
        blog_HotArticle=Split(book_HotArticle,"|$|")
    
      dim HotArticle_Items,HotArticle_Item
        For Each HotArticle_Items IN blog_HotArticle
         HotArticle_Item=Split(HotArticle_Items,"|,|")
         HotArticle=HotArticle&"<a class=""sideA"" href=""article"&HotArticle_Item(0)&".html"">"&CCEncode(CutStr(HotArticle_Item(3),25))&"</a>"
        Next
        HotArticle="document.write ('"&HotArticle&"');"
    call shengchengjs(HotArticle,"HotArticle.js")
end function

'*************************************
'生成友情链接
'*************************************
function Bloglinks()
Dim Arr_Bloglinks,Bloglinks
    Bloglinks=Bloglinks&" <div id=link_logo style=""OVERFLOW: hidden; WIDTH: 75px; HEIGHT: 200px""><div id=link_logo style=""OVERFLOW: hidden"">"
    Dim log_Bloglinks,log_BloglinksList
    Set log_BlogLinks=Conn.ExeCute("Sel�ct link_Name,link_URL,link_Image FROM blog_Links Wh�re link_IsMain=True oDER BY link_Order ASC")
    SQLQueryNums=SQLQueryNums+
    TempVar=""
    Do While Not log_BlogLinks.EOF
        IF log_BlogLinks("link_Image")<>Empty Then
            log_BloglinksList=log_BloglinksList&TempVar&log_BlogLinks("link_Name")&"$|$"&log_BlogLinks("link_URL")&"$|$"&log_BlogLinks("link_Image")
        Else
            log_BloglinksList=log_BloglinksList&TempVar&log_BlogLinks("link_Name")&"$|$"&log_BlogLinks("link_URL")&"$|$None"
        End IF
        TempVar="|$|"
        log_BlogLinks.MoveNext
    Loop
    Set log_BlogLinks=Nothing
    Arr_Bloglinks=Split(log_BloglinksList,"|$|")

   Dim Arr_Bloglink,Arr_BloglinkItem,ImgLink,TextLink
'   Bloglinks=""
   for each Arr_Bloglink in Arr_Bloglinks
    Arr_BloglinkItem=Split(Arr_Bloglink,"$|$")
    if blog_ImgLink then
      if Arr_BloglinkItem(2)="None" then
       TextLink=TextLink&"<a class=""sideA"" href="""&Arr_BloglinkItem()&""" target=""_blank"" title="""&Arr_BloglinkItem(0)&""">"&Arr_BloglinkItem(0)&"</a>"
      else
       ImgLink=ImgLink&"<a href="""&Arr_BloglinkItem()&""" target=""_blank"" title="""&Arr_BloglinkItem(0)&"""><img src="""&Arr_BloglinkItem(2)&""" border=""0"" alt="""" style=""width:85px;height:30px""/></a> "
      end if
     else
      Bloglinks=Bloglinks&"<a class=""sideA"" href="""&Arr_BloglinkItem()&""" target=""_blank"" title="""&Arr_BloglinkItem(0)&""">"&Arr_BloglinkItem(0)&"</a>"
    end if
   next
   if blog_ImgLink then Bloglinks=Bloglinks&ImgLink&TextLink

  Bloglinks=Bloglinks&"</div><div id=link_logo2></div></div>"
  Bloglinks=Bloglinks&"<script>var speed=65;"
  Bloglinks=Bloglinks&"link_logo2.innerHTML=link_logo.innerHTML;"
  Bloglinks=Bloglinks&"  function Marquee2(){"
Bloglinks=Bloglinks&"      if(link_logo2.offsetTop-link_logo.scrollTop<=0)"
Bloglinks=Bloglinks&"         link_logo.scrollTop-=link_logo.offsetHeight;"
Bloglinks=Bloglinks&"           else{"
Bloglinks=Bloglinks&"            link_logo.scrollTop++;"
Bloglinks=Bloglinks&"               }"
Bloglinks=Bloglinks&"                  }"
Bloglinks=Bloglinks&"                     var MyMar2=setInterval(Marquee2,speed);"
Bloglinks=Bloglinks&"                        link_logo.onmouseover=function() {clearInterval(MyMar2)};"
Bloglinks=Bloglinks&"                           link_logo.onmouseout=function() {MyMar2=setInterval(Marquee2,speed)}"
Bloglinks=Bloglinks&"</script>"
'=====================End Function=======================

    Bloglinks="document.write ('"&Bloglinks&"');"
    call shengchengjs(Bloglinks,"Bloglinks.js")
end function

'*************************************
'生成日志归档缓存
'*************************************
function archive()
    Dim blog_archive,i,archive
    '-----------------写入日志归档缓存--------------------
        Dim log_archives
        SQL="Sel�ct Count(log_ID) AS [count], Year([log_PostTime]) AS PostYear, Month([log_PostTime]) AS PostMonth " &_
            "FROM blog_Content wh�re blog_Content.log_IsDraft=false "&_
            "GROUP BY Year([log_PostTime]), Month([log_PostTime]) "&_
            "ORDER BY Year([log_PostTime]) Desc, Month([log_PostTime]) Desc"
        Set log_archives=Conn.Execute(SQL)
        SQLQueryNums=SQLQueryNums+
        if log_archives.eof o log_archives.bof then
            ReDim blog_archive(0,0)
        else
            blog_archive=log_archives.GetRows()
        end if
        Set log_archives=Nothing
    
    '-----------------读取日志归档缓存--------------------
            Dim archive_item_Len,Month_array
            Month_array=Array("0月","02月","03月","04月","05月","06月","07月","08月","09月","0月","月","2月")
            archive_item_Len=ubound(blog_archive,2)
            dim myear
            myear=""
            For i=0 to archive_item_Len
                if myear=blog_archive(,i) then
                    archive=archive&"<a href=""default.asp?log_Year="&blog_archive(,i)&"&log_Month="&blog_archive(2,i)&""" title=""查看当前日期的日志"">"&Month_array(blog_archive(2,i)-)&"["&blog_archive(0,i)&"] </a>"
                else
                    myear=blog_archive(,i)
                    archive=archive&"<a class=""sideA"" href=""#"">"&blog_archive(,i)&"年</a>"
                    archive=archive&"<a href=""default.asp?log_Year="&blog_archive(,i)&"&log_Month="&blog_archive(2,i)&""" title=""查看当前日期的日志"">"&Month_array(blog_archive(2,i)-)&"["&blog_archive(0,i)&"] </a>"
                end if
            Next
    archive="document.write ('"&archive&"');"
    call shengchengjs(archive,"archive.js")
end function

'*************************************
'生成JS
'*************************************
function shengchengjs(foolcat,foldername)
    dim FolderPath,fso,fout
    FolderPath = Server.MapPath("/pjblog/js")  '请根据你的实际情况修改。
    Set fso = Server.Cr�ateObject("Scripting.FileSystemObject")
    If not (fso.FolderExists(FolderPath)) Then
       Set f = fso.Cr�ateFolder(FolderPath)
    End If  
    Set fout = fso.Cr�ateTextFile(FolderPath&"\"&foldername)  
    fout.WriteLine foolcat  
    fout.close  
    set fout = nothing  
end function

3

上一页  [1] [2] [3] [4] [5] [6] [7]  下一页



[本日志由 小戒 于 2008-05-27 08:24 AM 编辑]
上一篇: 习惯性用语--周末愉快
下一篇: 北京海淀艺术职业学校高中生欺辱年迈教师[视频录象]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: PJBLOG 静态 插件 日志
相关日志:
评论: 7 | 引用: 0 | 查看次数: -
Jared
回复回复Jared[2007-07-09 11:39 PM | | | del]
你好!
可以把修改好的原版用邮箱发给我吗?官网上面这个下载有木马,我下了好多次都不行,谢谢了。
shenshu#188.com

非病毒,纯属误报。关掉再解压就行了。生成HTML时的代码被当成病毒了。
小戒
回复回复小戒[2007-06-07 10:16 PM | | | del]
回SKYII.CN,如果是新站可以直接覆盖。但我本地测试的新站删掉了。在服务器上。呆会放上去。
skyii.cn
回复回复skyii.cn[2007-06-07 10:08 PM | | | del]
可以直接提供修改的文件吗?
小戒
回复回复小戒[2007-06-05 05:17 PM | | | del]
蔷薇,你的网站我打不开。
蔷薇
回复回复蔷薇[2007-06-05 04:35 PM | | | del]
你好啊,我完全用了你的方法已经修改过了,但是还是不行呢,为什么啊,
请看看我的地址依然是动态的,http://rose.0start.cn
小戒
回复回复小戒[2007-05-28 09:28 AM | | | del]
推荐你用Macromedia Dreamweaver 8
he
回复回复he[2007-05-28 08:55 AM | | | del]
你的博客不错,请问,用什么来编辑asp文件,
发表评论
昵 称:
密 码: 游客发言不需要密码.
邮 箱: 支持Gravatar头像.
网 址: 输入网址便于回访.
内 容:
验证码:
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.