[This picture is for members only]Full URL of the imageImgTags(1,1,1) = "[img ]"
ImgTags(1,2,1) = "[/img]"
ImgTags(1,1,2) = "<img name='img' src="""
ImgTags(1,2,2) = """ border=""0"" style='cursor:default'ImgTags(1,1,1) = "[img ]"
ImgTags(1,2,1) = "[/img]"
if mlev > 0 then
ImgTags(1,1,2) = "<img name='img' src="""
ImgTags(1,2,2) = """ border=""0"" style='cursor:default' onClick='doimage(this,event)'>"
else
ImgTags(1,1,2) = "<div>[This picture is for members only]"
ImgTags(1,2,2) = "</div>"
end if
Look for the following line (appx: 1281)
ReplaceImageTags = strTempString
Change it to say:
if mLev > 0 then
ReplaceImageTags = strTempString
else
if instr(strTempString,"<img") then
ReplaceImageTags = "<div>[Image for members only!]</div>"
else
ReplaceImageTags = strTempString
end if
end if
If strFirstPart <> "" Then
If UCase(Left(strFirstPart, 5)) = "[IMG]" Then
ReplaceURLs = ReplaceURLs & "<a href=""" & strArray2(0) & """ target=""_blank"">" & strFirstPart & "</a>" & strSecondPartf
ElseIf UCase(Left(strArray2(0), 7)) = "HTTP://" Then If strFirstPart <> "" Then
If UCase(Left(strFirstPart, 5)) = "[IMG]" Then
if mlev > 0 then
ReplaceURLs = ReplaceURLs & "<a href=""" & strArray2(0) & """ target=""_blank"">" & strFirstPart & "</a>" & strSecondPart
else
Response.Write "<div>[This picture is for members only]</div><br />"
end if
ElseIf UCase(Left(strArray2(0), 7)) = "HTTP://" Thenif instr(ucase(strArray2(0)),"MANGIONEMAGIC.COM")>0 then
ReplaceURLs=ReplaceURLs&roTag&strArray2(0)&rc3Tag&strFirstPart&rc2Tag&strSecondPart
elseif ucase(left(strFirstPart,5))="[IMG]" then
if mlev > 0 then
ReplaceURLs=ReplaceURLs&"<a href="""&strArray2(0)&""" target=""_blank"">"&strFirstPart&"</a>"&strSecondPart
else
Response.Write "<div>[This picture is for members only]</div><br />"
end if
elseif ucase(left(strArray2(0),7))="HTTP://" thenOriginally posted by leatherlips
Carefree, I tried what you suggested. It however seems to replace everything with that. I'm not sure why. Take a look at my test forum: www.mangionemagic.com/forumtest
It replaced the forum descriptions, signatures along with the pictures and any other tags in use.
Originally posted by leatherlips
Carefree,
It works a little better. But it is also hiding my mp3 tags along with the img tags.
|File for Members Only|br />if mLev=0 and inStr(fString,"[mp3") then
for i = 1 to len(fString)
if mid(fString,i,5)="[mp3]" then ij=i
if mid(fString,i,6)="[/mp3]" then
ik=i
strTextString=left(fString,ij-1)+"|File for Members Only|"+mid(fString,ik+7)
end if
next
strTempString=strTextString
end if<div class=""break""></div>Originally posted by CarefreeI removed it but it had no effect.
Look at your tag definitions:Code:<div class=""break""></div>
strTextString=left(fString,ij-1)+"|File for Members Only|<"+mid(fString,ik+7)strTextString=left(fString,ij-1)+"|File for Members Only|"+mid(fString,ik+7)
strTextString=left(fString,ij-1)+"|File for Members Only|"+mid(fString,ik+6)Originally posted by leatherlipsI figured out a workaround for this although it is not very elegant. I created a new mp32 tag and a mp33 tag. In the post I edit the second mp3 file to be mp32 and if there is a third mp3 tag I edit it to mp33.
I also found a little glitch in the regular code. If more than one mp3 tag is being used in the same post, the first tag displays as text. See this post to see what I mean.
Originally posted by leatherlips
Does anyone have any ideas about the two things I mentioned?
1. Getting the login link to redirect back to the post, and
2. Making the hidden content work for multiple instances of the tag being used within the same post?
I'm very appreciative of everything Carefree has done with this. He's probably getting annoyed with this (and me) by now.![]()
if inStr(Request.ServerVariables("URL"),"/") then
for i=1 to len(Request.ServerVariables("URL"))
if mid(Request.ServerVariables("URL"),i,1)="/" then
strURL = mid(Request.ServerVariables("URL"),i+1)
end if
next
else
strURL = Request.ServerVariables("URL")
end if
left(fString,ij-1)+"<a href=""login.asp?target="& strURL &"""><img border=""0"" src=""images/members.bmp"" width=""350"" height=""56"" alt=""Members Only""></a>"+mid(fString,ik+6)
Microsoft VBScript compilation error '800a0410'
Invalid 'for' loop control variable
/forum/inc_func_common.asp, line 2092
for i=1 to len(Request.ServerVariables("URL"))if mLev=0 and inStr(fString,"[mp3") then
for i = 1 to len(fString)
if mid(fString,i,5)="[mp3]" then ij=i
if mid(fString,i,6)="[/mp3]" then
ik=i
if inStr(Request.ServerVariables("URL"),"/") then
for i=1 to len(Request.ServerVariables("URL"))
if mid(Request.ServerVariables("URL"),i,1)="/" then
strURL = mid(Request.ServerVariables("URL"),i+1)
end if
next
else
strURL = Request.ServerVariables("URL")
end if
left(fString,ij-1)+"<a href=""login.asp?target="& strURL &"""><img border=""0"" src=""images/members.bmp"" width=""350"" height=""56"" alt=""Members Only""></a>"+mid(fString,ik+6)
end if
next
strTempString=strTextString
end ifOriginally posted by leatherlips
Thanks Carefree.
I'm getting this error:Code:Microsoft VBScript compilation error '800a0410'
Invalid 'for' loop control variable
/forum/inc_func_common.asp, line 2092
for i=1 to len(Request.ServerVariables("URL"))
Here is the whole section of code:Code:if mLev=0 and inStr(fString,"[mp3") then
for i = 1 to len(fString)
if mid(fString,i,5)="[mp3]" then ij=i
if mid(fString,i,6)="[/mp3]" then
ik=i
if inStr(Request.ServerVariables("URL"),"/") then
for ji=1 to len(Request.ServerVariables("URL")) if mid(Request.ServerVariables("URL"),ji,1)="/" then
strURL = mid(Request.ServerVariables("URL"),ji+1)
end if
next
else
strURL = Request.ServerVariables("URL")
end if
left(fString,ij-1)+"<a href=""login.asp?target="& strURL &"""><img border=""0"" src=""images/members.bmp"" width=""350"" height=""56"" alt=""Members Only""></a>"+mid(fString,ik+6)
end if
next
strTempString=strTextString
end if