In "inc_header.asp", look for the following lines (appx 87-89):
'## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<meta name=""copyright"" content=""This Forum code is Copyright (C) 2000-09 Michael Anderson, Pierre Gorissen, Huw Reddick and Richard Kinser, Non-Forum Related code is Copyright (C) " & strCopyright & """>" & vbNewline
'## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
After those, add this:
'##### FTP Below #####
if right(request.servervariables("URL"),9) = "topic.asp" then
Response.Write "<script type=""text/javascript"" src=""ftp.js""></script>"
end if
'##### FTP Above #####
In "inc_header_short.asp", look for the following lines (appx 62-65):
'## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<meta name=""copyright"" content=""This Forum code is Copyright (C) 2000-05 Michael Anderson, Pierre Gorissen, Huw Reddick and Richard Kinser, Non-Forum Related code is Copyright (C) " & strCopyright & """>" & vbNewline
'## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
After those, add this:
Response.Write "<script type=""text/javascript"" src=""ftp.js""></script>"
In "inc_func_common.asp", look for the following line (appx 1555):
Sub WriteFooter() %>
Above it, insert this:
'##### FTP Below #####
Function ReplaceFTPTags(fString)
Dim oTag, cTag
Dim roTag, rcTag
Dim oTagPos, cTagPos
Dim nTagPos
Dim counter1, counter2
Dim strCodeText
Dim Tagcount
Dim strTempString, strResultString
TagCount = 2
Dim CodeTags(2,2,2)
Dim strArray, strArray2
CodeTags(1,1,1) = "[FTP]"
CodeTags(1,2,1) = "[/FTP]"
CodeTags(1,1,2) = "<div><script language=""javascript"">EmbedFTP("""
CodeTags(1,2,2) = """,625,475,false)</script></div>"
CodeTags(2,1,1) = "[FTP]"
CodeTags(2,2,1) = "[/FTP]"
CodeTags(2,1,2) = CodeTags(1,1,2)
CodeTags(2,2,2) = CodeTags(1,2,2)
strResultString = ""
strTempString = fString
for counter1 = 1 to TagCount
oTag = CodeTags(counter1,1,1)
roTag = CodeTags(counter1,1,2)
cTag = CodeTags(counter1,2,1)
rcTag = CodeTags(counter1,2,2)
oTagPos = InStr(1, strTempString, oTag, 1)
cTagPos = InStr(1, strTempString, cTag, 1)
if (oTagpos > 0) and (cTagPos > 0) then
strArray = Split(strTempString, oTag, -1)
for counter2 = 0 to Ubound(strArray)
if (Instr(1, strArray(counter2), cTag) > 0) then
strArray2 = split(strArray(counter2), cTag, -1)
strCodeText = trim(strArray2(0))
if instr(strCodeText,",") > 0 or _
instr(strCodeText,")") >0 or _
instr(strCodeText,"(") >0 or _
instr(strCodeText,";") >0 or _
instr(strCodeText,"""") >0 or _
instr(strCodeText,"<") >0 or _
instr(strCodeText,">") >0 or _
instr(strCodeText,"[") >0 or _
instr(strCodeText," ]") >0 or _ '(Note: Remove space left of bracket)
instr(strCodeText,",") >0 then
strCodeText = "illegal"
end if
strResultString = strResultString & roTag & strCodeText & rcTag & strArray2(1)
else
strResultString = strResultString & strArray(counter2)
end if
next
strTempString = strResultString
strResultString = ""
end if
next
ReplaceFTPTags = strTempString
End Function
'##### FTP Above #####
Next, look for the following line (appx 146):
FormatStr = fString
Above it, insert this:
'##### FTP Below #####
fString = ReplaceFTPTags(fString)
'##### FTP Above #####
Then, look for the following line (appx 64):
(UCase(Right(strArray(Counter-1), 6)) <> """) and _
After that, add this:
(UCase(Right(strArray(Counter-1), 6)) <> "[FTP]") and _
In "inc_iconfiles.asp", look for the following line (appx 82):
Const strIconFolderUnmoderated = "icon_folder_unmoderated.gif|15|15"
After that, add this:
Const strIconFTP = "icon_editor_ftp.gif|23|22"
In "inc_code.js", add the following at the very end:
function FTP() {
var text = getText();
if (helpstat) {
alert("FTP Tag Makes the enclosed linked file open in the FTP.\n\nUSE: [FTP]ftp://user:password@server.com:(port if not 21)[/FTP]");
} else if (basic) {
AddTxt="[FTP]" + text + "[/FTP]";
AddText(AddTxt);
} else {
if (text) {
txt=prompt("Link of the FTP adress.",text);
} else {
txt=prompt("Link of the FTP.","Insert Link Of FTP");
}
if (txt!=null) {
AddTxt="[FTP]"+txt+"[/FTP]";
AddText(AddTxt);
}
}
}
In "inc_post_buttons.asp", look for the following line (appx 54):
"<a href=""Javascript:strike();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorStrike,"Strikethrough","align=""top""") & "</a>" & vbNewLine & _
After that, add this:
"<a href=""Javascript:FTP();"" tabindex=""-1"">" & getCurrentIcon(strIconftp,"FTP","align=""top""") & "</a>" & vbNewLine & _
Finally, save the following as "ftp.js" in your forum directory:
function EmbedFTP(URL,autostart){
if(autostart != true && autostart != "true" && autostart != "1" && autostart != 1){
autostart = 0; //Replace with default. Default = 0 (false).
}else{
autostart = 1; //Replace with 1, being zero.
}//See if we can continue.
if(URL == null || URL == "illegal"){
//Nope, we can't.
document.writeln(" error: illegal use of FTP tag! ");
}else{
//Add the code to the document.
document.writeln('<iframe src='+ URL +' width="760" height="475" style="border: none;">');
document.writeln('</iframe>');
}
}