The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
I've done some searching and came up with nothing. Has anyone made any mods to clip the URL in the format string functions?
Like if there is a super long URL like this:
http://www.nohrsc.nws.gov/interactive/html/map.html?var=ssm_depth&dy=2005&dm=3&dd=9&dh=18&snap=1&o9=1&o12=1&o13=1&lbl=m&min_x=-77.650416666659&min_y=37.446667353307&max_x=-62.150416666659&max_y=52.946667353307&coord_x=-70.18&coord_y=44.54&metric=0&bgvar=dem&width=512&height=512&nw=512&nh=512&type=3&js=1&uc=0&mode=zoomin&submit1=0&ql=station&zf=4.0
It will turn it into this:
http://www.nohrsc.nws.gov/intera....tion&zf=4.0
And still link to the same place<
Like if there is a super long URL like this:
http://www.nohrsc.nws.gov/interactive/html/map.html?var=ssm_depth&dy=2005&dm=3&dd=9&dh=18&snap=1&o9=1&o12=1&o13=1&lbl=m&min_x=-77.650416666659&min_y=37.446667353307&max_x=-62.150416666659&max_y=52.946667353307&coord_x=-70.18&coord_y=44.54&metric=0&bgvar=dem&width=512&height=512&nw=512&nh=512&type=3&js=1&uc=0&mode=zoomin&submit1=0&ql=station&zf=4.0
It will turn it into this:
http://www.nohrsc.nws.gov/intera....tion&zf=4.0
And still link to the same place<
Posted
Good thought ; there are several sites out there using this principle.<
portfolio - linkshrinker - oxle - twitter
Posted
About the best I have come up with is this:
<%
strLink ="http://www.nohrsc.nws.gov/interactive/html/map.html?var=ssm_depth&dy=2005&dm=3&dd=9&dh=18&snap=1&o9=1&o12=1&o13=1&lbl=m&min_x=-77.650416666659&min_y=37.446667353307&max_x=-62.150416666659&max_y=52.946667353307&coord_x=-70.18&coord_y=44.54&metric=0&bgvar=dem&width=512&height=512&nw=512&nh=512&type=3&js=1&uc=0&mode=zoomin&submit1=0&ql=station&zf=4.0"
if RTrim(Len(strLink)) > 60 then
strLinks = Left(strLink, 40) & "..."
end if
%>
<a href="<% =strLink %>"><% =strLinks %></a><
<%
strLink ="http://www.nohrsc.nws.gov/interactive/html/map.html?var=ssm_depth&dy=2005&dm=3&dd=9&dh=18&snap=1&o9=1&o12=1&o13=1&lbl=m&min_x=-77.650416666659&min_y=37.446667353307&max_x=-62.150416666659&max_y=52.946667353307&coord_x=-70.18&coord_y=44.54&metric=0&bgvar=dem&width=512&height=512&nw=512&nh=512&type=3&js=1&uc=0&mode=zoomin&submit1=0&ql=station&zf=4.0"
if RTrim(Len(strLink)) > 60 then
strLinks = Left(strLink, 40) & "..."
end if
%>
<a href="<% =strLink %>"><% =strLinks %></a><
Cheers,
David Greening
David Greening
Posted
Gimme a bit and I'll try and come up with something over lunch (GMT). Seem to remember someone doing this before but I can't find it now.
<
Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
<
Search is your friend
“I was having a mildly paranoid day, mostly due to thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
Great!!! Time to experiment!<
portfolio - linkshrinker - oxle - twitter
Posted
Well, I'm getting this error :
After posting this url:
http://ridiculoouslylongurl.com.netridiculoouslylongurl.com.netridiculoouslylongurl.com.netridiculoouslylongurl.com.netridiculoouslylongurl.com.net/
it displays it as this:
http://ridiculoously...longurl.com.netridiculoouslylongurl.com.netridiculoouslylongurl.com.netridiculoouslylongurl.com.netridiculo
So...it doesn't really works as designed.<
Microsoft JScript compilation error '800a03ea'I've changed that line to this:
Syntax error
/forum/inc_func_common.asp, line 1836
iMLength = <%intMaxLinkLength%>;
-----------^
Code:
iMLength = intMaxLinkLength;
http://ridiculoouslylongurl.com.netridiculoouslylongurl.com.netridiculoouslylongurl.com.netridiculoouslylongurl.com.netridiculoouslylongurl.com.net/
it displays it as this:
http://ridiculoously...longurl.com.netridiculoouslylongurl.com.netridiculoouslylongurl.com.netridiculoouslylongurl.com.netridiculo
So...it doesn't really works as designed.<
portfolio - linkshrinker - oxle - twitter
Posted
Is that with or without the [url] tag? Figured the changes to edit_hrefs wouldn't work sraight off! Looks like the problem's being cused by this:
sLink.substring((iLLength-iHLength),iHLength)
Can't figure out why, though.
<
Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
sLink.substring((iLLength-iHLength),iHLength)
Can't figure out why, though.
<
Search is your friend
“I was having a mildly paranoid day, mostly due to thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
I didn't use the URL tag.
I just posted that URL, without any tags around it.<
portfolio - linkshrinker - oxle - twitter
Posted
Well, it's definitely that snippet above, then. Don't know why, even if it started trimming the right hand side from the wrong character (iLLength-iHLength), it should still only show iHLength characters from that point.
<
Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
<
Search is your friend
“I was having a mildly paranoid day, mostly due to thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...