以下是引用惊鸿一现在2009-7-18 10:51:00的发言:
楼上的代码没看明白怎么用
呵呵
这个代码是从评论页截取的判断语句 判断是否为外链
if left(FaceStr,1)<>"/" and lcase(left(FaceStr,4))<>"http" Then FaceStr="/" & FaceStr
If lcase(left(FaceStr,4))<>"http" then FaceStr=KS.Setting(2) & FaceStr
end if
其实要调用头像,好像显示会员档案那儿也有个代码,可以去搜下
space/spaceajax.asp 大概641行处
Function ReplaceUserInfoContent(ByVal Content,ByVal RS)
'注解掉 If RS("UserType")=1 Then ReplaceUserInfoContent=ReplaceEnterpriseInfo(Content,RS("UserName")):Exit Function
Dim Privacy:Privacy=RS("Privacy")
Content=Replace(Content,"{$GetUserName}",RS("UserName"))
Dim UserFaceSrc:UserFaceSrc=RS("UserFace")
Dim FaceWidth:FaceWidth=KS.ChkClng(RS("FaceWidth"))
Dim FaceHeight:FaceHeight=KS.ChkClng(RS("FaceHeight"))
if left(userfacesrc,1)<>"/" and lcase(left(userfacesrc,4))<>"http" then userfacesrc="../" & userfacesrc
Content=Replace(Content,"{$GetUserFace}","<img src=" & UserFaceSrc & " border=""1"" width=""" & facewidth & """ height=""" & faceheight & """>")
Content =ReplaceUserDefine(101,Content,RS)