|
安装前请备份inc/dv_ubbcode.asp,以便错误时恢复或卸载本插件之用。
附件中提供了修改好的 inc/dv_ubbcode.asp 文件 如果你要手动修改只需上传 Dv_Exif.asp 到论坛根目录即可
修改步骤:
1,inc/dv_ubbcode.asp
在顶部添加- <!--#include file="../Dv_exif.asp"-->
复制代码 2,查找- s = Replace(s,"LoadTime","LoadTime.")
复制代码 下面添加- s = Replace(s,"ExifInfo","ExifInfo.") 'Exif相片信息
复制代码 3,查找- Private Function Dv_UbbCode_U(strText,PostUserGroup,Flag) '(帖子内容,用户组,是否开放图片标签)
- Dim s
- Dim downUrl
- Dim Match
复制代码 下面添加4,查找- s= re.Replace(s,"<br/><img "& DV_UBB_TITLE &" src=""skins/default/filetype/$1.gif"" border=""0"" />此主题相关图片如下:$3<br/><a href="""&Dvbbs.Forum_Setting(76)&"$4"" target=""_blank"" ><img "& DV_UBB_TITLE &" src="""&Dvbbs.Forum_Setting(76)&"$4"" border=""0"" alt=""按此在新窗口浏览图片"" /></a>")
复制代码 改为
- rem 添加Exif相片信息 add by reoaiq at 091211 Start
- Dim F_i_e,F_FileNames,x2,SqlStr_e,F_RS_e,F_Del_e,F_Data_e
- F_i_e=0
- If re.Test(s) Then
- Set match = re.Execute(s)
- Dim item_e
- For Each item_e In match
- If re.Replace(item_e,"$4")="" Then Exit For
- If F_i_e=0 Then
- F_FileNames = "'"&re.Replace(item_e,"$4")&"'"
- Else
- F_FileNames = F_FileNames &"," & "'"&re.Replace(item_e,"$4")&"'"
- End If
- F_i_e = F_i_e+1
- Next
- Set match=Nothing
- End If
- F_i_e=F_i_e-1
- If F_FileNames <> "" Then
- SqlStr_e = "Select F_ID,F_FileSize,F_filename From Dv_Upfile Where F_filename In("& F_FileNames &") order by F_filename Asc"
- Set F_RS_e=Dvbbs.execute(SqlStr_e)
- If F_RS_e.Bof And F_RS_e.Eof Then
- F_Data_e=""
- F_Del_e=1
- Else
- F_Data_e = F_RS_e.GetRows(-1)
- F_Del_e=0
- End If
- Set F_RS_e=Nothing
- If F_i_e=UBound(F_Data_e,2)+1 Then '判断图片个数与内容多1时,F_i_e得再减1,否则下标越界
- F_i_e=F_i_e-1
- End If
- ExifInfoTempStr = "<img "& DV_UBB_TITLE &" src=""skins/default/filetype/$1.gif"" border=""0"" width=""16"" height=""16"" />此主题相关图片如下:$3<br/><a href="""&Dvbbs.Forum_Setting(76)&"$4"" target=""_blank"" ><img "& DV_UBB_TITLE &" src="""&Dvbbs.Forum_Setting(76)&"$4"" border=""0"" alt=""按此在新窗口浏览图片"" /></a><br/><div name=""ExifInfo"" id=""$4""> </div>"
- s = re.Replace(s,ExifInfoTempStr)
- If FileInfo=1 Then
- '输出Exif信息
- x2=0
- If F_Del_e=0 then
- If CInt(F_i_e)>=0 Then
- UpFileInfoScript = "<scr"&"ipt type=""text/javascript"" language=""javascript"">" & VBCrLf
- For x2=0 To F_i_e
- If E_Template_U(Dvbbs.Forum_Setting(76)&F_Data_e(2,x2))="" Then
- UpFileInfoScript = UpFileInfoScript & "document.getElementById('"&F_Data_e(2,x2)&"').innerHTML='';" & VBCrLf
- Else
- UpFileInfoScript = UpFileInfoScript & "document.getElementById('"&F_Data_e(2,x2)&"').innerHTML="""&E_Template_U(Dvbbs.Forum_Setting(76)&F_Data_e(2,x2))&""";" & VBCrLf
- End If
- Next
- UpFileInfoScript = UpFileInfoScript & "</sc"&"ript>" & VBCrLf
- End If
- Else
- If CInt(F_i_e)>=0 Then
- UpFileInfoScript = "<scr"&"ipt type=""text/javascript"" language=""javascript"">" & VBCrLf
- For x2=0 To F_i_e
- UpFileInfoScript = UpFileInfoScript & "document.getElementById('"&F_Data_e(2,x2)&"').innerHTML='';" & VBCrLf
- Next
- UpFileInfoScript = UpFileInfoScript & "</sc"&"ript>" & VBCrLf
- End If
- End If
- End If
- '输出Exif信息
-
- End If
- rem 添加Exif相片信息 'add by reoaiq at 091211 End
复制代码 接着查找(只需修改查找到的第一个)- If CInt(F_i)>=0 Then
- UpFileInfoScript = "<scr"&"ipt type=""text/javascript"" language=""javascript"">" & VBCrLf
- For x=0 To F_i
复制代码 改为- If CInt(F_i)>=0 Then
- UpFileInfoScript = UpFileInfoScript & "<scr"&"ipt type=""text/javascript"" language=""javascript"">" & VBCrLf
- For x=0 To F_i
复制代码
Dv_Exif_8.3.rar
(24.55 KB, 下载次数: 2)
|
|