Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Enable posting ftp:// in URL.
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

bbarbour
Starting Member

USA
5 Posts

Posted - 27 November 2000 :  20:18:58  Show Profile  Send bbarbour an AOL message  Send bbarbour an ICQ Message
Simple enough but change it so you can use ftp:// as well as http:// and such.

pk_zone
New Member

Canada
69 Posts

Posted - 27 November 2000 :  22:58:49  Show Profile  Send pk_zone an ICQ Message
That's what the "url" and "/url" tags are for...I guess you could get technical and add the ftp:// thingy so it recognizes it automagically like it does http://, I'll get back to you on that....

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 27 November 2000 :  23:09:55  Show Profile
ftp://ftp.anywhere.com target= _blank ftp://ftp.anywhere.com /a FTP Here" target="_blank">Yeah. It works ok with the url tags. br / br / You can a href= ftp://ftp.anywhere.com target= _blank ftp://ftp.anywhere.com /a FTP Here
A popular ftp server: ftp://ftp.anywhere.com

The only problem I forsee is if the ftp address has a www in it. Instead of ftp.anywhere.com the address might be www.anywhere.com. Some servers do that.

<center><font color=green>*----*----*----*----*----*----*----*----*----*----*----*
<font size=2>"However, if you suffer as a Christian, do not be ashamed,
but praise God that you bear that name."</font id=size2>
1 Peter 4:16</font id=green></center>
Go to Top of Page

pk_zone
New Member

Canada
69 Posts

Posted - 27 November 2000 :  23:25:57  Show Profile  Send pk_zone an ICQ Message
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Simple enough but change it so you can use ftp:// as well as http:// and such.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Chnage the following in inc_functions.asp, add the <font color=red> RED LINES </font id=red> to your file(s):

LINE 57 of inc_functions.asp --

--------

function FormatStr(fString)
on Error resume next
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
fString = Replace(fString, CHR(10), "<BR>")
if strBadWordFilter = 1 then
fString = ChkBadWords(fString)
end if
fString = ChkUrls(fString,"http://", 1)
fString = ChkUrls(fString,"https://", 2)
fString = ChkUrls(fString,"file:///", 3)
fString = ChkUrls(fString,"www.", 4)
fString = ChkUrls(fString,"mailto:",5)
<font color=red> fString = ChkUrls(fString,"ftp://",6)</font id=red>
'fString = edit_hrefs(fString, 5)
fString = ReplaceUrls(fString)
FormatStr = fString
end function

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

On LINE 2225 of Inc_functions.asp

if (type == 5) {
s_str = s_str.replace(/\b([\w+\-\'\#\%\.\_]+@[\w+\.?\-\'\#\%\~\_\.\;]*)/gi,
"<a href=\"mailto\:$1\">$1</a>");
}
<font color=red>if (type == 6) {
s_str = s_str.replace(/\b(ftp\:\/\/[\w+\.]+[\w+\.\:\/\_\?\=\&\-\'\#\%\~\;]+)/gi,
"<a href=\"$1\" target=\"_New\">$1<\/a>");
}</font id=red>

that should do the trick, no idea how well it works but it works for me....

Cheers!

PK

PS!! Disclaimer:

I am by no means familiar with this code so please take care and TEST IT FIRST before you throw it into something you are using in production. While I have the above modification in place and have not noticed any side effects maybe one of the other developer guys can verify that this is ok...use at your own risk.


Edited by - pk_zone on 27 November 2000 23:36:17
Go to Top of Page

bbarbour
Starting Member

USA
5 Posts

Posted - 28 November 2000 :  00:44:10  Show Profile  Send bbarbour an AOL message  Send bbarbour an ICQ Message
Thanks. I hadn't looked thru the code very much yet.. only started trying it out today and wanted to post our company web interfaces.. extranet.. intranet.. ftp...
Go to Top of Page

pk_zone
New Member

Canada
69 Posts

Posted - 28 November 2000 :  00:58:11  Show Profile  Send pk_zone an ICQ Message
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Thanks. I hadn't looked thru the code very much yet.. only started trying it out today and wanted to post our company web interfaces.. extranet.. intranet.. ftp...
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Hey, no prob <img src=icon_smile.gif border=0 align=middle>
I myself am just starting to unravel the mysteries of the ASP code in the forum. Been working with it now for roughly 2 months and am having a lot of fun with it actually! It's been a good teacher so far.....

Cheers!

PK


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07