1.全面兼容UBB和FCK編輯器
2.實現上傳的附件防盜鏈功能(后臺可以關閉此功能)
3.實現上傳的圖片添加水印的功能,后臺有水印功能的相關設置
4.自帶后臺管理,可以對上傳的附件信息進行修改
5.后臺可以添加附件信息,可以實現對文件路徑的隱藏功能
6.當用戶下載附件時,可記錄附件的下載次數以及顯示附件的大小信息
7.整合wbc的附件清理功能,可在線刪除上傳的附件
8.可自行選擇附件防盜鏈方式
……
附件管理插件 V3.0 For PJBlog2
1.修正了2.0中的BUG
2.增強了防盜鏈的性能
3.增加了文字防盜鏈方式,文字內容后臺可以設置
4.新版本插件增加了對影音文件的防盜鏈
5.新增了附件類型的自動識別功能
安裝方法共3步
第一步:用”Dreamweaver網頁編輯器“打開 header.asp
找到 
程序代碼
Dim BlogTitle
改成 
程序代碼
response.cookies("shotan")= "ilankpj"
Session("shotan")="ilankpj"
Dim BlogTitle
注意:設置cookie時候,可以將這個值 ilankpj 改為其他的值,或者你可以用一個隨機函數給他們賦值,不過一定要和download.asp中的 if Request.cookies("shotan")= "ilankpj" 一起修改,保證兩值相同。
第二步:用”Dreamweaver網頁編輯器“打開 common/ubbcode.asp
找到 
程序代碼
'-----------特殊標簽----------------
re.Pattern = "\[down=(.[^\]]*)\](.[^\[]*)\[\/down]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
tmpStr2=strMatch.SubMatches(1)
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""下載文件"" style=""margin:0px 2px -4px 0px""/> <a href="""&tmpStr1&""" target=""_blank"">"&tmpStr2&"</a>",1,-1,0)
Next
re.Pattern = "\[down\](.[^\[]*)\[\/down]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""下載文件"" style=""margin:0px 2px -4px 0px""/> <a href="""&tmpStr1&""" target=""_blank"">下載此文件</a>",1,-1,0)
Next
re.Pattern = "\[mDown=(.[^\]]*)\](.[^\[]*)\[\/mDown]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
tmpStr2=strMatch.SubMatches(1)
if len(memName)>0 then
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""下載文件"" style=""margin:0px 2px -4px 0px""/> <a href="""&tmpStr1&""" target=""_blank"">"&tmpStr2&"</a>",1,-1,0)
else
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""只允許會員下載"" style=""margin:0px 2px -4px 0px""/> 該文件只允許會員下載! <a href=""login.asp"">登錄</a> | <a href=""register.asp"">注冊</a>",1,-1,0)
end if
Next
re.Pattern = "\[mDown\](.[^\[]*)\[\/mDown]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
if len(memName)>0 then
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""下載文件"" style=""margin:0px 2px -4px 0px""/> <a href="""&tmpStr1&""" target=""_blank"">下載此文件</a>",1,-1,0)
else
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""只允許會員下載"" style=""margin:0px 2px -4px 0px""/> 該文件只允許會員下載! <a href=""login.asp"">登錄</a> | <a href=""register.asp"">注冊</a>",1,-1,0)
end if
Next
替換成

程序代碼
'-----------特殊標簽----------------
re.Pattern = "\[down=(download\.asp\?id=)([0-9]*)\](.[^\[]*)\[\/down]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
tmpStr2=strMatch.SubMatches(1)
tmpStr3=strMatch.SubMatches(2)
strContent=Shotan_Download(strContent,strMatch.Value,tmpStr1,tmpStr2,tmpStr3)
Next
re.Pattern = "\[down\](download\.asp\?id=)([0-9]*)\[\/down\]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
tmpStr2=strMatch.SubMatches(1)
strContent=Shotan_Download(strContent,strMatch.Value,tmpStr1,tmpStr2,"")
Next
re.Pattern = "\[mDown=(download\.asp\?id=)([0-9]*)\](.[^\[]*)\[\/mDown]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
tmpStr2=strMatch.SubMatches(1)
tmpStr3=strMatch.SubMatches(2)
if len(memName)>0 then
strContent=Shotan_Download(strContent,strMatch.Value,tmpStr1,tmpStr2,tmpStr3)
else
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""只允許會員下載"" style=""margin:0px 2px -4px 0px""/> 該文件只允許會員下載! <a href=""login.asp"">登錄</a> | <a href=""register.asp"">注冊</a>",1,-1,0)
end if
Next
re.Pattern = "\[mDown\](download\.asp\?id=)([0-9]*)\[\/mDown]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
if len(memName)>0 then
strContent=Shotan_Download(strContent,strMatch.Value,tmpStr1,tmpStr2,"")
else
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""只允許會員下載"" style=""margin:0px 2px -4px 0px""/> 該文件只允許會員下載! <a href=""login.asp"">登錄</a> | <a href=""register.asp"">注冊</a>",1,-1,0)
end if
Next
如果你的博客中用以前的方法添加的附件較多,你可以在上面的語句修改完之后,接著再加入
程序代碼
'=====================兼容以前的附件==================================
re.Pattern = "\[down=attachments\/(.[^\]]*)\](.[^\[]*)\[\/down]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
tmpStr2=strMatch.SubMatches(1)
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""下載文件"" style=""margin:0px 2px -4px 0px""/> <a href=""attachments/"&tmpStr1&""" target=""_blank"">"&tmpStr2&"</a>",1,-1,0)
Next
re.Pattern = "\[down\]attachments\/(.[^\[]*)\[\/down]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""下載文件"" style=""margin:0px 2px -4px 0px""/> <a href=""attachments/"&tmpStr1&""" target=""_blank"">下載此文件</a>",1,-1,0)
Next
re.Pattern = "\[mDown=attachments\/(.[^\]]*)\](.[^\[]*)\[\/mDown]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
tmpStr2=strMatch.SubMatches(1)
if len(memName)>0 then
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""下載文件"" style=""margin:0px 2px -4px 0px""/> <a href=""attachments/"&tmpStr1&""" target=""_blank"">"&tmpStr2&"</a>",1,-1,0)
else
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""只允許會員下載"" style=""margin:0px 2px -4px 0px""/> 該文件只允許會員下載! <a href=""login.asp"">登錄</a> | <a href=""register.asp"">注冊</a>",1,-1,0)
end if
Next
re.Pattern = "\[mDown\]attachments\/(.[^\[]*)\[\/mDown]"
Set strMatchs=re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1=checkURL(strMatch.SubMatches(0))
if len(memName)>0 then
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""下載文件"" style=""margin:0px 2px -4px 0px""/> <a href=""attachments/"&tmpStr1&""" target=""_blank"">下載此文件</a>",1,-1,0)
else
strContent=replace(strContent,strMatch.Value,"<img src=""images/download.gif"" alt=""只允許會員下載"" style=""margin:0px 2px -4px 0px""/> 該文件只允許會員下載! <a href=""login.asp"">登錄</a> | <a href=""register.asp"">注冊</a>",1,-1,0)
end if
Next
'=====================兼容以前的附件==================================
第三步:上傳
1.將下載壓縮包中的download.asp文件上傳到網站的根目錄下
2.將下載壓縮包中的attachment.asp文件上傳到網站的根目錄下,覆蓋原來的attachment.asp
3.將下載壓縮包中的Attachment文件夾上傳到自己博客的Plugins/文件夾下,然后進博客后臺將插件安裝一下
說明:如果不會修改或者從沒有修改過博客源碼,可以直接把 header.asp 與 common/ubbcode.asp 上傳到博客目錄覆蓋。
注意:進行此操作前先做好文件備份,以便造成不必要的麻煩
下載:附件防盜鏈-管理插件
下載此文件]]>