I need to wrap links that go too long so they don't force my page wider...
I've got linkfinder from CFComet.com (code below).. I want to be able to change where it says <A...>/1</A> to basically:
<A...><CFIF len(/1) GT 60>#left(/1,50)#<BR>
#right(/1,len(/1) - 50)#<CFELSE>/1</CFIF></A>
Thanks,
Tony Hicks
-----------------
<!---
===================================================================
Utility: ColdFusion LinkFinder v1.1
Author: Dain Anderson
Email: webmaster@cfcomet.com
Revised: June 10, 2001
Download: ===================================================================
Description:
This tag is an off-shoot of the CF_ColoredCode tag.
This utility will turn URLs within messages into active URLs and
will make email addresses active mailto links as well. The newest
addition also parses UNC paths as well as the file:/// protocol,
among many (many!) RegEx enhancements to the HREF and MAILTO
parse routines.
===================================================================
Usage:
<CF_LinkFinder DATA="#data_to_parse#">
OR
<CF_LinkFinder DATA="#data_to_parse#" NAME="Return_variable">
===================================================================
Parameter(s):
(Required) DATA = "Data sent to be parsed."
(Optional) NAME = "Named variable to return."
===================================================================
Use anyway you want, but keep the above header in place.
===================================================================
--->
<CFPARAM NAME="Attributes.Data" DEFAULT="">
<CFIF NOT LEN(Attributes.Data)><B><FONT COLOR="FF0000">Error: No data to parse!</FONT></B><BR></CFIF>
<CFSCRIPT>
this = Attributes.Data;
this = REReplaceNoCase(this, "(((file:///)|([a-z]:\\)|(\\\\[[:alpha:]]))+(\.?[[:alnum:]\/=^@*|:~`+$%?_##& -])+)", "<A TARGET=""_blank"" HREF=""\1"">\1</A>", "ALL"
;
this = REReplaceNoCase(this, "([[:alnum:]]*://[[:alnum:]\@-]*(\.[[:alnum:]][[:alnum:]-]*[[:alnum:]]\.)?[[:alnum:]]{2,}(\.?[[:alnum:]\/=^@*|:~`+$%?_##&-])+)", "<A TARGET=""_blank"" HREF=""\1"">\1</A>", "ALL"
;
this = REReplaceNoCase(this, "(([[:alnum:]][[:alnum:]_.-]*)?[[:alnum:]]@[[:alnum:]][[:alnum:].-]*\.[[:alpha:]]{2,})", "<A HREF=""mailto:\1"">\1</A>", "ALL"
;
</CFSCRIPT>
<CFIF IsDefined("Attributes.Name"
>
<CFSET "Caller.#Attributes.Name#" = This>
<CFELSE>
<CFOUTPUT>#ParagraphFormat(This)#</CFOUTPUT>
</CFIF>
-----------------
I've got linkfinder from CFComet.com (code below).. I want to be able to change where it says <A...>/1</A> to basically:
<A...><CFIF len(/1) GT 60>#left(/1,50)#<BR>
#right(/1,len(/1) - 50)#<CFELSE>/1</CFIF></A>
Thanks,
Tony Hicks
-----------------
<!---
===================================================================
Utility: ColdFusion LinkFinder v1.1
Author: Dain Anderson
Email: webmaster@cfcomet.com
Revised: June 10, 2001
Download: ===================================================================
Description:
This tag is an off-shoot of the CF_ColoredCode tag.
This utility will turn URLs within messages into active URLs and
will make email addresses active mailto links as well. The newest
addition also parses UNC paths as well as the file:/// protocol,
among many (many!) RegEx enhancements to the HREF and MAILTO
parse routines.
===================================================================
Usage:
<CF_LinkFinder DATA="#data_to_parse#">
OR
<CF_LinkFinder DATA="#data_to_parse#" NAME="Return_variable">
===================================================================
Parameter(s):
(Required) DATA = "Data sent to be parsed."
(Optional) NAME = "Named variable to return."
===================================================================
Use anyway you want, but keep the above header in place.
===================================================================
--->
<CFPARAM NAME="Attributes.Data" DEFAULT="">
<CFIF NOT LEN(Attributes.Data)><B><FONT COLOR="FF0000">Error: No data to parse!</FONT></B><BR></CFIF>
<CFSCRIPT>
this = Attributes.Data;
this = REReplaceNoCase(this, "(((file:///)|([a-z]:\\)|(\\\\[[:alpha:]]))+(\.?[[:alnum:]\/=^@*|:~`+$%?_##& -])+)", "<A TARGET=""_blank"" HREF=""\1"">\1</A>", "ALL"

this = REReplaceNoCase(this, "([[:alnum:]]*://[[:alnum:]\@-]*(\.[[:alnum:]][[:alnum:]-]*[[:alnum:]]\.)?[[:alnum:]]{2,}(\.?[[:alnum:]\/=^@*|:~`+$%?_##&-])+)", "<A TARGET=""_blank"" HREF=""\1"">\1</A>", "ALL"

this = REReplaceNoCase(this, "(([[:alnum:]][[:alnum:]_.-]*)?[[:alnum:]]@[[:alnum:]][[:alnum:].-]*\.[[:alpha:]]{2,})", "<A HREF=""mailto:\1"">\1</A>", "ALL"

</CFSCRIPT>
<CFIF IsDefined("Attributes.Name"

<CFSET "Caller.#Attributes.Name#" = This>
<CFELSE>
<CFOUTPUT>#ParagraphFormat(This)#</CFOUTPUT>
</CFIF>
-----------------