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)
 ChkURLs Function....
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 11 November 2004 :  12:24:54  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
When I was writing the puncuation bugfix, I noticed something about the ChkURLs function... might be some un-needed code, I dont know cuz I dont really understand the purpose of thise. But look...


			if ((strArray(Counter-1) = "" Or Len(strArray(Counter-1)) < 5) And strArray(Counter)<> "") then
				ChkURLs = ChkURLs & edit_hrefs(sPrefix & strArray(Counter), iType)
			elseif ((UCase(Right(strArray(Counter-1), 6)) <> "HREF=""") and _
				(UCase(Right(strArray(Counter-1), 5)) <> "[IMG]") and _
				(UCase(Right(strArray(Counter-1), 5)) <> "[URL]") and _
				(UCase(Right(strArray(Counter-1), 6)) <> "[URL=""") and _
				(UCase(Right(strArray(Counter-1), 6)) <> "ftp://") and _
				(UCase(Right(strArray(Counter-1), 8)) <> "file:///") and _
				(UCase(Right(strArray(Counter-1), 7)) <> "http://") and _
				(UCase(Right(strArray(Counter-1), 8)) <> "https://") and _
				(UCase(Right(strArray(Counter-1), 5)) <> "SRC=""") and _
				(UCase(Right(strArray(Counter-1), 1)) <> "-") and _
				(UCase(Right(strArray(Counter-1), 1)) <> "=") and _
				(strArray(Counter) <> "")) then
				ChkURLs = ChkURLs & edit_hrefs(sPrefix & strArray(Counter), iType)
			else
blahblahblah


Couldnt the code in green be combined seeing how the code in red is the same result either way?

End result being:


			if ((strArray(Counter-1) = "" Or Len(strArray(Counter-1)) < 5) And strArray(Counter)<> "") or _
 				((UCase(Right(strArray(Counter-1), 6)) <> "HREF=""") and _
				(UCase(Right(strArray(Counter-1), 5)) <> "[IMG]") and _
				(UCase(Right(strArray(Counter-1), 5)) <> "[URL]") and _
				(UCase(Right(strArray(Counter-1), 6)) <> "[URL=""") and _
				(UCase(Right(strArray(Counter-1), 6)) <> "ftp://") and _
				(UCase(Right(strArray(Counter-1), 8)) <> "file:///") and _
				(UCase(Right(strArray(Counter-1), 7)) <> "http://") and _
				(UCase(Right(strArray(Counter-1), 8)) <> "https://") and _
				(UCase(Right(strArray(Counter-1), 5)) <> "SRC=""") and _
				(UCase(Right(strArray(Counter-1), 1)) <> "-") and _
				(UCase(Right(strArray(Counter-1), 1)) <> "=") and _
				(strArray(Counter) <> "")) then

-Stim

Edited by - Da_Stimulator on 11 November 2004 13:39:48

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 11 November 2004 :  14:23:17  Show Profile  Visit HuwR's Homepage
quote:

Couldnt the code in green be combined seeing how the code in red is the same result either way?


Yep, looks ok to me.
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 11 November 2004 :  14:29:08  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
I dont get why thats like that.... was it previously a different procedure per elseif? then changed later or something?

-Stim
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 11 November 2004 :  14:33:56  Show Profile  Visit HuwR's Homepage
more than likely yes, but would have to dig out some old code to check
Go to Top of Page

PeeWee.Inc
Senior Member

United Kingdom
1893 Posts

Posted - 11 November 2004 :  14:47:48  Show Profile  Visit PeeWee.Inc's Homepage
Look at Stimmy getting all the bugs and non-needed code

De Priofundus Calmo Ad Te Damine
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 11 November 2004 :  14:49:21  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
I have no life Plus thats all I did years ago before I disappeared... might as well try and pick up where I left off

Although I noticed development has slowed down alot, probably because it's pretty stable... it'll probably pick up alot when Huw gets done iwth the international version (I'm assuming)

-Stim

Edited by - Da_Stimulator on 11 November 2004 14:50:41
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.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07