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/O Code)
 Alternative WebLinks
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

PuppyF500
New Member

Netherlands
68 Posts

Posted - 07 May 2004 :  21:50:25  Show Profile
How can i enter for example an ed2k link as a weblink? i tried modifying post_info.asp but that didn't help. It keeps rejecting the ed2k:// tag but by manually entering it in de database I can create such a link, but i cannot edit it because it cant save an ed2k link. What code do i need to change to make this possible?

PuppyF500
New Member

Netherlands
68 Posts

Posted - 08 May 2004 :  06:12:15  Show Profile
nice to see my topic has moved, but even more i would like an answer i also want to put a ftp link on my forum as a weblink, so if anyone knows how i can achieve this...
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 08 May 2004 :  09:13:59  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Are you talking about links in posts or links on default.asp?

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

PuppyF500
New Member

Netherlands
68 Posts

Posted - 09 May 2004 :  08:05:16  Show Profile
the links on default.asp
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 09 May 2004 :  08:41:04  Show Profile
FTP link support already exists in v 3.4.04 .... To add ed2k link support, do the following.

In inc_func_common:

Look for the following lines (appx 977-979):


						ElseIf UCase(Left(strArray2(0), 6)) = "ftp://" Then
							'ReplaceURLs = ReplaceURLs & edit_hrefs(strArray2(0), 5) & strSecondPart
							ReplaceURLs = ReplaceURLs & roTag & strArray2(0) & rc1Tag & strFirstPart & rc2Tag & strSecondPart

Below that, add the following:

						ElseIf UCase(Left(strArray2(0), 7)) = "ED2K://" Then
							'ReplaceURLs = ReplaceURLs & edit_hrefs(strArray2(0), 5) & strSecondPart
							ReplaceURLs = ReplaceURLs & roTag & strArray2(0) & rc1Tag & strFirstPart & rc2Tag & strSecondPart


Look for the following lines (appx 1001-1003):


						ElseIf UCase(Left(strArray2(0), 6)) = "ftp://" Then
							ReplaceURLs = ReplaceURLs & edit_hrefs(strArray2(0), 5) & strSecondPart
							'ReplaceURLs = ReplaceURLs & roTag & strArray2(0) & rc1Tag & strFirstPart & rc2Tag & strSecondPart

Below that, add the following:

						ElseIf UCase(Left(strArray2(0), 7)) = "ED2K://" Then
							'ReplaceURLs = ReplaceURLs & edit_hrefs(strArray2(0), 5) & strSecondPart
							ReplaceURLs = ReplaceURLs & roTag & strArray2(0) & rc1Tag & strFirstPart & rc2Tag & strSecondPart


Look for the following lines (appx 1068-1069):


				ElseIf UCase(Left(strArray2(0), 6)) = "ftp://" Then
					ReplaceURLs = ReplaceURLs & edit_hrefs(strArray2(0), 5) & strArray2(1)


Below that, add the following:

				ElseIf UCase(Left(strArray2(0), 7)) = "ED2K://" Then
					ReplaceURLs = ReplaceURLs & roTag & strArray2(0) & rc1Tag & strArray2(0) & rc2Tag & strArray2(1)


That should do it.

If I've forgotten anything, you guys feel free to correct me ;-)

Edited by - Carefree on 09 May 2004 08:46:44
Go to Top of Page

PuppyF500
New Member

Netherlands
68 Posts

Posted - 09 May 2004 :  08:44:21  Show Profile
Tnx Man

Edited by - PuppyF500 on 09 May 2004 10:27:05
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 09 May 2004 :  08:47:53  Show Profile
You're welcome.
Go to Top of Page

PuppyF500
New Member

Netherlands
68 Posts

Posted - 09 May 2004 :  10:26:50  Show Profile
This only works for ed2k links in posts, but i want to be able to make a weblink with ftp:// or ed2k:// on the default.asp page, which isn't possible this way. tnx anyway
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 09 May 2004 :  10:50:47  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Find the following code in post_info.asp (lines 1244-1249):
	if txtAddress = " " or lcase(txtAddress) = "http://" or lcase(txtAddress) = "https://" or lcase(txtAddress) = "file:///" then 
		Err_Msg = Err_Msg & "<li>You Must Enter an Address for the New URL</li>"
	end if
	if (left(lcase(txtAddress), 7) <> "http://" and left(lcase(txtAddress), 8) <> "https://" and left(lcase(txtAddress), 8) <> "file:///") and txtAddress <> "" then
		Err_Msg = Err_Msg & "<li>You Must prefix the Address with <b>http://</b>, <b>https://</b> or <b>file:///</b></li>"
	end if

and replace it with:
	if txtAddress = " " or lcase(txtAddress) = "http://" or lcase(txtAddress) = "https://" or lcase(txtAddress) = "file:///" or lcase(txtAddress) = "ftp://" or lcase(txtAddress) = "ed2k://" then 
		Err_Msg = Err_Msg & "<li>You Must Enter an Address for the New URL</li>"
	end if
	if (left(lcase(txtAddress), 7) <> "http://" and left(lcase(txtAddress), 8) <> "https://" and left(lcase(txtAddress), 8) <> "file:///" and left(lcase(txtAddress), 6) <> "ftp://" and left(lcase(txtAddress), 7) <> "ed2k://")  and txtAddress <> "" then
		Err_Msg = Err_Msg & "<li>You Must prefix the Address with <b>http://</b>, <b>https://</b>, <b>file:///</b>, <b>ftp://</b> or <b>ed2k://</b></li>"
	end if

(or add the blue code).

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 09 May 2004 :  11:01:52  Show Profile
quote:
Originally posted by PuppyF500

This only works for ed2k links in posts, but i want to be able to make a weblink with ftp:// or ed2k:// on the default.asp page, which isn't possible this way. tnx anyway



Where do you want your link to display? In the heading (above login information)? If so, that is actually in inc_header.asp not in default.asp.

Assuming that's what you want, open inc_header.asp and look for the following lines(appx 484-485):

	Response.Write	"          |" & vbNewline & _
			"          <a href=""active.asp""" & dWStatus("See what topics have been active since your last visit...") & " tabindex=""-1""><acronym title=""See what topics have been active since your last visit..."">Active Topics</acronym></a>" & vbNewline 


Below that, add the following:

	Response.Write	"          |" & vbNewline & _
			"          <a href=""ed2k://(actuallink)""" & dWStatus("ED2K Link Description") & " tabindex=""-1""><acronym title=""EDonkey link"">EDonkey</acronym></a>" & vbNewline 


Of course, you'll need to put whatever you want for the description and the exact link where it says (actuallink).
Go to Top of Page

PuppyF500
New Member

Netherlands
68 Posts

Posted - 09 May 2004 :  11:02:15  Show Profile
tnx OneWayMule & Carefree! it works now
Go to Top of Page

PuppyF500
New Member

Netherlands
68 Posts

Posted - 09 May 2004 :  11:09:31  Show Profile
quote:
Originally posted by Carefree
Where do you want your link to display? In the heading (above login information)? If so, that is actually in inc_header.asp not in default.asp.

Assuming that's what you want, open inc_header.asp and look for the following lines(appx 484-485):

	Response.Write	"          |" & vbNewline & _
			"          <a href=""active.asp""" & dWStatus("See what topics have been active since your last visit...") & " tabindex=""-1""><acronym title=""See what topics have been active since your last visit..."">Active Topics</acronym></a>" & vbNewline 


Below that, add the following:

	Response.Write	"          |" & vbNewline & _
			"          <a href=""ed2k://(actuallink)""" & dWStatus("ED2K Link Description") & " tabindex=""-1""><acronym title=""EDonkey link"">EDonkey</acronym></a>" & vbNewline 


Of course, you'll need to put whatever you want for the description and the exact link where it says (actuallink).


That one i could do myself but i wanted to make a ed2k weblink but with both your help i finally managed to fix it tnx
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.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07