官方首页 | 无图版 | BBS首页
PJBlog3 2.8.5.157 新版发布 下载|升级(2008.8.26) 来给PJ3提提发展建议 2008版 PJHOME 珍藏/纪念版官方T恤 正式发布! PJ3内测团队主创人员身份,性格,特点吐血大曝光
PJBlog技术支持论坛使用问题总索引 PJ-Blog 3 斑竹日志 【独家】我使用过的三种空间,与客服的精彩故事 Z-Blog,Wordpress,Bo-Blog转换到PJBlog
 28 123
发新话题
打印

[插件使用] 附件管理插件 V2.0 ForPJBlog2

本主题由 anson 于 2008-9-10 14:56 加入精华
近来有网友反应安装本插件后,原来的下载链接没有用了,是的,安装本插件后原来的链接是没有用了,如果链接比较少的话,建议你将原来的链接都手动改过来,或着用下面的方法

在common/ubbcode.asp文件中
找到
复制内容到剪贴板
代码:
'-----------特殊标签----------------
在下面加入代码
复制内容到剪贴板
代码:
                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="""&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="""&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="""&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="""&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
注意上面的attachments是你所在的附件文件夹名称,如果你的博客附件的文件夹是其他的名称,做相应的替换即可

还有安装本插件2.0版本后不能播放影音文件,因为现版本还不支持影音文件,开发中,现解决方法和上面的一样,加入上面的代码即可

加入后的使用方法,将影音文件上传到attachments文件夹中,然后在日志中这样写:
如wma文件:[wma]attachments/05-11/y2342423452354.wma[/wma]
这样就能识别影音文件了
Welcome To Shotan's Blog

TOP

如wma文件:[wma]attachments/05-11/y2342423452354.wma[/wma]
这样就能识别影音文件了

这样是可以识别...但是这就起不到防盗链作用了,,呵呵...
能不能改一下目录下的common.js文件的播放代码中的播放文件地址调用代码??
这样就太完美啦,,期待中

TOP

Active Server Pages 错误 'ASP 0131'

不允许的父路径

/blog/Plugins/Attachment/config.asp,行 1

包含文件 '../../const.asp' 不能用 '..' 表示父目录。

TOP

回复 #1 shotan 的帖子

:handshake :handshake :handshake :handshake :handshake :handshake :handshake :handshake :handshake :handshake :handshake :handshake :handshake :handshake :handshake

TOP

此插件优点就是地址短,有后台,

有个小问题 此日志添加的是图片附件 http://iyuer.com/ilank/article.asp?id=152
评论后能正常显示
引用:
评论发表成功
你成功地对该日志发表了评论
单击返回该日志
此日志添加的是压缩附件  http://iyuer.com/ilank/article.asp?id=149

评论后能 出来的窗口无任何文字提示
不知是否与其它代码有冲突

只要是添加了压缩附件 的日志,评论后,都无文字提示

-------------------------------------------------------------------------------------

以上附件都使用了防盗链插件添加


http://iyuer.com/ilank/article.asp?id=89
这个也有附件,是用的真实地址,没有使用防盗链添加,添加评论后,有正常的文字提示,
会不会是download.asp 这个程序编写的有问题
   iLank

TOP

attachment.asp
我怎么没有这个文件呢?具体在哪里,我搜索也没有啊.

TOP

收藏。。。。。。。。。。

TOP

不错,支持

TOP

 28 123
发新话题