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 DEV-Group
 DEV Discussions (General)
 dot in url
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

fatum
Junior Member

Belgium
281 Posts

Posted - 04 February 2003 :  08:11:19  Show Profile  Visit fatum's Homepage
When typing a url at the end of the sentence, a lot of people end with a dot. Because of this the url will also contain a dot in the end. Example:
http://www.boves.be.

A partial solution is to change the inc_func_common.asp file:

<script language="javascript1.2" runat="server">
function edit_hrefs(sURL, iType) {
	sOutput = new String(sURL);
	intAddDot = 0;

	if ((sOutput.charAt(sOutput.length-1)) == ".") {
			sOutput = sOutput.substring(0,sOutput.length-1);
			intAddDot = 1;
	}
		

	if (iType == 1) {
		sOutput = sOutput.replace(/\b(http\:\/\/[\w+\.]+[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
			"<a href=\"$1\" target=\"_blank\">$1<\/a>");
	} else if (iType == 2) {
		sOutput = sOutput.replace(/\b(https\:\/\/[\w+\.]+[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
			"<a href=\"$1\" target=\"_blank\">$1<\/a>");
	} else if (iType == 3) {
		sOutput = sOutput.replace(/\b(www\.[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
			"<a href=\"http://$1\" target=\"_blank\">$1<\/a>");
	} else if (iType == 4) {
		sOutput = sOutput.replace(/\b([\w+\-\'\#\%\.\_\,\$\!\+\*]+@[\w+\.?\-\'\#\%\~\_\.\;\,\$\!\+\*]+\.[\w+\.?\-\'\#\%\~\_\.\;\,\$\!\+\*]+)/gi,
			"<a href=\"mailto\:$1\">$1<\/a>");
	} else if (iType == 5) {
		sOutput = sOutput.replace(/\b(ftp\:\/\/[\w+\.]+[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
			"<a href=\"$1\" target=\"_blank\">$1<\/a>");
	} else if (iType == 6) {
		sOutput = sOutput.replace(/\b(file\:\/\/\/[\w+\:\/\\]+[\w+\/\w+\.\:\/\\\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
		  	"<a href=\"$1\" target=\"_blank\">$1<\/a>");
	}
	
	if (intAddDot == 1) {
		sOutput = sOutput + ".";
	}

	return sOutput;
}
</script>


But this doesn't solve the problem always. Hopefully someone with a better understanding of the code then me can fix this

New Dutch testsite coming soon || Dutch Language file
Running: Snitz v3.4.03 on MySQL (MyODBC 2.50)

Edited by - fatum on 04 February 2003 09:39:13

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 04 February 2003 :  08:49:48  Show Profile
sorry, don't see this as a bug. Just don't put a period after a url. Also, messing around with the edit_hrefs function will almost always break something that is working now.
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 04 February 2003 :  09:39:12  Show Profile
quote:
Originally posted by RichardKinser
Just don't put a period after a url.


The technical term for this is the disapperiod

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

fatum
Junior Member

Belgium
281 Posts

Posted - 04 February 2003 :  09:41:16  Show Profile  Visit fatum's Homepage
lol @Nikkol
but I've seen it a few times here on the site, people that are typing just put a dot there, force of habit.

It's true that it's not a real bug, and it's true that changing the edit_hrefs function is risky, but I'm hoping that someone can come up with a better (like in working ) solution

New Dutch testsite coming soon || Dutch Language file
Running: Snitz v3.4.03 on MySQL (MyODBC 2.50)
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 04 February 2003 :  10:40:36  Show Profile  Send ruirib a Yahoo! Message
If you delimit the URL using the [url][/url] tags this will stop being a problem.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

VodkaFish
Average Member

USA
654 Posts

Posted - 04 February 2003 :  10:43:01  Show Profile  Send VodkaFish an AOL message  Send VodkaFish an ICQ Message  Send VodkaFish a Yahoo! Message
My users do this constantly. I think if you run a forum for non-tech saavy people, you run into things that aren't problems, but yet... are It's not a true bug, but if a good solution for this ever came out, I think it'd be something nice to implement.

v ø d k â f ï § h
Go to Top of Page

fatum
Junior Member

Belgium
281 Posts

Posted - 04 February 2003 :  11:20:23  Show Profile  Visit fatum's Homepage
Indeed, the things ruirib and RichardKinser said make sense for me, but not for the users of my board

If there is a way to disable the auto conversion, that would also be good, then the users are forced to use the URL icon.

New Dutch testsite coming soon || Dutch Language file
Running: Snitz v3.4.03 on MySQL (MyODBC 2.50)
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 04 February 2003 :  11:44:53  Show Profile
You could disable the feature by removing the edit_hrefs function altogether.


c ya in the funny books
MeTV | Forums (offline) | Graphics | House Of Design | Snitz Bitz
"Forgive your enemies, but never forget their names."
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 18 July 2003 :  03:17:27  Show Profile
Has anyone come up with a solution for the periods being included?

I know that some of you argue that it's not a bug, to disable the auto conversion, or force the [url] tags, but that's not really a solution. See, the auto conversion for many of our users is one of the favorite features of Snitz. However it becomes a pain in the butt for people who like to end their sentences with periods.

Try to tell a website full of writers that they can't end their sentences with periods.
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 18 July 2003 :  12:25:47  Show Profile  Visit MarkJH's Homepage
quote:
I think if you run a forum for non-tech saavy people, you run into things that aren't problems, but yet... are
Get similar problems in my forum with people typing "Awww..." Just like the full stop problem after the URL, it's more of an annoyance that one can live with than a bug.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 18 July 2003 :  12:57:56  Show Profile
quote:
Originally posted by Nikkol

quote:
Originally posted by RichardKinser
Just don't put a period after a url.


The technical term for this is the disapperiod




======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 24 September 2003 :  00:08:33  Show Profile
How about making the decision to use vbscript's RegEx feature? How does everyone feel about that? I would love to be able to use 1 RegEx to handle all URLs. Does anyone think this is possible?
Go to Top of Page

reception
Starting Member

USA
4 Posts

Posted - 24 September 2003 :  07:33:21  Show Profile  Visit reception's Homepage
quote:
Get similar problems in my forum with people typing "Awww..." Just like the full stop problem after the URL, it's more of an annoyance that one can live with than a bug.

Awww Type it like that so it appears to be a fake link?

Radio & Records Message Boards
2000-2003
May it always be remembered.

Edited by - reception on 24 September 2003 07:37:16
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.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07